By default, Spring Boot will look in the working directory for external application.properties and application.yml files. For example, if you start your Spring Boot app in the same directory as the JAR:
java -jar myapp.jar
Then this will look for application.properties (or application.yml or application-{profile}.properties etc.) in the same directory as your JAR file. This means if you set up your directory like so:
myapp/ | - myapp.jar | - application.properties
And start the app within that directory, then it will automatically pick up the application.properties there.
If this isn't an option for you, the spring.config.location property can be specified on the command to give it additional locations to use when looking for configuration files, e.g.:
java -jar myapp.jar --spring.config.location=file:/etc/myapp/
For more info, read up on Spring Boot's Externalized Configuration documentation.