I'm able to get values from the application's application.properties using grailsApplication.metadata[key]
, but I'm having a hard time getting the same for a loaded Grails plugin.
I've tried grailsApplication.mainContext.getBean('pluginManager').allPlugins
but the instances in that list don't contain the values from the plugins' applications.properties files.
I've also tried GrailsPluginUtils.getMetadataForPlugin(pluginName)
, but that doesn't return the values from applications.properties either. (In fact, I usually get null.)
Is there a way to get to these values at runtime?