RodrigoLimaM

FeignClient

Jun 17th, 2020
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. package com.store.client;
  2.  
  3. import com.store.entities.PixabayResponse;
  4. import org.springframework.cloud.openfeign.FeignClient;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RequestParam;
  7.  
  8. @FeignClient(name = "PixabayClient", url = "${pixabay.url}")
  9. public interface PixabayClient {
  10.  
  11. @GetMapping("/api")
  12. PixabayResponse getImageUrl(@RequestParam String key,
  13. @RequestParam String q,
  14. @RequestParam String image_type);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment