spring-security-auth2的疑难杂症

进行IllegalStateException, UserDetailsService is required.

在进行走refresh_token的时候需要UserDetailsService

具体代码


   @Autowired
    private UserDetailsService userDetailsServiceBean;
    
    
 @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
       endpoints.tokenStore(tokenStore()).userDetailsService(userDetailsServiceBean);
    }

WuYiLong原创小于 1 分钟javasecurityauth2
spring-security-auth2

引入包

  <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-oauth2</artifactId>
        </dependency>

WuYiLong原创大约 2 分钟javasecurityauth2