spring-boot源码刨析
1、环境准备
下载:https://github.com/spring-projects/spring-boot/releases 2.2.9Release版本
执行编译:
需要下载大量jar包,可以先配置一下maven镜像
<mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>
选择项目根pom.xml 导入idea
关闭代码检查,为了去掉pom报错
<properties> <revision>2.2.9.RELEASE</revision> <main.basedir>${basedir}</main.basedir> <disable.checks>true</disable.checks> </properties>
创建测试类,验证编译源码无误
@SpringBootApplication public class SpringBootMyTestApplication { public static void main(String[] args) { SpringApplication.run(SpringBootMyTestApplication.class, args); } }
2、源码刨析