1. <dependencies></dependencies>
jar包依赖项
2. <dependency></dependency>
jar包坐标
3. <parent></<parent>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.9.RELEASE</version>
</parent>
spring-boot-starter-parent是SpringBoot的版本仲裁中心, 负责封装springboot程序中的全部公共jar包, 以后我们导入依赖默认是不需要写版本,由spring-boot-starter-parent决定好了
4. <build></build>
maven的操作方式
5. <plugins><plugins>
插件绑定
6. <plugin><plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
如果没有这个插件支持, 项目打成jar包, 启动类main方法将无法执行
负责maven项目的其他操作: 打包/clean/生成源码
7. Tomcat依赖所在包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
打开spring-boot-starter-web可以看到, 它依赖了spring-boot-starter-tomcat, spring-boot-starter-tomcat中包含了tomcat服务所必需的支持项
SpringBoot pom.xml几个标签作用
最新推荐文章于 2024-07-04 21:30:10 发布