I have a custom implementation of RequestMappingHandlerMapping so that I can use @ApiVersion annotation to prefix version to the start of request endpoint by annotating either controller class or individual methods. However, this extension does not provide an option to use the custom implementation and end up with duplicate endpoints for different versions as version information would be missing without the custom implementation.
@RestController
@ApiVersion("2")
@RequestMapping("base")
public class SomeController {
@Deprecated
@ApiVersion("1")
@GetMapping("endpoint") // mapped to `/v1/base/endpoint`
ResponseEntity someOldMethodForBackwardCompatibility() { /** ... */ }
@GetMapping("endpoint") // mapped to `/v2/base/endpoint`
ResponseEntity newAndImprovedMethod() { /** ... */ }
}
Please add support for custom implementations of RequestMappingHandlerMapping.
I have a custom implementation of
RequestMappingHandlerMapping
so that I can use@ApiVersion
annotation to prefix version to the start of request endpoint by annotating either controller class or individual methods. However, this extension does not provide an option to use the custom implementation and end up with duplicate endpoints for different versions as version information would be missing without the custom implementation.Please add support for custom implementations of
RequestMappingHandlerMapping
.