Advertisement
Guest User

Untitled

a guest
May 30th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @RequestMapping("/resource1")
  2. public interface Api {
  3. @RequestMapping(method = RequestMethod.POST)
  4. Resource1 getResource1();
  5. }
  6.  
  7. @RestController
  8. public class Controller implements Api {
  9. @Override
  10. public Resource1 getResource1() {
  11. return null;
  12. }
  13. }
  14.  
  15. @Configuration
  16. public class Config {
  17. @Bean
  18. public Api api() {
  19. return RestClientFactory.createRestClientBasedOnAnnotations(Api.class);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement