SpringBoot的pom.xml文件的父级.pom文件

本文详细介绍了SpringBoot项目的pom.xml文件结构,包括pom.xml的父文件`spring-boot-starter-parent.pom`及其父文件`spring-boot-dependencies.pom`。当在pom.xml中找不到依赖时,可以通过查找父级pom文件来解决。文中举例说明了如何通过修改父级的父级pom文件中maven-resources-plugin的版本来消除警告并成功加载插件。
摘要由CSDN通过智能技术生成

SpringBoot的pom.xml文件的父级.pom文件

pom.xml文件

SpringBoot项目有一个pom.xml文件,pom.xml文件中别人已经帮我们自动导入了很多模块的gav坐标,但是直接去pom.xml文件中找这些模块是找不到的,因为自动导入的模块是存放在pom.xml文件的父元素中,如下图:

在这里插入图片描述

pom.xml文件的父文件–>spring-boot-starter-parent.pom文件

进入pom.xml文件的父级元素里面,看看父级元素里面都导入了什么,如下图:

在这里插入图片描述

spring-boot-starter-parent.po

```xml <!-- Spring Boot Starter Parent --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.2</version> <relativePath/> <!-- lookup parent from repository --> </parent> <!-- Spring Boot Starter Web --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- Spring Security --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <!-- Thymeleaf --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <!-- Thymeleaf Spring Security --> <dependency> <groupId>org.thymeleaf.extras</groupId> <artifactId>thymeleaf-extras-springsecurity5</artifactId> </dependency> <!-- Spring Boot Starter Test --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> ``` 注释说明: 1. Spring Boot Starter Parent:Spring Boot父级依赖,定义了 Spring Boot 的版本和依赖管理。 2. Spring Boot Starter Web:Spring Boot Web 组件的依赖,包含了 Spring MVC、Tomcat 等。 3. Spring Security:Spring Security 组件的依赖,提供了安全认证和授权功能。 4. Thymeleaf:Thymeleaf 模板引擎的依赖,用于生成 HTML 页面。 5. Thymeleaf Spring Security:Thymeleaf 和 Spring Security 集成的依赖,提供了 Thymeleaf 使用 Spring Security 的标签和属性。 6. Spring Boot Starter Test:Spring Boot 测试组件的依赖,包含了 JUnit、Mockito 等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Mr-X~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值