我声明这两个依赖项的方式有什么不同?
我的项目是一个春季启动项目..。
这是我从Spring下载的:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-ldap</artifactId>
</dependency>这一张来自mvnrepository.com:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>Update,此文章展示了第三种方法:
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
</dependency>发布于 2019-04-11 19:57:16
第一个是Spring启动程序。根据文档
Starters是一组方便的依赖描述符,您可以在应用程序中包含这些描述符。您可以为您需要的所有Spring和相关技术提供一站式服务,而无需搜索示例代码和复制粘贴大量的依赖描述符。
pom.xml of spring-boot-starter-data-ldap包含以下依赖项定义:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-ldap</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>第二个:spring-security-ldap是maven中心的工件,对应于Spring项目。
https://stackoverflow.com/questions/55639846
复制相似问题