> For the complete documentation index, see [llms.txt](https://jihoony.gitbook.io/developers-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jihoony.gitbook.io/developers-notes/developer/readme/spring/spring-properties-file-outside-jar.md).

# Spring Properties File Outside jar

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&#x20;*****application.properties*****&#x20;and placed in the&#x20;*****/config*****&#x20;subdirectory of the current directory will be loaded.** This will also override properties in other locations in case of a collision.

{% embed url="<https://www.baeldung.com/spring-properties-file-outside-jar>" %}

{% embed url="<https://www.baeldung.com/properties-with-spring>" %}

{% embed url="<https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties>" %}
