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

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

发布了126 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_36880027/article/details/104345319