title: Properties and env always null
body: <p>I have a hard time loading properties from my properties file. I'm trying to load a property into my configuration class which is listed below.</p>
  
  <pre><code>package dk.fitfit.budget.config;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.context.annotation.PropertySource;
  import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
  import org.springframework.core.env.Environment;
  
  
  @Configuration
  @PropertySource("classpath:application.properties")
  public class ApplicationConfig {
      private static final Logger logger = LoggerFactory.getLogger(ApplicationConfig.class);
  
      @Autowired
      private Environment env;
  
      @Value("${snot:test}")
      private String snot;
  
      public ApplicationConfig() {
          logger.info("Application config loaded!");  // Displays as expected
          logger.info("snot: {}", snot);              // snot: null
          logger.info("env: {}", env);                // env: null
      }
  
      @Bean
      public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
          return new PropertySourcesPlaceholderConfigurer();
      }
  
  }
  </code></pre>
  
  <p>If I change the name of the file (application.properties) or "@PropertySource("classpath:application.properties")" I get an error about the file not being present. So clearly it's being loaded (to some extend anyway).</p>
  
  <p>I was at least expecting to see the default string "test" injected into the variable snot. But not even that is done. I'm not able to autowire Environment either... not sure if there is a relation.</p>
  
  <p>The content of my application.properties is as below.</p>
  
  <pre><code>snot=snog
  </code></pre>
  
  <p>My application.properties file is placed in src/main/resources/.</p>
  
  <p>Anyone got a clue about what I'm doing wrong?</p>