title: Spring-Cloud configuration server ignores configuration properties file
body: <p>I am trying to create a Spring Cloud configuration server which reads the configuration data from the properties file and not a github. The server starts, but does not serve the properties from the file. I have two configuration files on the classpapath: </p>
  
  <p>bootstrap.yml</p>
  
  <pre><code>spring:
  application:
      name: config-server
  </code></pre>
  
  <p>config-server.properties</p>
  
  <pre><code>foo=bar
  </code></pre>
  
  <p>when I go to the url which supposedly should give me the value of the foo property:</p>
  
  <pre><code>curl  http://localhost:8888/admin/env/foo
  </code></pre>
  
  <p>I get an error:
  "timestamp":1415298615005,"status":404,"error":"Not Found","exception":"org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint$NoSuchPropertyException","message":"No such property: foo","path":"/admin/env/foo"}</p>
  
  <p>I am wondering what I am doing wrong? As far as I understand the properties file name should match the server name in order to be recognized by the server.</p>
  
  <hr>
  
  <p>adding native profile as spencergibb suggested did not help. my application.properties looks like:</p>
  
  <pre><code>server.port=8888
  spring.profiles.active=native
  spring.config.name=configserver
  spring.application.name=configserver
  </code></pre>
  
  <p><strong>Note, that I had to specify the server port. According to Spring Cloud Config Server documentation the configuration server starts on port 8888 by default. In my case however unless I specify the port in my config the server starts at 8080.</strong></p>
  
  <p>The POM file has no parent and a single dependency:</p>
  
  <pre><code>    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-config-server&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.M2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>The application has nothing special in it:</p>
  
  <pre><code>@Configuration
  @ComponentScan
  @EnableAutoConfiguration
  @EnableConfigServer
  public class ConfigurationApp {
      public static void main(String[] args) {
          SpringApplication.run(ConfigurationApp.class, args);
      }
  }
  </code></pre>
  
  <p>The configserver.properties file contains a single entry: foo=bar</p>
  
  <p>First of all I am always getting a startup error</p>
  
  <pre><code>2014-11-07 09:35:42.852 ERROR 6972 --- [           main] b.c.PropertySourceBootstrapConfiguration : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/configserver/default/master":Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
  </code></pre>
  
  <p>Regardless of which command I execute I am always getting the same response from the server:</p>
  
  <pre><code>{"name":"info","label":"master","propertySources":[{"name":"bootstrap","source":{}},{"name":"applicationConfig: [classpath:/application.properties]","source":{"spring.config.name":"configserver","spring.application.name":"configserver","server.port":"8888","spring.profiles.active":"native"}},{"name":"defaultProperties","source":{"spring.application.name":"bootstrap"}}]}
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>http://localhost:8888/configserver/env
  http://localhost:8888/configserver/env/foo
  http://localhost:8888/configserver/info
  http://localhost:8888/configserver/beans
  http://localhost:8888/configserver/health
  </code></pre>
  
  <p>The response is always as above</p>