spring-boot-configuration-processor的作用
2021-06-15 21:06
阅读:546
标签:roc proc work color XML conf framework ati depend
spring默认使用yml中的配置,但有时候要用传统的xml或properties配置,就需要使用spring-boot-configuration-processor了
先引入pom依赖
1 dependency> 2 groupId>org.springframework.bootgroupId> 3 artifactId>spring-boot-configuration-processorartifactId> 4 optional>trueoptional> 5 dependency>
再在你的配置类开头加上@PropertySource("classpath:your.properties"),其余用法与加载yml的配置一样
spring-boot-configuration-processor的作用
标签:roc proc work color XML conf framework ati depend
原文地址:https://www.cnblogs.com/evasean/p/9728817.html
上一篇:python的字符串操作
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:spring-boot-configuration-processor的作用
文章链接:http://soscw.com/essay/94294.html
文章标题:spring-boot-configuration-processor的作用
文章链接:http://soscw.com/essay/94294.html
评论
亲,登录后才可以留言!