• Overview

  • Documentation

  • Requirements
    Spring Boot 3.3.2需要配套Java 17及以上的版本使用。

  • Installing

  • Upgrading
    对于使用1.X版本的项目,升级至当前的2.X及3.X版本时,需要详细阅读迁移指导

    升级SpringBoot版本后,组件的配置属性可能发生变化,通过阅读文档来比较差异费时费力,非常考验耐心。SprintBoot官方提供了组件spring-boot-properties-migrator来自动完成配置属性的分析工作。修改pom.xml,增加如下配置,可启用spring-boot-properties-migrator

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-properties-migrator</artifactId>
        <scope>runtime</scope>
    </dependency>
    
  • Tutorials

  • Developing Your First Spring Boot Application
    创建demo项目,项目的pom.xml,内容如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.example</groupId>
        <artifactId>demo</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <java.version>17</java.version>
            <maven.compiler.source>${java.version}</maven.compiler.source>
            <maven.compiler.target>${java.version}</maven.compiler.target>
            <spring-boot-starter.version>3.3.2</spring-boot-starter.version>
        </properties>
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>${spring-boot-starter.version}</version>
        </parent>
    </project>
    

    修改maven的配置文件settings.xml,增加国内代理的配置,如下:

    <mirrors>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <!--<mirrorOf>central</mirrorOf> -->
            <mirrorOf>*</mirrorOf>
        </mirror>
    </mirrors>
    

    使用IDEA或者eclipse,导入上述demo项目。

    在控制台执行命令mvn dependency:tree,查看demo项目当前的依赖。