英文:
Cannot fetch cloud configurations when upgrading Spring Boot from 2.1.x to 2.3.3
问题
我的项目(微服务)正在使用Spring Boot 2.1.x和Spring Cloud Greenwich.SR5
。我想升级到Spring Boot 2.3.x(2.3.3 RELEASE
)和Spring Cloud(Hoxton.SR8
),但我遇到了一个问题,服务无法从云配置服务器(-Dspring.cloud.config.uri=http://config.abc
)中获取信息。
我发现https://github.com/spring-cloud/spring-cloud-config/blob/2.2.x/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java#L261 正在发送 V2_JSON
而不是 application/json
。
有人可以给我一些解决方案或变通方法吗?
英文:
My project (microservices) are using Spring Boot 2.1.x and Spring Cloud Greenwich.SR5
. I want to upgrade to Spring Boot 2.3.x (2.3.3 RELEASE
) and Spring Cloud (Hoxton.SR8
) but I face the issue that service cannot fetch information from the cloud config server(-Dspring.cloud.config.uri=http://config.abc
).
I found that https://github.com/spring-cloud/spring-cloud-config/blob/2.2.x/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java#L261 is sending V2_JSON
not application/json
.
Anyone can give me some solution or workaround?
答案1
得分: 1
我在这里提出了一个问题,希望这会有帮助:
https://github.com/spring-cloud/spring-cloud-config/issues/1715
英文:
I've raised an issue here, hopefully, It will helpful
https://github.com/spring-cloud/spring-cloud-config/issues/1715
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论