Skip to content
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

@RequestMapping: convention-based URL mapping at controller class level [SPR-5058] #9733

Closed
spring-projects-issues opened this issue Aug 4, 2008 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 4, 2008

Yang Lifan opened SPR-5058 and commented

I think Spring MVC URL mapping is a disadvantage for Spring Web. ControllerClassNameHandlerMapping and BeanNameHandlerMapping are a little agile, but they can only map the url to the class level, can not support the method level.

In Spring MVC 2.5, DefaultAnnotationHandlerMapping is a new way for URL Mapping. Developers can use @RequestMapping to map a url to a class level or a method level. But the url is hard coded. And the url mapping value even has the url request suffix.

http://jira.springframework.org/browse/SPR-4125 The opinion in this report is valuable. Maybe there is a better solution. Whatever, currently, the url mapping strategy in Spring MVC need to be improved.


Affects: 2.5.5

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 5, 2008

Juergen Hoeller commented

As per my comment in #8804, conventional mappings at the method level are already supported, even without hardcoded URL suffix. The only actual gap, as far as I can see, is conventional URL mapping at the type level - while still using @RequestMapping, not an explicit ControllerClassNameHandlerMapping. We'll review this for Spring 3.0.

Juergen

@spring-projects-issues spring-projects-issues added status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants