public static void loadExternalSpringConfig ( RuntimeSpringConfiguration config , final GrailsApplication application ) { if ( springGroovyResourcesBeanBuilder == null ) { try { Class < ? > groovySpringResourcesClass = null ; try { groovySpringResourcesClass = ClassUtils . forName ( SPRING_RESOURCES_CLASS , application . getClassLoader ( ) ) ; } catch ( ClassNotFoundException e ) { // ignore } if ( groovySpringResourcesClass != null ) { reloadSpringResourcesConfig ( config , application , groovySpringResourcesClass ) ; } } catch ( Exception ex ) { LOG . error ( "[RuntimeConfiguration] Unable to load beans from resources.groovy" , ex ) ; } } else { if ( ! springGroovyResourcesBeanBuilder . getSpringConfig ( ) . equals ( config ) ) { springGroovyResourcesBeanBuilder . registerBeans ( config ) ; } } }
Loads any external Spring configuration into the given RuntimeSpringConfiguration object .