开发者

How can I parameterize ehcache.xml with properties loaded at runtime?

I am using Ehcache + Hibernate + Spring with an ehcache.xml file. I would like to parameterize ehc开发者_如何学Pythonache.xml with stuff from a properties file at runtime. Does anyone know an easy way to do this?


That depends on what sort of config you're talking about. ehcache.xml contains some global config (e.g. the location of the disk-overflow directory), as well as cache-specific config.

If you're talking about the latter, then you can use Spring's EhCache support (i.e. EhCacheFactoryBean and EhCacheManagerFactoryBean) to configure and manage EhCache instances.

If you're talking about the global config, though, I don't there's a way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜