spring-cloud-consul
spring-cloud-consul copied to clipboard
@AutoConfigurationOrder doesn't seem to have any effect on the bootstrapping order anymore.
Question:
Upgrading from spring-boot 2.0.3 to 2.1.3 and spring-cloud Finchly.RELEASE to Greenwhich.RELEASE the work around in gist https://gist.github.com/mp911de/17f550ffecdc9e8f22061bfdf896bbb4 doesn't seem to be working anymore. Debugging it appears that the code is called but the "@AutoConfigureOrder(1)" no longer is placing the setting of "spring.cloud.consul.token" before the ConsulDiscoveryProperties are configured so the embedded aclToken is set to null instead the value extracted from Vault.
Changing the @AutoConfigurationOrder doesn't seem to have any effect on the bootstrapping order anymore. Open to suggestions on what else changed between these releases that could have broken the posted work around. We are trying to upgrade the framework to test other spring-cloud bug fixes but are blocked on getting the bootstrapping ordering correct.
https://github.com/spring-cloud/spring-cloud-vault/issues/58#issuecomment-479255720
I'm not sure we did anything to affect that.
@spencergibb is this something you you recreate it on your end to validate?
Following are dependencies:
<properties>
<spring-boot.framework.vesrion>2.1.3.RELEASE</spring-boot.framework.vesrion>
<spring-cloud.version>Greenwich.Release</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring-boot.framework.vesrion}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-consul-dependencies</artifactId>
<version>2.1.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-vault-dependencies</artifactId>
<version>2.1.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-vault-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-vault-config-consul</artifactId>
</dependency>
</dependencies>
Workaround code for Spring Cloud Vault is here: https://gist.github.com/mp911de/17f550ffecdc9e8f22061bfdf896bbb4
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
@spencergibb why did you reopen this? Is it a bug?
yes, I want to look at it and verify it.