We are trying to debug some issues with EhCache and we are unsure what configuration is being used. Is there a way to export or advice on debugging an EhCache configuration?

有帮助吗?

解决方案

You can output the full Ehcache configuration using a little bit of Java code. Just get a reference to your active cache manager by name. (The name should be in your ehcache.xml)

CacheManager mgr = CacheManager.getCacheManager("my-cache-manager");
System.out.println(mgr.getActiveConfigurationText());

This will output the current configuration to the log/console.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top