title: @Value annotation not being properly set
body: <p>Here's my app:</p>
  
  <pre><code>public static void main( String[] args ) {
      AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class);
  
      //run the importer
      final ImportNewOrders importer = (ImportNewOrders) ApplicationContextProvider.getApplicationContext().getBean("importNewOrders");
      importer.run();
      //importer.runInBackground();
  }
  </code></pre>
  
  <p>Here's my config:</p>
  
  <pre><code>@Configuration
  @ComponentScan(basePackages = {
          "com.production"
  })
  @PropertySource(value = {
          "classpath:/application.properties",
          "classpath:/environment-${MY_ENVIRONMENT}.properties"
  })
  @EnableJpaRepositories("com.fettergroup.production.repositories")
  @EnableTransactionManagement
  public class Config {
  
      .... skipping things that aren't relevant
  
      @Bean
      public ImportNewOrders importNewOrders() {
          return new ImportNewOrders();
      }
  </code></pre>
  
  <p>Here's my class...</p>
  
  <pre><code>@Component
  public class ImportNewOrders implements Task {
  
      private final static Logger logger = Logger.getLogger(ImportNewOrders.class.getName());
  
      @Autowired
      private OrderService orderService;
  
      @Autowired
      private ImportOrderRequest importOrderRequest;
  
      @Value("${api.user}")
      private String apiUser;
  
      @Value("${api.password}")
      private String apiPassword;
  
      @Value("${api.orders.pingFrequency}")
      private String pingFrequency;
  </code></pre>
  
  <p>And finally the <code>application.properties</code>:</p>
  
  <pre><code># ------------------- Application settings -------------------
  
  #Base URL to the API application
  api.baseUrl=http://localhost:9998
  
  #Unique token used to authenticate this vendor
  api.vendor.token=asdf
  
  #API credentials
  api.user=myuser
  api.password=mypassword
  
  #How often to check for new orders; frequency is in seconds
  api.orders.pingFrequency=60
  </code></pre>
  
  <p>This worked an hour or two ago, now it's decided it doesn't like these values.  I'm at a loss as to why.  Everything looks correct to me.</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>@Configuration
  @ComponentScan(basePackages = {
          "com.production"
  })
  @PropertySource(value = {
          "classpath:/application.properties",
          "classpath:/environment-${MY_ENVIRONMENT}.properties"
  })
  @EnableJpaRepositories("com.production.repositories")
  @EnableTransactionManagement
  public class Config {
      @Value("${db.url}")
      private static String PROPERTY_DATABASE_URL;
  
      @Bean
      public DataSource dataSource() {
          MysqlDataSource dataSource = new MysqlDataSource();
  
          dataSource.setUrl(PROPERTY_DATABASE_URL); //is null
          /*dataSource.setUser(environment.getRequiredProperty(PROPERTY_NAME_DATABASE_USER));
          dataSource.setPassword(environment.getRequiredProperty(PROPERTY_NAME_DATABASE_PASSWORD));*/
  
          return dataSource;
      }
  
      @Bean
      public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer () {
          return new PropertySourcesPlaceholderConfigurer();
      }
  }
  </code></pre>