Skip to content

@RequestMapping without @Controller registered as handler [SPR-17622] #22154

Description

@spring-projects-issues

Eugene Tenkaev opened SPR-17622 and commented

Following this approach here http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance

If you add root @RequestMapping to the UserService it will be registered as handler in Spring MVC application.

Example project to reproduce here https://github.com/Hronom/test-shared-mapping-interface

Related discussions:

To handle this properly need to avoid registration of controller that has only @RequestMapping annotation.

Proposed solution:
Register handler only if it has annotation @Controller or @RestController.


Affects: 5.1.3

Issue Links:

1 votes, 3 watchers

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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