In my Grails plugin, I define the following Spring beans
def doWithSpring = {
configHelper(ConfigObjectHelper)
String appName = configHelper.getAsString('ftp.general.appName')
pkApplication(Application, appName)
}
When I call configHelper.getAsString, I get a NullPointerException because it configHelperdoes not refer to the bean that I created in the previous line. Instead, Grails looks for a property / field of the current class with this name. Since none of them exist, I get a NullPointerException.
Is there a way to get a link to Spring bean within closure doWithSpring?
thank
Dónal source
share