玄月二十八 2019-05-24 15:26 采纳率: 0%
浏览 5791

这是什么错怎么解决啊???!!!

Description:

Field userDetailsService in com.dunan.zzjg.config.WebSecurityConfig required a bean of type 'org.springframework.security.core.userdetails.UserDetailsService' that could not be found.

The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)

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; 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

  • 写回答

2条回答 默认 最新

  • qyg_java 2019-05-24 15:32
    关注

    对象没有注入,仔细检查你的代码 。

    评论

报告相同问题?