Spring Boot 版本列表

Spring Boot 版本列表

Spring Boot 版本列表

Spring Boot 最新版本官网地址

注意: Spring Boot 版本变化快,最新版本以官网为准。

Spring Framework Spring Boot System Requirements boot support
5.3.31+ 2.7.18 Java 8+/Maven 3.5+/Gradle 6.8.x+/Tomcat 9.0/Undertow 2.0 2.7.x/2022-05-19/2023-06-30
6.0.14+ 3.0.13 Java 17/Maven 3.5+/Gradle 7.5+/Tomcat 10.1/Undertow 2.3 3.0.x/2022-11-24/2023-12-31
6.0.21+ 3.1.12 Java 17/Maven 3.6.3+/Gradle 7.5+/Tomcat 10.1/Undertow 2.3 3.1.x/2023-05-18/2024-06-30
6.1.x+ 3.2.12 Java 17/Maven 3.6.3+/Gradle 7.5+/Tomcat 10.1/Undertow 2.3 3.2.x/2023-11-23/2024-12-31
6.1.17+ 3.3.9 Java 17/Maven 3.6.3+/Gradle 7.5+/Tomcat 10.1.25+/Undertow 2.3 3.3.x/2024-05-23/2025-06-30
6.2.11+ 3.4.10 Java 17/Maven 3.6.3+/Gradle 7.x+/Tomcat 10.1.25+/Undertow 2.3+ 3.4.x/2024-11/2025-12
6.2.11+ 3.5.6 Java 17/Maven 3.6.3+/Gradle 7.6.4+/Tomcat 10.1.25+/Undertow 2.3+ 3.5.x/2025-05/2026-06

Spring Cloud 版本官方列表

注意: Spring Cloud 版本变化快,最新版本以官网为准。

spring cloud spring boot
2021.0.9 2.6.15
2022.0.5 3.0.13
2023.0.5 3.2.12
2024.0.2 3.4.7

Externalized Configuration Link

  1. Command line arguments.
  2. Java System properties (System.getProperties()).
  3. OS environment variables.
  4. Config data (such as application.properties files).

Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values. Later property sources can override the values defined in earlier ones. Sources are considered in the following order:

  1. Default properties (specified by setting SpringApplication.setDefaultProperties).
  2. @PropertySource annotations on your @Configuration classes. Please note that such property sources are not added to the Environment until the application context is being refreshed. This is too late to configure certain properties such as logging.* and spring.main.* which are read before refresh begins.
  3. Config data (such as application.properties files).
  4. A RandomValuePropertySource that has properties only in random.*.
  5. OS environment variables.
  6. Java System properties (System.getProperties()).
  7. JNDI attributes from java:comp/env.
  8. ServletContext init parameters.
  9. ServletConfig init parameters.
  10. Properties from SPRING_APPLICATION_JSON (inline JSON embedded in an environment variable or system property).
  11. Command line arguments.
  12. properties attribute on your tests. Available on @SpringBootTest and the test annotations for testing a particular slice of your application.
  13. @DynamicPropertySource annotations in your tests.
  14. @TestPropertySource annotations on your tests.
  15. Devtools global settings properties in the $HOME/.config/spring-boot directory when devtools is active.

Config data files are considered in the following order:

  1. Application properties packaged inside your jar (application.properties and YAML variants).
  2. Profile-specific application properties packaged inside your jar (application-{profile}.properties and YAML variants).
  3. Application properties outside of your packaged jar (application.properties and YAML variants).
  4. Profile-specific application properties outside of your packaged jar (application-{profile}.properties and YAML variants).

It is recommended to stick with one format for your entire application. If you have configuration files with both .properties and YAML format in the same location, .properties takes precedence.

External Application Properties Link

Spring Boot will automatically find and load application.properties and application.yaml files from the following locations when your application starts:

  1. From the classpath
    1. The classpath root
    2. The classpath /config package
  2. From the current directory
    1. The current directory
    2. The config/ subdirectory in the current directory
    3. Immediate child directories of the config/ subdirectory

The list is ordered by precedence (with values from lower items overriding earlier ones). Documents from the loaded files are added as PropertySources to the Spring Environment.

相关内容