spring-cloud-config: Breaking change in 3.1.8: using config.import with gives "[//] give is not a valid HTTP URL"
Describe the bug
After upgrading from 3.1.7 to 3.1.8 using config.import with optional and using default βπ/β gives a β[//] is not a valid HTTP URL errorβ.
Stacktrace:
Caused by: java.lang.IllegalArgumentException: [//] is not a valid HTTP URL
at org.springframework.web.util.UriComponentsBuilder.fromHttpUrl(UriComponentsBuilder.java:316)
Sample Using this config in application.yml:
spring:
config.import:
- optional:vault://
- optional:configserver:${SPRING_CLOUD_CONFIG_URI://}
As reference this should still be valid use: Conditionally enable/disable Vault Configuration In some cases, it can be required to launch an application without Vault. You can express whether a Vault config location should be optional or mandatory (default) through the location string:
optional:vault:// (default location)
See: https://docs.spring.io/spring-cloud-vault/docs/current/reference/html/config-data.html
Using these dependencies:
<spring-boot.version>2.7.13</spring-boot.version>
<spring-cloud.version>2021.0.8</spring-cloud.version>
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Fix IllegalArgumentException in equals and hashcodes. Fixes #2304 — committed to ryanjbaxter/spring-cloud-config by ryanjbaxter a year ago
- Fix IllegalArgumentException in equals and hashcodes. Fixes #2304 (#2307) Co-authored-by: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> — committed to spring-cloud/spring-cloud-config by ryanjbaxter a year ago
Thanks Ryan, itβs clear to me now. π
In our setup I will go forward to moving the config.import to the specific cloud profile. So not use it in the default.
Correct the fix went into the 3.1.x, 4.0.x, and main branches