摘要: 类型顺序 优先级 低到高 形成互补 <include>**/application*.yml</include> 1 <include>**/application*.yaml</include> 2 <include>**/application*.properties</include> 3 位 阅读全文
posted @ 2021-04-17 11:18 阿灿呀 阅读(123) 评论(0) 推荐(0)
摘要: springboot的配置文件不支持SPEL表达式 springboot的配置文件支持占位符和随机数 #占位符 user.username=黄汉山 user.hobbies=${user.username}打篮球 #随机数 my.secret=${random.value} my.number=${ 阅读全文
posted @ 2021-04-17 11:17 阿灿呀 阅读(475) 评论(0) 推荐(0)
摘要: @ConfigurationProperties(prefix = "user") 支持jsr-303数据检验 添加注解@Validated <!--jsr-303数据检验依赖--> <dependency> <groupId>org.springframework.boot</groupId> < 阅读全文
posted @ 2021-04-17 11:15 阿灿呀 阅读(288) 评论(0) 推荐(0)