title: Could not resolve placeholder 'spring.profiles.active' in value "classpath:/ldap-${spring.profiles.active}.properties"
body: <p>I am trying read ldap properties from a <code>ldap-TEST.properties</code> file
  and trying to bind it to a java config class.for that i had specified
  <code>@PropertSource</code> and defined a static Bean for  propertysourcesplaceholderconfigurer.
  still i am getting the Could not resolve placeholder <code>spring.profiles.active</code> in value <strong>classpath:/ldap-${spring.profiles.active}.properties</strong> below are project files please help me</p>
  <pre><code>@Configuration
  @PropertySource(&quot;classpath:/ldap-${spring.profiles.active}.properties&quot;)
  public class LdapConfig { 
   @Autowired
   Environment env;
  @Bean
  public LdapContextSource contextSource() {
      LdapContextSource contextSource = new LdapContextSource();
      contextSource.setUrl(env.getRequiredProperty(&quot;ldap.url&quot;));
      contextSource.setBase(env.getRequiredProperty(&quot;ldap.base&quot;));
      contextSource.setUserDn(env.getRequiredProperty(&quot;ldap.userDn&quot;));
      contextSource.setPassword(env.getRequiredProperty(&quot;ldap.password&quot;));
      contextSource.afterPropertiesSet();
      return contextSource;
  }
  
  @Bean
  public LdapTemplate ldapTemplate() {
      return new LdapTemplate(contextSource());
  }
  
  @Bean
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      return new PropertySourcesPlaceholderConfigurer();
  }
  </code></pre>
  <p>}</p>
  <pre><code>//ldap-TEST.properties file
  ldap.base=dc=example,dc=com
  ldap.password=password
  ldap.port=839
  ldap.userDn=cn=read-only-admin,dc=example,dc=com
  ldap.url=ldap://ldap.forumsys.com:389
  </code></pre>
  <p>my main application</p>
  <pre><code>@SpringBootApplication
  public class Application {
  
      public static void main(String[] args) {
         SpringApplication.run(Application.class, args);
   }
  </code></pre>
  <p>}</p>