Spring Boot 3.0系列【5】基础篇之应用配置文件
有道无术,术尚可求,有术无道,止于术。
本系列Spring Boot版本3.0.3
源码地址:https://gitee.com/pearl-organization/study-spring-boot3
文章目录
-
- 前言
- 应用配置文件
-
- 文件格式
- YAML
- 获取配置属性
-
- 方式1:@Value
- 方式2: @ConfigurationProperties
- 方式3: @PropertySource
- 方式4: 注入Environment获取
- 配置文件添加提示功能
-
- 1. spring-boot-configuration-processor
- 2. 案例演示