栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

springboot基础(23):springboot2.7.x临时属性bug

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

springboot基础(23):springboot2.7.x临时属性bug

前言

发现的springboot的bug

测试

使用的springboot版本2.6.9, 输出结果hello3

切换使用2.7.0或者2.7.1后(两个版本的结果一样),输出结果hello2

总结

翻阅官方文档:https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config

springboot 2.7.x 存在临时属性bug。该Bug已提交Github

官方回复:

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#springboottest-property-source-precendence

@SpringBootTest Property Source Precendence
Test property sources added by @SpringBootTest using either the properties attribute or the @TestPropertySource annotation are now added above the command line property source. If you are in the unlikely situation of having a @SpringBootTest that uses both properties and args (and with the same property name), you may need to change things around.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/993191.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号