Released Grails spy plugin
While digging through the inner workings of Grails in order to improve my OSGi plugin, it is sometimes necessary to inspect the GrailsApplication object and its companion Spring ApplicationContext(s).
As most of the beans of the Grails WebApplicationContext are constructed at runtime with the help of a
BeanBuilder, there is no Spring xml file with bean definitions.
Only the main application context can be inspected, e.g. by extracting it from the generated war file:
jinspect -a target/myapp-0.1.war
In order to browse the dynamic bean definitions I created a little plugin called Grails Spy, which can be used to watch into an application’s guts.
The Spy plugin is released under the Apache License 2.0.
Source code and Issues
As always, simply execute
grails install-plugin spy.
Note: until the Grails plugin page is sync’ed, the plugin can also be installed using
Simply browse to http://localhost:8080/myapp/spy/ and have a closer look.
Note: this path is NOT PROTECTED, so don’t do this in a production environment! Or at least use one of the security plugins to protect this page.
Eye-candy you say? See below:
GrailsSpy: ApplicationContext view
GrailsSpy: bean view