hibernate中驱除缓存

hibernate中清除缓存在实现类中加入 this.getSessionFactory().evict(*class) this.getSessionFactory().

hibernate中清除缓存
在实现类中加入

this.getSessionFactory().evict(*class);
this.getSessionFactory().getCurrentSession().clear();