我为我的个人锻炼项目做一个依赖项目。然后,我想导入spring-boot-starter-security
,它构建成功,并且依赖关系树显示正确,但是我在库中找不到安全罐。
这是我的运动项目pom:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
这是我的共享pom,它是上述项目的父项目:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>${spring.boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
spring.boot.version:2.1.6。发布
我的锻炼项目依赖关系树:
[INFO] com.personal:auth:jar:1.0-SNAPSHOT
[INFO] +- org.projectlombok:lombok:jar:1.18.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.1.6.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.1.5.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.1.5.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.1.5.RELEASE:compile
[INFO] \- junit:junit:jar:4.12:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
确保我的本地存储库中有这些jar。 我的lib:
更新:
每次更改pom时,都会重新导入项目或执行mvn clean install
,并且结果始终相同。