How to externalize application.properties in Tomcat webserver for Spring?

后端 未结 8 2214
终归单人心
终归单人心 2020-12-10 01:59

SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment:



        
8条回答
  •  [愿得一人]
    2020-12-10 02:09

    Using Tomcat 9.0.27

    Running Spring boot 2.2.1

    I did setup setenv.sh and added the line

    export spring_config_location=//application.properties
    

    and got it to work..

提交回复
热议问题