SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment:
for tomcat 9 on Ubuntu 18.04 and spring boot 2, create setenv.sh file under $CATALINA_HOME/bin/ working for me:
#!/bin/bash export spring_config_additional_location="/opt/tomcat/latest/conf/application.properties"
don't forget to set file permission if needed