Last updated by burtbeckwith 1 year ago
grails install-plugin app-info
Last updated by burtbeckwith 4 months ago
The App Info plugin provides a UI for inspecting and altering various aspects of the application's configuration.
See
this blog post for screenshots and information about configuration. There's also a sample application demonstrating configuration and usage.
Each page has a toolbar with these sections:
- Attributes
- Application
- Displays all application-scope attributes from the ServletContext
- Request
- Displays all request-scope attributes from the current HttpServletRequest. Mostly useful to see what's available in a typical request.
- Session
- Displays all session-scope attributes from the current HttpSession.
- Properties
- DataSource
- Read/write view of the DataSource bean. Depending on the DataSource implementation, changing an attribute will take effect immediately and reset the connection pool
- Grails
- Read-only view of the Configuration.
- System Properties:
- Read/write view of system properties. You can alter current properties or add new ones.
- Info
- Controllers
- All controllers, plus links to all actions
- Logging
- 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.
- Memory
- Graphs describing memory usage
- Action to trigger garbage collection.
- Sessions
- All current sessions
- Displays session-scope variables and a link to invalidate a session
- Only populated if
grails.plugins.appinfo.useContextListener = true in @Config.groovy@
- Spring Beans
- Spring bean information for all beans in the "main" context and the parent context
- Hibernate
- Combos on each page
- Tables
- detailed information for each table
- Entities
- detailed information for each entity/domain class
- hbm.xml
- reverse-engineered hbm.xml that would have created the equivalent entity
- Overview
- Properties
- Mappings Info
- Imports
- Auxiliary Database Objects
- Named Queries
- Named SQL Queries
- TypeDefs
- Filter Definitions
- Entity Graphs
- ER-style graphs of all Hibernate classes with relationships.
- Table Graphs
- ER-style graphs of all tables with relationships.
- Caching
- 2nd-level cache information for StandardQueryCache, UpdateTimestampsCache, and all domain class caches
- Links to clear the cache and display usage graphs
- Statistics
- General Hibernate statistics
- Links for statistics for each domain class
- Links for statistics for each collection
- Links for statistics for cached queries
You can also add custom menu items by specifying the
grails.plugins.appinfo.additional attribute in Config.groovy. For example this would create two additional menus:
grails.plugins.appinfo.additional = [
"My Config": [
configs: "Configs"
],
"Other Menu": [
menuAction1: "Action 1",
menuAction2: "Action 2"
]
]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.
The Hibernate graphs are generated using GraphViz and the path to the executable defaults to /usr/bin/dot . This should work on Linux and OSX if GraphViz is installed in the standard location. On Windows or with a non-standard location you need to specify it in grails-app/conf/Config.groovy with grails.plugins.appinfo.dotPath = 'c:/path/to/dot.exe'
Please report any bugs or feature requests
in JIRA.
Last updated by admin 1 year ago
Last updated by bronoman 1 month ago
See
this blog post for screenshots and information about configuration. There's also a sample application demonstrating configuration and usage.