StackOverflowError in spring oauth2 with custom ClientDetailsService

后端 未结 4 459
面向向阳花
面向向阳花 2021-02-04 11:02

I made my own implementation of ClientDetailsService:

@Service
public class JpaClientDetailsService implements ClientDetailsService {
    @Autowired
    private          


        
4条回答
  •  情话喂你
    2021-02-04 11:11

    What ended up working for me was adding the ClientDetailsService @Bean to the @EnableAuthorizationServer class:

    @Configuration @EnableAuthorizationServer public class AuthorizationServerConfiguration implements AuthorizationServerConfigurer { ... @Autowired ClientDetailsService clientDetailsService; ... @Bean public ClientDetailsService clientDetailsService() { return new CustomClientDetailsServiceImpl(); } ... }

提交回复
热议问题