In my spring boot project I use a module, which provides a @Configuration
class. The configuration ist imported via @Import(ConfigurationFromModule.class)
in Application
class.
The configuration from the module needs to happen before a certain AutoConfiguration
. Unfortunately annotations defining the order of configurations seem to be ignored in the modules classes.
I annotated the Configuration with @AutoConfigureBefore({SomeBuildInAutoConfiguration.class})
, but still SomeBuildInAutoConfiguration
was triggered before ConfigurationFromModule
.
Out of curiosity I tried to annoatate ConfigurationFromModule
with @AutoConfigureOrder(1)
and @Primary
- but they don't change anything.
For @Configuration
classes within the main applications all those annotations work as expected.
How to define order of AutoConfiguration within a module?