Java Reference
In-Depth Information
<bean name="beanNamehandlerMapping"
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
<property name="interceptors">
<list>
<bean
class="com.apress.insurance.web.controller.interceptor. å
ExecutiontimeMonitorInterceptor" />
</list>
</property>
</bean>
</beans>
This interceptor will now be applied to all the page controllers handled by the
beanNameHandlerMapping .
Consequences
Benefits
Improved reusability : Common code is now centralized in pluggable components,
enhancing reuse.
Increased flexibility : Generic common components can be applied and removed
declaratively, improving flexibility.
Concerns
Reduced performance : Unnecessarily long chains of interceptors and filters may
hurt performance. Also, these components should not perform any long-running
operation.
 
Search WWH ::




Custom Search