开发者

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

开发者 https://www.devze.com 2023-02-03 07:41 出处:网络
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

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

精彩评论

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