我正在跟踪此链接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)