一、下载源码
- 点击下载地址
- 本次源码选择1.5.9版本,仅因为视频教程的版本为1.5.9,不想再调试或者编译的过程中出现其他不可抗力,所以选择了较低版本。当然也可以自行选择高版本。
- 点击 clone or download下载到本地并解压缩
二、编译源码
mvn clean install -DskipTests -Pfast
- 第一次编译出错:
[INFO] Reactor Summary for Spring Boot Build 1.5.9.RELEASE:
[INFO]
[INFO] Spring Boot Dependencies ........................... SUCCESS [ 3.510 s]
[INFO] Spring Boot Parent ................................. SUCCESS [ 0.799 s]
[INFO] Spring Boot Tools .................................. SUCCESS [ 0.111 s]
[INFO] Spring Boot Loader ................................. SUCCESS [ 2.271 s]
[INFO] Spring Boot Loader Tools ........................... SUCCESS [ 1.092 s]
[INFO] Spring Boot Antlib ................................. SUCCESS [ 6.444 s]
[INFO] Spring Boot Testing Support ........................ SUCCESS [ 0.449 s]
[INFO] Spring Boot Auto-Configure Annotation Processor .... SUCCESS [ 0.455 s]
[INFO] Spring Boot Configuration Metadata ................. SUCCESS [ 0.405 s]
[INFO] Spring Boot Configuration Processor ................ SUCCESS [ 0.629 s]
[INFO] Spring Boot Gradle Plugin .......................... FAILURE [01:09 min]
[INFO] Spring Boot Maven Plugin ........................... SKIPPED
[INFO] Spring Boot ........................................ SKIPPED
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:27 min
[INFO] Finished at: 2019-12-10T20:29:49+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-boot-gradle-plugin: Could not resolve dependencies for project org.springframework.boot:spring-boot-gradle-plugin:jar:1.5.9.RELEASE: The following artifacts could not be resolved: org.gradle:gradle-platform-jvm:jar:2.9, org.gradle:gradle-plugins:jar:2.9: Could not transfer artifact org.gradle:gradle-platform-jvm:jar:2.9 from/to spring-ext (http://repo.spring.io/ext-release-local/): Transfer failed for http://repo.spring.io/ext-release-local/org/gradle/gradle-platform-jvm/2.9/gradle-platform-jvm-2.9.jar: Connect to repo.spring.io:80 [repo.spring.io/35.241.58.96] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :spring-boot-gradle-plugin
D:\springboot\spring-boot-1.5.9.RELEASE>mvn clean -rf :spring-boot-gradle-plugin
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[INFO] Spring Boot Gradle Plugin … FAILURE [01:09 min]
于是先忽略了这个:控制台里有一句:
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :spring-boot-gradle-plugin
执行了这条语句后
Spring Boot Gradle Plugin .......................... SUCCESS [ 0.140 s]
[INFO] Spring Boot Maven Plugin ........................... SUCCESS [ 6.979 s]
[INFO] Spring Boot ........................................ SUCCESS [ 0.016 s]
[INFO] Spring Boot Test ................................... SUCCESS [ 0.015 s]
[INFO] Spring Boot AutoConfigure .......................... SUCCESS [ 0.032 s]
[INFO] Spring Boot Test Auto-Configure .................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Actuator ............................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Developer Tools ........................ SUCCESS [ 0.016 s]
[INFO] Spring Boot Docs ................................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Starters ............................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Logging Starter ........................ SUCCESS [ 0.031 s]
[INFO] Spring Boot Starter ................................ SUCCESS [ 0.016 s]
[INFO] Spring Boot ActiveMQ Starter ....................... SUCCESS [ 0.015 s]
[INFO] Spring Boot AMQP Starter ........................... SUCCESS [ 0.016 s]
[INFO] Spring Boot AOP Starter ............................ SUCCESS [ 0.031 s]
[INFO] Spring Boot Artemis Starter ........................ SUCCESS [ 0.016 s]
[INFO] Spring Boot JDBC Starter ........................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Batch Starter .......................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Cache Starter .......................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Spring Cloud Connectors Starter ........ SUCCESS [ 0.032 s]
[INFO] Spring Boot Data Cassandra Starter ................. SUCCESS [ 0.015 s]
[INFO] Spring Boot Data Couchbase Starter ................. SUCCESS [ 0.032 s]
[INFO] Spring Boot Data Elasticsearch Starter ............. SUCCESS [ 0.015 s]
[INFO] Spring Boot Data GemFire Starter ................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Data JPA Starter ....................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Data LDAP Starter ...................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Data MongoDB Starter ................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Data Neo4j Starter ..................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Data Redis Starter ..................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Tomcat Starter ......................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Web Starter ............................ SUCCESS [ 0.031 s]
[INFO] Spring Boot Data REST Starter ...................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Data Solr Starter ...................... SUCCESS [ 0.015 s]
[INFO] Spring Boot FreeMarker Starter ..................... SUCCESS [ 0.032 s]
[INFO] Spring Boot Groovy Templates Starter ............... SUCCESS [ 0.031 s]
[INFO] Spring Boot HATEOAS Starter ........................ SUCCESS [ 0.015 s]
[INFO] Spring Boot Integration Starter .................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Validation Starter ..................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Jersey Starter ......................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Jetty Starter .......................... SUCCESS [ 0.046 s]
[INFO] Spring Boot JOOQ Starter ........................... SUCCESS [ 0.017 s]
[INFO] Spring Boot Atomikos JTA Starter ................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Bitronix JTA Starter ................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Narayana JTA Starter ................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Log4j 2 Starter ........................ SUCCESS [ 0.032 s]
[INFO] Spring Boot Mail Starter ........................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Mobile Starter ......................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Mustache Starter ....................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Actuator Starter ....................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Starter Parent ......................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Security Starter ....................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Social Facebook Starter ................ SUCCESS [ 0.023 s]
[INFO] Spring Boot Social Twitter Starter ................. SUCCESS [ 0.014 s]
[INFO] Spring Boot Social LinkedIn Starter ................ SUCCESS [ 0.016 s]
[INFO] spring-boot-starter-remote-shell (DEPRECATED) ...... SUCCESS [ 0.015 s]
[INFO] Spring Boot Test Starter ........................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Thymeleaf Starter ...................... SUCCESS [ 0.032 s]
[INFO] Spring Boot Undertow Starter ....................... SUCCESS [ 0.015 s]
[INFO] Spring Boot WebSocket Starter ...................... SUCCESS [ 0.032 s]
[INFO] Spring Boot Web Services Starter ................... SUCCESS [ 0.031 s]
[INFO] Spring Boot Actuator Docs .......................... SUCCESS [ 0.015 s]
[INFO] Spring Boot CLI .................................... SUCCESS [01:06 min]
[INFO] Spring Boot Integration Tests ...................... SUCCESS [02:16 min]
[INFO] Spring Boot DevTools Tests ......................... SUCCESS [ 0.015 s]
[INFO] Spring Boot Embedded Servlet Container Integration Tests SUCCESS [ 0.016 s]
[INFO] Spring Boot Gradle Integration Tests ............... SUCCESS [ 0.016 s]
[INFO] Spring Boot Launch Script Integration Tests ........ SUCCESS [ 0.015 s]
[INFO] Spring Boot Security Tests ......................... SUCCESS [ 0.016 s]
[INFO] Spring Boot Security Tests - Web Hello World ....... SUCCESS [ 0.016 s]
[INFO] Spring Boot Build .................................. SUCCESS [ 0.448 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:32 min
[INFO] Finished at: 2019-12-10T20:36:43+08:00
[INFO] ------------------------------------------------------------------------