springboot(3)之yaml通过@configurationProperties和@value注入值

使用@configurationproperties 首先使用@comment在spring容器中注册javabean 然后@configurationproperties(prefix)定义前缀,就可以在yml中定义数据了 当value和configurationproperties同时出现时,以configurationproperties优先级高 使用@propertySource(valu
相关文章
相关标签/搜索