You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 31, 2022. It is now read-only.
In an auto-configuration library internally developed, I'm writing a REST controller that exposes CRUD operations based on the type of OAuth2 services beans that are found, something like this:
I want to only register a controller that exposes ClientDetailsService#loadClientByClientId if we do not have a ClientRegistrationService, and if we do have a registration service, to additionally register a controller that performs all other operations from that interface.
One of our modules that registers these controllers, also registers a JdbcClientDetailsService bean, which implements both interfaces. Yet, the @ConditionalOnBean(ClientRegistrationService::class) fails to match it, so only the first bean is created by not the second.
This is an example of how we declare the JdbcClientDetailsService:
In an auto-configuration library internally developed, I'm writing a REST controller that exposes CRUD operations based on the type of OAuth2 services beans that are found, something like this:
I want to only register a controller that exposes
ClientDetailsService#loadClientByClientId
if we do not have aClientRegistrationService
, and if we do have a registration service, to additionally register a controller that performs all other operations from that interface.One of our modules that registers these controllers, also registers a
JdbcClientDetailsService
bean, which implements both interfaces. Yet, the@ConditionalOnBean(ClientRegistrationService::class)
fails to match it, so only the first bean is created by not the second.This is an example of how we declare the
JdbcClientDetailsService
:The odd thing is that autowiring a
ClientRegistrationService
does successfully injectJdbcClientDetailsService
.The text was updated successfully, but these errors were encountered: