Skip to content

Provide mechanism for creating links to controllers and controller methods [SPR-8826] #13468

@spring-projects-issues

Description

@spring-projects-issues

Rossen Stoyanchev opened SPR-8826 and commented

Add an @MVC-specific UriComponentsBuilder either as part of the ServletUriComponentsBuilder, or perhaps as a new subclass. One benefit is being able to point to an @Controller method instead of specifying a path. Something like:

MvcUriComponentsBuilder ucb = MvcUriComponentsBuilder.fromServletMapping();
ucb.path(MyController.class, "handle");

where "handle()" is an @Controller method annotated with @RequestMapping.

Another possible benefit is to add required request parameters to the query string, use of current request URI template variables when expanding, and formatting of expanded arguments with a DataBinder.


Affects: 3.1 RC1

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions