如何在hibernate.cfg.xml中配置拦截器

时间:2019-01-16 05:25:31

标签: java hibernate

我已经制作了自定义的休眠拦截器,但不确定如何配置它。我在hibernate.cfg.xml中这样配置它:

<property name="hibernate.ejb.interceptor">bos.utils.CustomInterceptor</property>

但是它没有执行,但是没有显示错误。我看到了这个例子:
<property name="hibernate.ejb.interceptor" value="bos.utils.CustomInterceptor"/>

但这是在persistence.xml中,而我没有使用它。
顺便说一句,我的bos.utils包下的拦截器类

0 个答案:

没有答案
相关问题