spring boot external config

后端 未结 5 1117
清歌不尽
清歌不尽 2020-12-30 04:59

I am trying to load an external properties file into my spring boot app. initially I used @PropertySource in the config class. but now I want to remove this annotation so th

5条回答
  •  囚心锁ツ
    2020-12-30 05:54

    It might not be a common issue, but I faced it. You also must have an application.properties inside your classpath even when you replace it with --spring.config.name (I had mine in gitignore due to sensitive information).

提交回复
热议问题