为什么在Spring启动项目中找不到类SecurityEvaluationContextExtension?
我有一个基于spring boot的项目,在pom.xml中有以下声明:为什么在Spring启动项目中找不到类SecurityEvaluationContextExtension?,spring,spring-security,spring-boot,spring-data-rest,Spring,Spring Security,Spring Boot,Spring Data Rest,我有一个基于spring boot的项目,在pom.xml中有以下声明: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.2.RELEASE</version> <relativePath/
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
我不是舒尔,你所说的“春天不来了……” 但是要使用这个扩展,您必须创建这种类型的bean,请参见 编辑:
你得到的警告没有问题。您可以尝试从依赖项中删除该版本,因为它似乎可以通过dependencyManagement获得。通过引入,我的意思是,当我们添加一个maven依赖项,如
spring boot starter data rest
时,它会引入其他依赖项。我现在编辑了这个问题,并提到类路径中缺少该类。在pom.xml中直接添加了spring安全数据
,问题得到了解决,但得到了警告。见更新的问题
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-data</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>