spring-data-jpa拦截器配置

<property name="jpaProperties">
            <props>
                <prop key="hibernate.ejb.interceptor">cn.com.easy.permission.aspect.AuditLogInterceptor</prop>
        </props>
        </property>

package cn.com.easy.permission.aspect;

public class AuditLogInterceptor extends EmptyInterceptor {

}

具体的拦截接口参看: org.hibernate.EmptyInterceptor

猜你喜欢

转载自my.oschina.net/u/1045177/blog/1592515