Closed limo520 closed 5 months ago
The following class trys to do this , but it takes no effect currently.
org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration$DiscoveryClientOptionalArgsTlsConfiguration
It seems that EurekaServerAutoConfiguration
is registered after DiscoveryClientOptionalArgsTlsConfiguration
, which results in failing to match @ConditionalOnBean(value = AbstractDiscoveryClientOptionalArgs.class, search = SearchStrategy.CURRENT)
on DiscoveryClientOptionalArgsTlsConfiguration
Hi @limo520, thanks for reporting the issue. Please provide a minimal, complete, verifiable example that reproduces the issue.
@OlgaMaciaszek there is an example, https://github.com/limo520/spring-cloud-netflix-issues-4268
Thanks, @limo520; so if I understand correctly, the scenario is to use TLS with the JerseyClient provided by EurekaServer for intra-peer EurekaServer communication, yes? And the Eureka Server's Jersey3DiscoveryClientOptionalArgs
bean is created after DiscoveryClientOptionalArgsConfiguration
's setup is processed, therefore it's not taken into account? Have added a draft solution that may address this. @spencergibb does this look ok to you?
@OlgaMaciaszek Yes, you are right. And when I wrote the example, I find another similar issue which can be reproduced by removing eureka.server.my-url
in application.yml. It seems becuase of Jersey3ReplicationClient
, but I haven't found it out.
When SSL for EurekaServer is enabled, I have to define my own
jersey3DiscoveryClientOptionalArgs
bean. It seems we can do this by default, asDiscoveryClientOptionalArgsConfiguration.java
does.DiscoveryClientOptionalArgsConfiguration.java
is a part ofspring-cloud-netflix-eureka-client
, which is one dependency ofspring-cloud-netflix-eureka-server
. And it has already defined aTlsProperties
bean too.