I want to hide some peace of URL path in custom @RequestMapping. Tried somiting like this:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@RequestMapping(value = "/api/v1/", produces = "application/json" )
@Description(value = "API v1 Controller")
public @interface RequestMappingApiV1 {
@AliasFor(annotation = RequestMapping.class, attribute = "path")
String[] path() default {};
}
}
@RestController
@RequestMappingApiV1(path = "items")
public class ItemController implements ItemV1Api { }
Unfortunately it looks like the path attribute is overwriting api/v1. Instead of http://hostname/api/v1/items
i get http://hostname/items
Are there other paths with custom annotation?