According to some other posts, it looks only one application.properties
in the top-level aggregator project should be defined.
Then, in other modules, a specific file by module for related properties handled using @PropertyResource
.
It looks wildcard on property resources are not supported or not handled when using spring boot?!
Let's imagine we develop an engine application:
Modules: engine-core, engine-communication, engine-launcher (module containing the spring boot application).
In the engine launcher module, I would like to define a configuration like this:
@Configuration
@PropertySource(value = "classpath*:/config/engine-*-config.properties", ignoreResourceNotFound = true)
public class EngineConfiguration { ... }
With related configuration files in the modules. When doing this, it looks these configuration files cannot be found.
What's the best way to have a modular/flexible configuration. Any ideas?