Skip to content

SPR-13033: Use @RequestMapping of correct class #799

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

Closed
wants to merge 1 commit into from
Closed

SPR-13033: Use @RequestMapping of correct class #799

wants to merge 1 commit into from

Conversation

ractive
Copy link
Contributor

@ractive ractive commented May 15, 2015

MvcUriComponentsBuilder::fromMethodCall creates wrong URLs with derived controller classes. The @RequestMapping of the declaring class of the method that is called is used instead of the @RequstMapping of the given controller class.

The same issue exists for the fromMethod(Method method, ...) methods. You'd also need to add the class of the controller to get the correct type level @RequestMapping. I'm not sure how you want to handle such API breaking changes though...

https://jira.spring.io/browse/SPR-13033

MvcUriComponentsBuilder::fromMethodCall creates wrong URLs with derived
controller classes. The @RequestMapping of the declaring class of the
method that is called is used instead of the @RequstMapping of the
given controller class.

https://jira.spring.io/browse/SPR-13033
rstoyanchev added a commit that referenced this pull request May 18, 2015
@rstoyanchev
Copy link
Contributor

This is now merged. I've made sure all method accept a controllerType. The existing fromMethod is deprecated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants