There are 3 ways a module can change the configuration of another module before it gets started:
@ModuleConfigurationclass in its extension packages. A
@ModuleConfigurationis like a regular
@Configurationwhich will be added to the target module instead of the module that declares it. See the reference documentation on
@ModuleConfigurationfor more information.
prepareForBootstrap()method, which also allows registering additional configuration classes on other modules.
AcrossModuleBeforeBootstrapEventand 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.