无法在将Spring Boot从2.1.x升级到2.3.3时获取云配置。

huangapple go评论108阅读模式
英文:

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

huangapple
  • 本文由 发表于 2020年9月25日 10:47:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/64057092.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定