- 链接地址:https://blog.csdn.net/qq_33697094/article/details/111553288
- 链接标题:springboot读取yml配置文件_spring boot 读取 yml-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1337
文章浏览阅读1.2k次。springboot读取yml配置文件里的属性到Java代码,一般有两种常用方式:使用注解@ConfigurationProperties批量读取使用注解@Value单个读取示例yml文件:data: elasticsearch: cluster-name: elasticsearch cluster-nodes: 192.168.1.135:9200 scheme: http maxRetry_Timeout_Millis: 60000 sock_spring boot 读取 yml
版权声明:本文发布于特牛生活网 内容均来源于互联网 如有侵权联系删除