0
ehcache-spring-annotationsと@Cacheableアノテーションを使用しています(Spring 3.1では新しい@Cacheableを使用しますが、必要なものすべてを提供するわけではありません)。SpringのAnnotation値にプロパティ値を代入する
cacheName変数をプロパティファイルのエントリの値に設定したいと思いますが、EL表記を使用しようとするとリテラル文字列として読み込まれます。これを回避する方法はありますか?
.propertiesファイルで@Cacheable(cacheName = "${connectionCacheName}")
public MyConnection getMyConnection(String id) {
return new MyConnection(id);
}
...
connectionCacheName=myConnectionCache
例外:
Caused by: com.googlecode.ehcache.annotations.CacheNotFoundException: Unable to find cache '${connectionCacheName}'