@Slf4j
@Component
@ConditionalOnBean(GoogleTokenFeignClient.class)
public class GoogleAuthenticationProvider {
@ConditionalOnProperty(name = "google.token.url")
@FeignClient(name = "google-token-feign-client", url = "${google.token.url}")
public interface GoogleTokenFeignClient {
My goal is to create a bean of type GoogleTokenFeignClient when the google.token.url configuration exists, which in turn will create a bean of type GoogleAuthenticationProvider. However, it seems that the Feign client bean is not the same as the Spring bean and is still lazily loaded. Therefore, GoogleAuthenticationProvider cannot be created. What should I do?
I am sure “google.token.url” exists.
Use @Lazy(value = false), does not work