SpringBoot 常用读取配置文件的 3 种方法

SpringBoot 常用读取配置文件的 3 种方法!

reffer to:

https://www.cnblogs.com/qdhxhz/p/16719936.html

1、Spring Boot有哪些常用的读取配置文件方式?

1)使用 @Value 读取配置文件

2) 使用 @ConfigurationProperties 读取配置文件

3)使用 Environment 读取配置文件

posted @ 2022-09-28 11:15  zzs2014  阅读(22)  评论(0编辑  收藏  举报