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>
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:
Sample
Using this config in application.yml:
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: