Is it possible to load multiple Spring-Boot .yml config files from a config
folder within parent module of a multi-module project?
So, structure looks like this:
parent-module/
pom.xml
config/
application-prd.yml
application-dev.yml
module1
pom.xml
src/main/resources/
logback-spring.xml
bootstrap.yml
Is this possible? How can it be done?
So, if I execute from root folder of multi-module project, I would use this command:
mvn -pl module1 spring-boot:run
OR
mvn spring-boot:run
And I would hope that the config
folder would be included in the classpath? I am trying to do this but not getting it to work. Am I missing something?
We know this to be true: Child POMs inherit properties, dependencies, and plugin configurations from the parent.
But shouldn't that mean that {parent}/config/application.yml
is in the classpath already?
Example project to use for proving: https://github.com/djangofan/spring-boot-maven-multi-module-example . Clone it and modify if you think you can solve it.