‘org.springframework.security.core.userdetails.UserDetailsService’ that could not be found
今天遇见个特别傻的问题,在启动springboot的启动器是出现以下错误
Error starting ApplicationContext. To display the conditions report re-run your application with'debug' enabled.2020-06-1215:40:29.680ERROR6864---[ main] o.s.b.d.LoggingFailureAnalysisReporter :***************************APPLICATIONFAILEDTOSTART***************************
Description:A component required a bean of type 'org.springframework.security.core.userdetails.UserDetailsService' that could not be found.
The following candidates were found but could not be injected:- Bean method 'inMemoryUserDetailsManager'in'UserDetailsServiceAutoConfiguration' not loaded because @ConditionalOnMissingBean(types: org.springframework.security.authentication.AuthenticationManager,org.springframework.security.authentication.AuthenticationProvider,org.springframework.security.core.userdetails.UserDetailsService,org.springframework.security.oauth2.jwt.JwtDecoder,org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector; SearchStrategy: all) found beans of type 'org.springframework.security.authentication.AuthenticationManager' authenticationManager
Action:
Consider revisiting the entries above or defining a bean of type 'org.springframework.security.core.userdetails.UserDetailsService'in your configuration.
Process finished with exit code 1