Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring云配置客户端应用程序在bluemix中不工作。但它在本地桌面上工作正常_Spring_Spring Boot_Ibm Cloud_Spring Cloud_Spring Cloud Connectors - Fatal编程技术网

Spring云配置客户端应用程序在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

根据spring io博客中的说明,我在Eclipse中创建了一个新的spring云配置服务器和配置客户端应用程序: “配置-it-all-out-or-12-factor-app-style-configuration-with-spring”

相应的源代码位于:

当我尝试在桌面本地运行应用程序时,它会按预期工作。当我将其上传到Bluemix时,在属性文件中进行了少量修改(以适应Bluemix环境--下面提供了属性更改),配置服务器按预期工作,但配置客户端工作不正常,我收到以下错误:

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中添加属性后