• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Spring Advisor's

Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a question about spring advisor. My project has been configured to use spring framework.
I have a logging advisor configured this way and it works fine

<bean id="loggingInterceptor"
class="gov.osc.spring.LoggingInterceptor" />

<bean id="loggingAdvisor"
<property name="advice">
<ref bean="loggingInterceptor" />
<property name="pattern">

To my knowledge we dont have any references to this bean. But it still works fine.
Is spring container smart enough to identify all the advisors when it reads the configuration file and applies the advisor to the beans? or is there any configuration we have to make it work?

Thanks in advance
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sheetal,

As it is working fine for you, so no issues..

Anyways for your knowledge, to invoke an interceptor we should provide the reference for "LoggingInterceptor" in urlMapping bean, like

<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<ref bean="LoggingInterceptor"/>
I'm still in control here. LOOK at this tiny ad!
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic