摘要: 有四个位置。如下图: springboot 启动会扫描以下位置的application.properties或者application.yml文件作为Spring boot的默认配置文件: 优先级1:项目路径下的config文件夹配置文件优先级2:项目路径下配置文件优先级3:资源路径下的config 阅读全文
posted @ 2021-07-08 21:37 xhylyxwgd 阅读(59) 评论(0) 推荐(0)
摘要: 配置文件有两种 1.yaml yaml功能更强大,简洁; 编写yaml, server: port: 8081 person: name: yangwei age: ${random.int} sex: boy happy: true dog: name: ${person.hello:hello} 阅读全文
posted @ 2021-07-05 20:58 xhylyxwgd 阅读(66) 评论(0) 推荐(0)