【发布时间】:2019-06-28 16:26:24
【问题描述】:
我正在尝试用 @EnableWebFluxSecurity 注释 SecurityWebFilterChain 类:
@EnableWebFluxSecurity
public class AccessIqWebSecurityConfigurerAdapter {
我在启动应用程序时收到以下错误:
org.springframework.beans.factory.UnsatisfiedDependencyException: 创建具有名称的 bean 时出错 'org.springframework.security.config.annotation.web.reactive.WebFluxSecurityConfiguration': 通过字段表示的不满足的依赖关系 'securityWebFilterChains';嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建类中定义的名称为“springSecurityFilterChain”的bean 路径资源 [com/config/AccessIqWebSecurityConfigurerAdapter.class]: 通过工厂方法实例化 Bean 失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:失败 实例化 [org.springframework.security.web.server.SecurityWebFilterChain]: 工厂方法“springSecurityFilterChain”抛出异常;嵌套的 例外是 java.lang.IllegalArgumentException: clientRegistrationRepository 不能为空
当我删除compile("org.springframework.boot:spring-boot-starter-web")。有用。但我需要compile("org.springframework.boot:spring-boot-starter-web") 来表达招摇、Mockmvc 等任何想法?
【问题讨论】:
标签: spring-security spring-webflux