Внутренняя ошибка сервера при попытке защитить остальные API с помощью oauth2.0 - PullRequest
0 голосов
/ 21 декабря 2018

Я перешел по этой ссылке http://sivatechlab.com/how-to-create-a-rest-api-using-spring-mvc/, пытаясь защитить остальные API, используя oAuth2.0.

У меня ошибка сервера, которая говорит об ошибке при создании компонента.Я попытался удалить архив безопасности Spring и снова построить проект, но ничего не произошло.

Я ожидал 401 при доступе к localhost: 8080 / oAuthExample / api / Customers.

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)
...