External configuration for spring-boot application

后端 未结 4 1573
余生分开走
余生分开走 2020-12-02 11:13

I have a spring-boot application which I want to run with external configuration file. When I run it as jar (with embedded servlet container), everything is fine. But I want

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 11:56

    You can add configuration files folder to set Classpath line catalina.bat, catalina.sh(which one if you want to use.) or you can add to setenv.bat/sh file. Your config files will be added to war classpath.

    For Example;

    In Windows env.

    set CLASSPATH=D:\app\conf
    

提交回复
热议问题