gsartori commented on issue #15075: URL: https://github.com/apache/grails-core/issues/15075#issuecomment-3566903468
After further investigation I was able to reproduce the issue. ### Steps To Reproduce - clone: `https://github.com/gsartori/grails7-init-double-call` - Set a breakpoint in `app-test/grails-app/init/test/app/BootStrap` at line 20 - `bootRun app-test` (debug) ### DESCRIPTION We use the following code in our main plugin to be able to autmatically inject Spring `@Component` without requiring further configuration. This is the cause of the double `BootStrap.init()` execution. ``` Closure doWithSpring() { {-> // See: https://github.com/grails/grails-core/issues/3164 xmlns context: 'http://www.springframework.org/schema/context' context.'component-scan' 'base-package': 'test' } } ``` ### NOTE It would be great is this could be the default Grails behaviour. Spring `@Component` should be first class citizens in Grails. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
