title: Trying to use properties file in spring boot
body: <p>I have a locations.properties file which looks like this:</p>
  
  <pre><code>location.endpoint=testadres,andertestadres
  location.test=teststring
  </code></pre>
  
  <p>I'm trying to read this config file with following class:</p>
  
  <pre><code>@Configuration
  @PropertySource("classpath:locations.properties")
  public class LocationProperties {
  
  @Value("#{'${location.endpoint}'.split(',')}")
  private List&lt;String&gt; locations;
  
  @Value("${location.test}")
  private String test;
  
  public String getTest() {
      return this.test;
  }
  
  public List&lt;String&gt; getLocations() {
      return this.locations;
  }
  
  //To resolve ${} in @Value
  @Bean
  public static PropertySourcesPlaceholderConfigurer propertyConfigInDev() {
      return new PropertySourcesPlaceholderConfigurer();
  }
  }
  </code></pre>
  
  <p>But whenever I try to get the strings with getLocations() or getTest() I get null?</p>