Feb 16 2009

Spring annotations based config

Published by Gilles at 9:41 pm under J2EE, Java, Spring

Deployment descriptor

In your web.xml, include the context loader listener:

XML:
  1. <!-- config -->
  2.      <context-param>
  3.         <param-name>contextConfigLocation</param-name>
  4.         <param-value>/WEB-INF/applicationContext*.xml</param-value>
  5.     </context-param>
  6.     <listener>
  7.         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  8.     </listener>

This tells to load all config files prefixed with "applicationContext".

Pages: 1 2 3 4 5

Trackback URI | Comments RSS

Leave a Reply