• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exclude Spring MVC controller from being intercepted

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

I am stuck trying to figure out how to exclude a single controller from being intercepted by my HandlerInterceptors

The basic idea is, I am using Spring MVC with annotated controllers. For these controllers I have a handful of HandlerInterceptors that do various things, one of which we use to check if the User object is in the session. For this app, I want all the interceptors in my configuration to be intercepted by all HandlerInterceptors EXCEPT HomeController. For HomeController, I want all interceptors EXCEPT AuthInterceptor.

My current configuration is:
Spring MVC 3.0
Java 1.6
tc Server developers edition



I am sure I am not the only one who has run into this issue, but an hour of googling later, still no luck.

Anyone run into this and figured out a solution?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only solution I can think of , and admittedly it may make you want to barf, is to move your HomeController into a different package, say com.summit.Security, and link just the Local and Mdc controllers to that package.

Otherwise I have not seen an 'except this' syntax for mappings.

Sorry.
 
reply
    Bookmark Topic Watch Topic
  • New Topic