有没有任何失败的安全方法可以100%确定Hibernate正在使用什么缓存?也就是说它使用其他东西的EhCache? 感谢。
答案 0 :(得分:4)
String cacheIntegrationName = ( (SessionFactoryImplementor) sessionFactory )
.getSettings()
.getRegionFactory()
.getClass()
.getName();
当然Hibernate已经记录了“东西”。启用org.hibernate.cfg.SettingsFactory
记录器的调试日志记录,并查找“缓存区域工厂:XYZ”