From: Juergen H. <jho...@us...> - 2007-11-14 22:12:40
|
Update of /cvsroot/springframework/spring/src/org/springframework/web/servlet In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12944/src/org/springframework/web/servlet Modified Files: DispatcherServlet.java Log Message: added documentation on setting up a dispatcher for annotation-based mappings Index: DispatcherServlet.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/web/servlet/DispatcherServlet.java,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** DispatcherServlet.java 14 Nov 2007 17:18:27 -0000 1.93 --- DispatcherServlet.java 14 Nov 2007 22:12:37 -0000 1.94 *************** *** 132,135 **** --- 132,145 ---- * </ul> * + * <p><b>NOTE: The <code>@RequestMapping</code> annotation will only be processed + * if a corresponding <code>HandlerMapping</code> (for type level annotations) + * and/or <code>HandlerAdapter</code> (for method level annotations) + * is present in the dispatcher.</b> This is the case by default. + * However, if you are defining custom <code>HandlerMappings</code> or + * <code>HandlerAdapters</code>, then you need to make sure that a + * corresponding custom <code>DefaultAnnotationHandlerMapping</code> + * and/or <code>AnnotationMethodHandlerAdapter</code> is defined as well + * - provided that you intend to use <code>@RequestMapping</code>. + * * <p><b>A web application can define any number of DispatcherServlets.</b> * Each servlet will operate in its own namespace, loading its own application |