title: How to use pom properties in spring context.xml?
body: <p>I have pom file(pom.xml):</p>
  
  <pre><code>      ...
    &lt;properties&gt;
        &lt;certificate-manager.default-client-certDN&gt;Default Client&lt;/certificate-manager.default-client-certDN&gt;
        &lt;certificate-manager.path-to-store&gt;D:\Projects\PPP\apache-tomcat-7.0.29\&lt;/certificate-manager.path-to-store&gt;
        &lt;certificate-manager.store-password&gt;12345&lt;/certificate-manager.store-password&gt;
        &lt;certificate-manager.alias&gt;root&lt;/certificate-manager.alias&gt;
    &lt;/properties&gt;
  </code></pre>
  
  <p>and properties file(my.properties):</p>
  
  <pre><code>certificateManager.defaultClientCertDN=${certificate-manager.default-client-certDN}
  certificateManager.pathToStore=${certificate-manager.path-to-store}
  certificateManager.storePassword=${certificate-manager.store-password}
  certificateManager.alias=${certificate-manager.alias}
  </code></pre>
  
  <p>and I want to use this properties in my spring context.xml(appContext.xml):</p>
  
  <pre><code>    &lt;context:property-placeholder location="classpath:my.properties"/&gt;
  
      &lt;bean id="certificateManager" class="com.exadel.mdp.security.certificate.CertificateManagerImpl"&gt;
          &lt;constructor-arg name="defaultClientCertDN" value="${certificateManager.defaultClientCertDN}"/&gt;
          &lt;constructor-arg name="pathToStore" value="${certificateManager.pathToStore}"/&gt;
          &lt;constructor-arg name="storePassword" value="${certificateManager.storePassword}"/&gt;
          &lt;constructor-arg name="alias" value="${certificateManager.alias}"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>When I'm trying to run app, I get the next exception:</p>
  
  <pre><code>ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
  org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'certificateManager' defined in class path resource [appContext.xml]: Could not resolve placeholder 'certificateManager.defaultClientCertDN' in string value [${certificateManager.defaultClientCertDN}]
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
      at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:174)
      at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:151)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:661) 
  </code></pre>