Skip to content

Fixes: ConfigClientProperties#uri can't be set correctly as the ConfigClientProperties in BootstrapContext will be replaced #2623

Closed
519674304 wants to merge 1 commit intospring-cloud:mainfrom
519674304:main
Closed

Fixes: ConfigClientProperties#uri can't be set correctly as the ConfigClientProperties in BootstrapContext will be replaced #2623
519674304 wants to merge 1 commit intospring-cloud:mainfrom
519674304:main

Conversation

@519674304
Copy link
Copy Markdown

Every time org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver#resolveProfileSpecific be invoked, it will create a new ConfigClientProperties and replace the ConfigClientProperties in the BootstrapContext, but the ConfigClientProperties in the ConfigServerInstanceMonitor will be only set in the first time invoke.
Though, org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver#loadProperties will replace the org.springframework.cloud.config.client.ConfigClientProperties#uri if spring.cloud.config.discovery.enabled equals true, but the uri is get from the ConfigClientProperties from BootstrapContext which was replaced.

…e resolve properties so ConfigClientProperties should be fetched from ConfigServerInstanceMonitor
@ryanjbaxter
Copy link
Copy Markdown
Contributor

This PR should be made against the 4.1.x branch.

@519674304
Copy link
Copy Markdown
Author

This PR should be made against the 4.1.x branch.

Thanks, I will correct it.

@ryanjbaxter
Copy link
Copy Markdown
Contributor

Closing in favor of #2630

@ryanjbaxter ryanjbaxter closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants