Please, enable inheritance of controller related annotations from implemented interfaces.
I would like to share rest service interface between client and server. This way I could provide a really convenient mechanism - client-proxy, like the one RestEasy provides.
Shared interface:
@RequestMapping("/random") public interface RandomDataController { @RequestMapping(value = "/{type}", method = RequestMethod.GET) @ResponseBody RandomData getRandomData( @PathVariable(value = "type") RandomDataType type, @RequestParam(value = "size", required = false, defaultValue = "10") int size); }
Server implementation:
@Controller public class RandomDataImpl implements RandomDataController { @Autowired private RandomGenerator randomGenerator; @Override public RandomData getPathParamRandomData(RandomDataType type, int size) { return randomGenerator.generateRandomData(type, size); } }
Client code:
// ... RandomDataController randomDataController = SpringMvcProxyFactory.create(RandomDataController.class, "http://localhost:8080"); RandomData rd = randomDataController.getRandomData(RandomDataType.ALPHA, 100); // ...
At the moment I cannot write SpringMvcProxyFactory because parameter annotations from interface RandomDataController are not inherited by RandomDataControllerImpl.
- is duplicated by
-
SPR-15714 @RequestBody annotation in interface is ignored
-
- Resolved
-
-
SPR-14021 Inconsistent interpretation of parameter annotations in interface-based handler methods
-
- Resolved
-
-
SPR-14526 mvc Parameter annotations are not inherited
-
- Resolved
-
-
SPR-14805 Spring Mvc Annotations in argument of a method (like @Path) annotated with @RequestMapping are not supported when you create a @RestController via an Interface
-
- Resolved
-
-
SPR-15023 RequestHeader annotation does not work if it's put on an interface
-
- Resolved
-
-
SPR-12213 Consider reusing @RequestMapping annotations as an interface for HTTP clients
-
- Resolved
-
-
SPR-15046 Allow controller parameter annotations (@RequestBody, @PathVariable...) to be defined on interfaces or parent classes
-
- Resolved
-
-
SPR-16110 Supports annotating parameter annotations like @PathVariable on interface method
-
- Resolved
-
- is related to
-
SPR-17460 Aliases in parameter annotations on a controller interface are not evaluated
-
- Closed
-
-
SPR-17629 MethodParameter.isOptional() fails with ArrayIndexOutOfBoundsException
-
- Closed
-
-
SPR-12131 Introduce proxy-based REST client similar to HttpInvokerProxyFactoryBean
-
- Open
-
-
SPR-17223 getMappingForMethod failed when implement a interface method(with @RequestMapping) in super class
-
- Open
-
-
SPR-16060 Annotations on generic interface methods not found by AnnotationUtils
-
- Closed
-
-
SPR-16877 Subclass-resolved generic return type declarations for handler methods
-
- Closed
-
-
SPR-16840 @DateTimeFormat annotations are necessary both on field and constructor parameter in the immutable form class
-
- Closed
-