aouth2 clientDetailsService 配置 inMemory() or jdbc()
来源:2-2 代码结构介绍

qq_飞的感觉_0
2018-07-30
启动配置:
http.formLogin()
.successHandler(successHandler)
.failureHandler(failureHandler)
.and()
.authorizeRequests()
.anyRequest()
.authenticated();
http.authorizeRequests()
.antMatchers("/login")
.permitAll()
.anyRequest()
.authenticated()
.and()
.csrf()
.disable();
报一下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.clientDetailsService' defined in class path resource [org/springframework/security/oauth2/config/annotation/configuration/ClientDetailsServiceConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.ClientDetailsService]: Factory method 'clientDetailsService' threw exception; nested exception is java.lang.UnsupportedOperationException: Cannot build client services (maybe use inMemory() or jdbc()).
1回答
-
JoJo
2018-07-30
描述下场景,你在做哪块?在配OAuth2的认证服务器么?看错误是没配Client信息吧
00
Spring Security技术栈开发企业级认证与授权
2662 学习 · 1561 问题
相似问题