问题
I define a system.properties in my class path, then I do like this in spring configuration xml:
<context:property-placeholder location="classpath*:/system.properties" ignore-resource-not-found="true" ignore-unresolvable="true" />
I aslo defind ehcache like this :
<cache:annotation-driven cache-manager="cacheManager" />
<bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation" value="classpath:/ehcache.xml" />
<property name="shared" value="true" />
</bean>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">
<property name="cacheManager" ref="ehCacheManager" />
</bean>
I define a properties in system.properties file :
system.project_name=myproject
ehcache.xml like this :
<diskStore path="e:/${system.project_name}/cache" />
I want use the system.project_name property to store the cache, but when I deploy my project, I find the Directory is:
that is say I could't use the properties even I define a PropertyPlaceholderConfigurer in Spring configuration xml file?
来源:https://stackoverflow.com/questions/21190955/ehcache-xml-cant-use-the-properties-file-property