これを含むSpringContextxmlファイルがあります
<context:property-placeholder location="classpath:cacheConfig.properties"/>
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="cacheManagerName" value="cacheName"/>
<property name="shared" value="false"/>
<property name="configLocation" value="classpath:cacheConfig.xml"/>
</bean>
目標は、顧客がこのようにプロパティファイルを編集できるようにすることです。
cache.maxMemoryElements="2000"
そして実際のcacheConfig.xmlファイルにこれがあります
<cache name="someCacheName"
maxElementsInMemory="${cache.maxMemoryElements}" ... />
お客様に変更してほしくないアイテムが公開されないようにします。もちろん、上記の詳細は部分的にしか詳細に説明されておらず、機能していません。現在、これはログファイルに表示されます
Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was null:149: Could not set attribute "maxElementsInMemory".
前もって感謝します...