Spring-MVC Problem using @Controller on controller implementing an interface

后端 未结 6 1770
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 04:41

I\'m using spring 2.5 and annotations to configure my spring-mvc web context. Unfortunately, I am unable to get the following to work. I\'m not sure if this is a bug (seem

6条回答
  •  失恋的感觉
    2020-12-08 04:53

    There's no doubt that annotations and inheritance can get a little tricky, but I think that should work. Try explicitly adding the AnnotationMethodHandlerAdapter to your servlet context.

    http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-ann-setup

    If that doesn't work, a little more information would be helpful. Specifically, are the two annotated controller methods from the interface? Is Foo supposed to be RegistrationController?

提交回复
热议问题