BAEL-4014 - added the code
This commit is contained in:
parent
9c787a2a6c
commit
4407da95c1
|
@ -0,0 +1,13 @@
|
|||
package com.baeldung.cloud.openfeign.client;
|
||||
|
||||
import com.baeldung.cloud.openfeign.config.FeignConfig;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
@FeignClient(name = "user-client", url="https://jsonplaceholder.typicode.com", configuration = FeignConfig.class)
|
||||
public interface UserClient {
|
||||
|
||||
@RequestMapping(value = "/users", method = RequestMethod.GET)
|
||||
String getUsers();
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.baeldung.cloud.openfeign.config;
|
||||
|
||||
import feign.Logger;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
public class FeignConfig {
|
||||
|
||||
@Bean
|
||||
Logger.Level feignLoggerLevel() {
|
||||
return Logger.Level.FULL;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue