更新时间:2023-09-10 15:50:16
据我所知,没有配置Spring MVC拦截器没有XML的方式都没有。
As far as I know, there are no ways to configure Spring MVC interceptors without XML at all.
不过,也有一些简化与 MVC
命名空间在Spring 3.0.x中的最新版本(不是Spring 3.0.0!):
However, there are some simplifications with mvc
namespace in the latest versions of Spring 3.0.x (not Spring 3.0.0!):
<mvc:interceptors>
<bean class="com.vaannila.interceptor.LoggerInterceptor" />
</mvc:interceptors>
参见: