-
Notifications
You must be signed in to change notification settings - Fork 38.5k
HandlerMethodResolver does not handle hierarchy of generic interfaces with @MVC annotations [SPR-7355] #11985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Richard Larson commented Created a spring forum post: http://forum.springsource.org/showthread.php?p=308123#post308123 |
Juergen Hoeller commented This seems to be a problem with a hierarchy of generic interfaces, actually: It works for me if a controller implements a generic interface directly but breaks if that interface is part of a generically typed interface hierarchy... Juergen |
Juergen Hoeller commented This should be fixed in Spring 3.0.4, as part of a general overhaul with respect to handler method resolution. Will be available in tonight's 3.0.4 snapshot - feel free to give it an early try... Juergen |
Praveen J commented The fixes in 3.0.4 still do not solve this problem. The handler methods are getting added properly to the handlerMethods list. Is there a reason why AnnotationUtils.findAnnotation(method, RequestMapping.class) is used to identify a handler method, but AnnotationUtils.findAnnotation is not used for ModelAttributes or InitBinder. Rather, method.isAnnotationPresent is used to find the annotation. If method.isAnnotationPresent is replaced with AnnotationUtils.findAnnotation for initbinder and modelAttribute, it would solve the problem. |
Praveen J commented I am referring to the code in the method "public void init(final Class<?> handlerType)" |
Juergen Hoeller commented Our processing of handler methods, init binder methods and model attribute methods is consistent now. This will be available in tonight's 3.0.5 snapshot - please give it an early try and let us know whether it works for you... Juergen |
Richard Larson opened SPR-7355 and commented
Given the following type of construct 2 problems arise:
2)The
@ModelAttribute
("note") annotation on the loadModel method is not picked up from the interface.We are using standard Spring WebMVC annotation driven setup (<mvc:annotation-driven /> and <aop:config proxy-target-class="true">) with Hibernate JPA models.
This may be related to a previous issue:
http://jira.springframework.org/browse/SPR-5191?page=com.atlassian.jirafisheyeplugin%3Acrucible-issuepanel
Affects: 3.0.2, 3.0.3
Issue Links:
@RequestParam
not applied from an interfaceThe text was updated successfully, but these errors were encountered: