SpringBoot:通过@PropertySource注解修改默认加载的.properties文件

比如,一个名叫student的类,如果属性值是从config.properties中注入的,则需要使用@PropertySource注解,并且指定config.properties的路径 

posted @ 2020-02-16 17:15  昨夜昙花  阅读(22)  评论(0)    收藏  举报