inugamiio / inugami-project-analysis-maven-plugin-parent

Maven plugin for analyze your project and produce complet release notes
http://inugami.io
GNU General Public License v3.0
2 stars 0 forks source link

fix REST url resolving with global @RequestMapping annotation #15

Closed pguillerm closed 3 years ago

pguillerm commented 3 years ago

Context

When a RestController have an @RequestMapping annotation we need use defined path as prefix.

For example:

@RequestMapping("v1/api")
@RestController("simpleRest")
    public static class BasicRestController {

        @GetMapping(path = "/users/headers/{name}", produces = MediaType.APPLICATION_JSON_VALUE)
        public List<Dto> retrieveUserInformation(@PathVariable("name") final String name,
                                                 @RequestHeader("correlationId") final String correlationId,
                                                 @RequestHeader("requestId") final String requestId) {
           // implementation
        }
}

This endpont should be resolve as "v1/api/users/headers/{name}"

pguillerm commented 3 years ago

ready for release