Spring MVC 3, Interceptor on all excluding some defined paths

后端 未结 3 1978
南方客
南方客 2020-12-24 05:28

Is it possible to apply an interceptor to all controllers and actions, except some that are defined?

Just to be clear, I am not interested in applying an interceptor

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-24 05:44

    Since Spring 3.2 they added that feature with the tag

    mvc:exclude-mapping
    

    See this example from the Spring documentation:

    
    
    
        
        
        
    
    
        
        
    
    

    Here's the link to the doc

提交回复
热议问题