• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Beginner spring property question

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

After reading some basics about Bean creation and dependency injection in spring, I just straight into Spring Web MVC since I think I can learn best
with this tactic...

But I am currently confuse on one item.

Its about this code:


I am not sure where the property name "interceptor" that accepts a list is found in the class SimpleUrlHandlerMapping.

I thought of beans as having some property where we can inject this value, but as I have check the SimpleUrlHandlerMapping class javadoc,I cant seem
to find any property about this?
How is it possible for spring to know that setting the property interceptors would act as handlerinterceptors..

I know I am missing something basic but can you point me out into some resource? Thanks
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It extends AbstractHandlerMapping.
http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/servlet/handler/AbstractHandlerMapping.html#setInterceptors%28java.lang.Object[]%29

This is an arguably weak point of OO languages, you need to know everything in the hierarchy.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kenkaj,

Thanks for pointing this out...

You dont just only reply to our question but still adds personal insight also which I find very informative in all your post...
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi mark,
Thanks for the update.

I'm glad to know that my answer is helpful .
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic