Spring cloud Spring云配置服务客户端不工作

Spring cloud Spring云配置服务客户端不工作,spring-cloud,spring-cloud-config,Spring Cloud,Spring Cloud Config,运行配置客户机时出现以下错误。直接从spring指南中获取的简单内容不起作用 2017-08-18 13:44:31.194 ERROR 12548 --- [ main] o.s.boot.SpringApplication : Application startup failed org.springframework.beans.factory.BeanCreationException: Error creating bean with

运行配置客户机时出现以下错误。直接从spring指南中获取的简单内容不起作用

2017-08-18 13:44:31.194 ERROR 12548 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.restController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'message' in value "${message}"
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
    at org.sprin

RestController

@RefreshScope
@org.springframework.web.bind.annotation.RestController
public class RestController {
    @Value("${message}")
    private String message;

    @RequestMapping("/message")
    String getMessage() {
        return this.message;
    }
}

bootstrap.yml of config-client 
spring:
  application:
    name: config-client
  cloud:
    config:
      uri: http://localhost:8888
management:
  security:
    enabled: false


application.yml of config-server
spring:
  application:
    name: config-server
  cloud:
    config:
      server:
        git:
          uri: https://github.com/config-properties
server:
  port: 8888
来自配置客户端服务的日志

启动ApplicationContext时出错。要显示自动配置报告,请在启用“调试”的情况下重新运行应用程序。 2017-08-18 23:13:45.080错误13812---[main]o.s.boot.SpringApplication:应用程序启动失败

org.springframework.beans.factory.BeanCreationException:创建名为“scopedTarget.restController”的bean时出错:自动关联依赖项的注入失败;嵌套异常为java.lang.IllegalArgumentException:无法解析值“${message}”中的占位符“message” 在org.springframework.beans.factory.annotation.AutowiredNotationBeanPostProcessor.postProcessPropertyValues(AutowiredNotationBeanPostProcessor.java:372)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:359)~[spring-cloud-context-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:176)~[spring-cloud-context-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.cloud.context.scope.refresh.RefreshScope.start(RefreshScope.java:121)~[spring-cloud-context-1.2.3.RELEASE.jar:1.2.3.RELEASE] 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)~[na:1.8.0_144] 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0144] 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0144] 在java.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_144] 在org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:256)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:177)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:140)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 位于org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:303)[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE] 位于com.demo.ConfigClientApplication.main(ConfigClientApplication.java:9)[classes/:na] 原因:java.lang.IllegalArgumentException:无法解析值“${message}”中的占位符“message” 在org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)~[spring-core-4.3.10.RELEASE.jar:4.3.10.RELEASE] 在org.springfram
spring:
  profiles:
    active: profileName
  application:
    name: config-client
  cloud:
    config:
      uri: http://localhost:8888
server:
  port: 8887