我们曾经在 spring boot 2.2 上运行我们的微服务,但我们决定升级到最新的 SB 2.4.5,在一项服务中,我们启用了新配置文件的使用。
我们将此新功能主要用于本地开发覆盖。
当涉及到我们的云部署时,使用配置服务器推送配置。不幸的是,配置服务器不再设置某些属性:
***************************
APPLICATION FAILED TO START
• Description:
Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'vmr' to com.solace.maas.mop.VMRProperties failed:
Property: vmr.vpnname
Value: null
Reason: must not be empty
Property: vmr.username
Value: null
Reason: must not be empty
Property: vmr.host
Value: null
Reason: must not be empty
Property: vmr.password
Value: null
Reason: must not be empty
Action:
Update your application's configuration
这些vmr
属性用于由配置服务器设置。
我有什么明显的遗漏吗?任何故障排除的想法?
谢谢!
=============更新=================
<spring-cloud.version>2020.0.2</spring-cloud.version>
<dependencyManagement>
<dependencies>
<!-- Spring Cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
[INFO] +- org.springframework.cloud:spring-cloud-starter-config:jar:3.0.3:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:3.0.2:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:3.0.2:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:5.4.6:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-commons:jar:3.0.2:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.9.RELEASE:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.64:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] | +- org.springframework.cloud:spring-cloud-config-client:jar:3.0.3:compile
[INFO] | | +- org.springframework:spring-web:jar:5.3.6:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.12.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.12.3:compile