尝试使用oauth2.0保护其余API时发生内部服务器错误

时间:2018-12-21 16:22:56

标签: spring-mvc oauth-2.0

我正在跟踪此链接http://sivatechlab.com/how-to-create-a-rest-api-using-spring-mvc/,试图使用oAuth2.0保护其余api。

我遇到服务器错误,提示 创建bean时出错。 我尝试删除spring安全jar并再次构建项目,但没有任何反应。

我在访问localhost:8080 / oAuthExample / api / customers时期望401。

Error creating bean with name 'securityConfigurations': Unsatisfied dependency expressed through field 'clientDetailsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.security.oauth2.provider.ClientDetailsService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)

0 个答案:

没有答案