简体   繁体   English

Spring JPA hibernate4拦截器

[英]Spring JPA hibernate4 interceptor

What annotation should I be using if I write a class which extends EmptyInterceptor. 如果编写扩展EmptyInterceptor的类,应该使用什么注释。

Is there an example that somebody can point me. 有没有一个可以指出我的例子。 Should I be using Hibernate's EmptyInterceptor or does spring has some other class that I should be using 我应该使用Hibernate的EmptyInterceptor还是spring有其他我应该使用的类

thanks 谢谢

The hibernate document has example on how to use the interceptors at Chapter 14. Interceptors and events and when it comes to Hibernate there are no interceptors provided I guess. 休眠文档在第14章中提供了有关如何使用拦截器的示例。拦截器和事件 ,当涉及到Hibernate时,我猜没有提供拦截器。

For using annotations using Spring for Hibernate interceptors, you can have a look at this post - Use Spring annotations to automatically apply Hibernate Interceptor? 对于使用Spring用于Hibernate拦截器的注释,可以看一下这篇文章- 使用Spring注释自动应用Hibernate Interceptor?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM