Spring Properties File Outside jar
Last updated
Last updated
By convention, Spring Boot looks for an externalized configuration file — application.properties or application.yml — in four predetermined locations in the following order of precedence:
A /config subdirectory of the current directory
The current directory
A classpath /config package
The classpath root
Therefore, a property defined in application.properties and placed in the /config subdirectory of the current directory will be loaded. This will also override properties in other locations in case of a collision.