Spring云配置客户端应用程序在bluemix中不工作。但它在本地桌面上工作正常
根据spring io博客中的说明,我在Eclipse中创建了一个新的spring云配置服务器和配置客户端应用程序: “配置-it-all-out-or-12-factor-app-style-configuration-with-spring” 相应的源代码位于: 当我尝试在桌面本地运行应用程序时,它会按预期工作。当我将其上传到Bluemix时,在属性文件中进行了少量修改(以适应Bluemix环境--下面提供了属性更改),配置服务器按预期工作,但配置客户端工作不正常,我收到以下错误:Spring云配置客户端应用程序在bluemix中不工作。但它在本地桌面上工作正常,spring,spring-boot,ibm-cloud,spring-cloud,spring-cloud-connectors,Spring,Spring Boot,Ibm Cloud,Spring Cloud,Spring Cloud Connectors,根据spring io博客中的说明,我在Eclipse中创建了一个新的spring云配置服务器和配置客户端应用程序: “配置-it-all-out-or-12-factor-app-style-configuration-with-spring” 相应的源代码位于: 当我尝试在桌面本地运行应用程序时,它会按预期工作。当我将其上传到Bluemix时,在属性文件中进行了少量修改(以适应Bluemix环境--下面提供了属性更改),配置服务器按预期工作,但配置客户端工作不正常,我收到以下错误: Whit
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Oct 27 21:57:21 UTC 2015
There was an unexpected error (type=Internal Server Error, status=500).
Error creating bean with name 'scopedTarget.projectNameRestController':
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: private java.lang.String cloud.client.ProjectNameRestController.projectName; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'configuration.projectName' in string value "${configuration.projectName}"
客户端代码中的属性文件更改:
spring.application.name=abcTestApp
spring.cloud.config.uri=http://abcconfigserver4.mybluemix.net/
在上面的属性文件中,abcTestApp指的是github中属性文件的名称
您能帮我解决上面的错误吗?spring.application.name和
spring.cloud.config.uri
在哪里?它们应该在bootstrap.properties
中。正在工作。。在bootstrap.properties.Thank中添加属性后