Application Info

  • Tags : /
  • Latest : 1.1.1
  • Last Updated: 20 March 2014
  • Grails version : 2.0 > *
7 votes
Dependency :
compile ":app-info:1.1.1"

Documentation Source Issues

Summary

UI for inspecting various aspects of the application's configuration

Installation

Add a dependency in BuildConfig.groovy:

runtime ":app-info:1.0.3"

Description

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:

  • 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
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.

Please report any bugs or feature requests in JIRA.