title: Properties on Spring Cloud Config Server doesn't inject into Spring application
body: <p>I'm teaching myself the Spring Cloud Config Server and having some trouble with injecting the properties into the bean.</p>
  
  <p>So I have a simple Spring Boot Application as config client, just for testing: </p>
  
  <pre><code>@SpringBootApplication
  @ConfigurationProperties
  public class DemoApplication {
  
      @Value("${greeting}")
      static private String greeting;
  
      public static void main(String[] args) {
          SpringApplication.run(DemoApplication.class, args);  
          System.out.println("The greeting is: " + greeting);
      }
  }
  </code></pre>
  
  <p>But the system print:</p>
  
  <pre><code>The greeting is: null
  </code></pre>
  
  <p>Checking the env endpoint, I actually found the <code>"${greeting}"</code> property was in the environment:</p>
  
  <pre><code>profiles: [ ],
  configService:https://github.com/mstine/config-repo.git/demo.yml: {
  greeting: "Webhook"
  },
  configService:https://github.com/mstine/config-repo.git/application.yml: {
  eureka.instance.hostname: "localhost",
  eureka.instance.leaseRenewalIntervalInSeconds: 10,
  eureka.instance.metadataMap.instanceId: "${vcap.application.instance_id:${spring.application.name}:${server.port:8080}}",
  eureka.client.serviceUrl.defaultZone: "${vcap.services.service-registry.credentials.uri:http://127.0.0.1:8761}/eureka/",
  foo: "barnyardAnimal"
  },
  </code></pre>
  
  <p>Notice that in the <code>configService</code>, there is a property called <code>greeting</code> which has value of <code>"Webhook"</code></p>
  
  <p>I'm new to Spring Framework so I'm wondering didn't I mess up something? Someone suggest I can also access external properties using <code>Environment</code> but I didn't find too much tutorial of how to use it. Any thought?</p>
  
  <p>===================================UPDATE======================================
  Adding the code of the config server: </p>
  
  <p>Application.java: </p>
  
  <pre><code>package io.spring.cloud.samples.fortuneteller.configserver;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.config.server.EnableConfigServer;
  
  @SpringBootApplication
  @EnableConfigServer
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>application.yml:</p>
  
  <pre><code>server:
    port: 8888
  
  spring:
    cloud:
      config:
        server:
          git:
            uri: https://github.com/mstine/config-repo.git
  </code></pre>