-
Feb 7th, 2010, 05:12 PM
#1
Interceptors for controllers with annotations
hello
for spring mvc, in the old days, i had interceptors for each controller to populate the drop down boxes.
listCountryInterceptor,
all they do is call a service and populate the request context.
5 controllers that display 5 different pages that require the the same drop down box would be able to use this interceptor and it would eliminate duplicate codes.
yes, i know, its just one line, and yes i know you still duplicate the line in xml.
anyway
with annotations, i read that you could put an interceptor that intercepts all annotated controllers.
in theory, it would be nice to have more control on annotated controllers.
or maybe something like struts2/webwork, an interceptor stack, interceptorGroup1 = {interceptor1, interceptor2}
and we say our controller would like to use interceptorGroup1
this is more of a "what do you guys think?" kind of question,
rather than, "help me with something" question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules