================ 案例解析之启动器 ================ ------------------------------------------------------- spring-boot-starter-tomcat-2.6.4.pom ------------------------------------------------------- ^ |_____________________________ | ------------------------------------------------------- | spring-boot-starter-web-2.6.4.pom | ------------------------------------------------------- | | org.springframework.boot | spring-boot-starter-tomcat - 2.6.4 compile org.springframework spring-web 5.3.16 compile org.springframework spring-webmvc 5.3.16 compile ------------------------------------------------------- ^ |_____________________________ | ------------------------------------------------------- | pom.xml | ------------------------------------------------------- | | org.springframework.boot | spring-boot-starter-web ---- ------------------------------------------------------- 每个starter都包含一系列JAR包依赖,以及对其它starter的依赖,形成依赖链。 Spring Boot项目只需要包含代表某种技术(比如Web)的starter,就自然包含了该技术所需要的全部依赖。 parent和starter并非包罗万象,如出现坐标错误,可以指定版本,但要避免冲突。