Answer the question
In order to leave comments, you need to log in
How to take out the config from the Spring application (external customizable)?
Configs must be configured in such a way that they are not stored in the source code, but are substituted depending on the environment directly on the server.
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/application.properties</exclude>
</excludes>
</resource>
</resources>
@PropertySource(ignoreResourceNotFound=true, value="xxx")
but not sure if this is correct.
Answer the question
In order to leave comments, you need to log in
The answer is easily found by a search engine.
Here is a useful article - https://www.baeldung.com/spring-properties-file-ou... The
paths that Spring searches for configuration files by default:
A /config subdirectory of the current directory
The current directory
A classpath /config package
The classpath root
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question