已弃用的应用程序属性
以下已弃用的属性可以在你的 application.properties 文件、application.yaml 文件中指定,或作为命令行开关使用。对这些属性的支持将在未来的版本中移除,你应该尽快迁移 away from them。
提示
Spring Boot 提供了一个实用的 spring-boot-properties-migrator 工具,可帮助你从已弃用的属性迁移。要使用该属性迁移工具,请将以下依赖项添加到你的项目中:
- Maven
- Gradle
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
runtimeOnly("org.springframework.boot:spring-boot-properties-migrator")
一旦将其作为依赖项添加到你的项目中,该工具不仅会在启动时分析你的应用程序环境并打印诊断信息,还会在运行时临时为你迁移属性。
迁移完成后,请记得移除该依赖项。
已弃用的 Actuator 属性
已弃用的核心属性
已弃用的数据迁移属性
已弃用的数据属性
已弃用的集成属性
已弃用的 JSON 属性
| 名称 | 描述 | 默认值 |
|---|---|---|
spring.gson.lenient | 已被 spring.gson.strictness 取代 |
已弃用的 Server 属性
| 名称 | 描述 | 默认值 |
|---|---|---|
server.undertow.allow-encoded-slash | 已被 server.undertow.decode-slash 替代 | false |