问题
Can we move mvc interceptors from individual context file to web-application context.xml Thus removing interceptor from individual module context?
回答1:
You can put them in the web-context as follow:
<mvc:interceptors>
<bean class="com.package.TheInterceptor" />
<bean class="com.package.AnotherInterceptor" />
</mvc:interceptors>
来源:https://stackoverflow.com/questions/25258132/moving-mvc-interceptor-from-module-context-to-web-application-context