Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17622

@RequestMapping without @Controller registered as handler

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.1.3
    • Fix Version/s: Waiting for Triage
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sdeleuze S├ębastien Deleuze
              Reporter:
              Hronom Eugene Tenkaev
              Last updater:
              Spring Issuemaster
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                1 year, 25 weeks, 1 day ago