简体   繁体   English

以编程方式添加没有应用程序描述符的Spring拦截器

[英]Programatically add Spring interceptor without application desciptor

I have an interceptor that I would like to invoke on all requests. 我有一个拦截器,我想对所有请求进行调用。 I would like to configure that interceptor without component-scan or adding it the mvc:interceptors element in the web.xml. 我想在不进行组件扫描的情况下配置该拦截器,或者在web.xml中将其添加为mvc:interceptors元素。

Is it possible? 可能吗?

如果使用Java配置,则有可能。

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

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