grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Update Forge and Profiles to configure component-scan for base package

Open jamesfredley opened this issue 5 months ago • 3 comments

Issue description

annotate Application with @ComponentScan(value = 'com.mycompany.myapp.custom')

This removes the need to define the beans one by one for the base application package in grails-app/conf/spring/resources.groovy

jamesfredley avatar Jul 16 '25 15:07 jamesfredley

Why can't we just annotate Application with @ComponentScan(value = 'com.mycompany.myapp.custom')?

We already know the package as part of Application, why not by default add scanning as part of the Application AST transform?

jdaugherty avatar Jul 16 '25 15:07 jdaugherty

Updated description to annotate Application instead

jamesfredley avatar Jul 16 '25 19:07 jamesfredley

We may want to finish converting the core grails framework to @Configuration prior to doing this. Any bean loading could cause issues if we aren't consistently loading in the same way.

jdaugherty avatar Jul 22 '25 13:07 jdaugherty