UI for inspecting various aspects of the application's configuration
Add a dependency in BuildConfig.groovy:
The Hibernate features were removed from this plugin and adding to a separate plugin, app-info-hibernate.
See this blog post for an updated test app and support for Grails 2.0+.The App Info plugin provides a UI for inspecting and altering various aspects of the application's configuration.Each page has a toolbar with these sections:
- Displays all application-scope attributes from the ServletContext
- Displays all request-scope attributes from the current HttpServletRequest. Mostly useful to see what's available in a typical request.
- Displays all session-scope attributes from the current HttpSession.
- Read/write view of the DataSource bean. Depending on the DataSource implementation, changing an attribute will take effect immediately and reset the connection pool
- Read-only view of the Configuration.
- System Properties:
- Read/write view of system properties. You can alter current properties or add new ones.
- All controllers, plus links to all actions
- Reverse-engineered log4j.xml based on in-memory Log4j configuration. An estimate, so it may not be 100% accurate
- Comboboxes for all loggers to change the log level
- Text field to register a new Logger + level.
- Graphs describing memory usage
- Action to trigger garbage collection.
- All current sessions
- Displays session-scope variables and a link to invalidate a session
- Only populated if
grails.plugins.appinfo.useContextListener = truein @[email protected]
- Spring Beans
- Spring bean information for all beans in the "main" context and the parent context
grails.plugins.appinfo.additionalattribute in Config.groovy. For example this would create two additional menus:
The first would display "My Config" and have one menu item ('Configs'), and the second would display "Other Menu" and have two menu items ('Action 1' and 'Action 2'). The menu item Map keys are the action to invoke, and the values are the menu item text to display. Typically the actions (in this case 'configs', 'menuAction1', and 'menuAction2') would be defined in one or more custom mixins.Please report any bugs or feature requests in JIRA.
grails.plugins.appinfo.additional = [ "My Config": [ configs: "Configs" ], "Other Menu": [ menuAction1: "Action 1", menuAction2: "Action 2" ] ]