title: Spring boot how to read properties file outside jar
body: <p>in my target folder, there are 2 folders, lib and conf.   all the properties files are placed in conf folder, and jars are placed in lib foulder.</p>
  
  <p>previous to spring boot, we use following configuration in spring.xml to use @value</p>
  
  <pre><code>&lt;context:property-placeholder location="classpath*:*.properties"/&gt;
  </code></pre>
  
  <p>and in java code like:</p>
  
  <pre><code>@Value("${name}")
  
  private String name;
  </code></pre>
  
  <p>but in spring boot, i don't know how to do the same in java code.</p>
  
  <p>i have tried following, but not work</p>
  
  <pre><code>@Configuration
  @PropertySource(value = "classpath:aaa.properties")
  public class AppConfig {
      @Bean
      public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      return new PropertySourcesPlaceholderConfigurer();
      }
  }
  </code></pre>