diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index 278f7b0f4d..4978054b37 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -666,6 +666,19 @@ public class HelloWorldController { // ... </beans> + + A common pitfall when working with annotated controller classes is + a scenario where you want apply functionality to it that involves + creating a proxy for the controller object (transactional controllers + e.g.). Usually you will introduce an interface for the controller then + to use JDK dynamic proxies. To make this work you have to move the + @RequestMapping annotations to the + interface as well as the mapping lookup only "sees" the interface + exposed by the proxy then. An alternative might be to activate + proxy-target-class="true" in the configuration for the + functionality applied to the controller (in our transaction scenario in + <tx:annotation-driven />). For more information on + various proxying mechanisms see .