Yes.
There are 3 ways a module can change the configuration of another module before it gets started:
@ModuleConfiguration
class in its extension packages. A @ModuleConfiguration
is like a regular @Configuration
which will be added to the target module instead of the module that declares it. See the reference documentation on @ModuleConfiguration
for more information.prepareForBootstrap()
method, which also allows registering additional configuration classes on other modules.AcrossModuleBeforeBootstrapEvent
and modify the module configuration at that point. Please note this requires your own module to have been started. You will only receive this event for modules that start after your own.An example of the practical use of module configuration extensions can be found in the AcrossHibernateJpaModule. Additional entities to scan are defined through module extensions.