springBoot 2.2.x源码环境构建

1.从github下载源码:https://github.com/spring-projects/spring-boot 

2.由于github走的是国外的下载链接,下载方式会很慢,本人推荐使用码云的地址:

可以自由选择zip包下载或者是git下载

zip下载

springBoot 2.2.x源码环境构建

git下载方式:

git clone -b 2.2.x https://gitee.com/ljb-gitee/spring-boot下载,2.2.x是我要下载的版本号,可以自由选择对应的版本号

springBoot 2.2.x源码环境构建

3.本地环境安装maven,我这里是安装3.6.2,添加阿里源,如果不添加的话,编译会慢死

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

4.执行:进入springboot根目录下 执行mvn clean install -DskipTests -Pfast,执行成功类似下图

springBoot 2.2.x源码环境构建

5.执行命令:mvn spring-javaformat:apply 解决格式化的问题 

6.执行命令:

导入eclipse执行此步

mvnw eclipse:eclipse 创建eclipse项目,转换需要点时间,耐心等待

导入idea执行此步

执行命令:mvn idea:idea 创建idea项目,转换需要点时间,耐心等待

 

注:导入项目之后,报错

Plugin execution not covered by lifecycle configuration: io.spring.javaformat:spring-javaformat-maven-plugin:0.0.22:validate (execution: default, phase: validate)

解决方案:

springboot根目录执行命令:mvn spring-javaformat:apply 解决格式化的问题