added warning about annotated controller interfaces (SPR-6655)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2923 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
92fddc10aa
commit
86512f5927
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -168,6 +168,11 @@ import java.lang.annotation.Target;
|
||||||
* and/or <code>AnnotationMethodHandlerAdapter</code> is defined as well
|
* and/or <code>AnnotationMethodHandlerAdapter</code> is defined as well
|
||||||
* - provided that you intend to use <code>@RequestMapping</code>.
|
* - provided that you intend to use <code>@RequestMapping</code>.
|
||||||
*
|
*
|
||||||
|
* <p><b>NOTE:</b> When using controller interfaces (e.g. for AOP proxying),
|
||||||
|
* make sure to consistently put <i>all</i> your mapping annotations - such as
|
||||||
|
* <code>@RequestMapping</code> and <code>@SessionAttributes</code> - on
|
||||||
|
* the controller <i>interface</i> rather than on the implementation class.
|
||||||
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Arjen Poutsma
|
* @author Arjen Poutsma
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -43,6 +43,11 @@ import java.lang.annotation.Target;
|
||||||
* Alternatively, consider using the attribute management capabilities of the
|
* Alternatively, consider using the attribute management capabilities of the
|
||||||
* generic {@link org.springframework.web.context.request.WebRequest} interface.
|
* generic {@link org.springframework.web.context.request.WebRequest} interface.
|
||||||
*
|
*
|
||||||
|
* <p><b>NOTE:</b> When using controller interfaces (e.g. for AOP proxying),
|
||||||
|
* make sure to consistently put <i>all</i> your mapping annotations - such as
|
||||||
|
* <code>@RequestMapping</code> and <code>@SessionAttributes</code> - on
|
||||||
|
* the controller <i>interface</i> rather than on the implementation class.
|
||||||
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1390,6 +1390,15 @@ public class EditPetForm {
|
||||||
public class EditPetForm {
|
public class EditPetForm {
|
||||||
<lineannotation>// ...</lineannotation>
|
<lineannotation>// ...</lineannotation>
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>When using controller interfaces (e.g. for AOP proxying), make sure to
|
||||||
|
consistently put <emphasis>all</emphasis> your mapping annotations - such as
|
||||||
|
<interfacename>@RequestMapping</interfacename> and
|
||||||
|
<interfacename>@SessionAttributes</interfacename> - on the controller
|
||||||
|
<emphasis>interface</emphasis> rather than on the implementation class.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="mvc-ann-cookievalue">
|
<section id="mvc-ann-cookievalue">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue