title: reference ${user.home} in Spring Java configuration
body: <p>In xml configuration I can do the following:</p>
  
  <pre><code>&lt;context:property-placeholder
          location="file:${user.home}/.config}/api.properties"
          ignore-resource-not-found="true"
          system-properties-mode="OVERRIDE"/&gt;
  </code></pre>
  
  <p>In java configuration I would do the following:</p>
  
  <pre><code>/**
   * @return a {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer} so that placeholders are correctly populated
   * @throws Exception exception if the file is not found or cannot be opened or read
   */
  @Bean
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() throws Exception {
      PropertySourcesPlaceholderConfigurer propConfig = new PropertySourcesPlaceholderConfigurer();
      Resource[] resources = new UrlResource[]
              {new UrlResource("file:${user.home}/.config/api.properties")};
      propConfig.setLocations(resources);
      propConfig.setIgnoreResourceNotFound(true);
      propConfig.setIgnoreUnresolvablePlaceholders(true);
      return propConfig;
  }
  </code></pre>
  
  <p>However this doesn't understand ${user.home}</p>