An open API service indexing awesome lists of open source software.

https://github.com/sandysanthosh/feign-client-microservices

Easy Integration with multiple Microservice's using Feign Client
https://github.com/sandysanthosh/feign-client-microservices

Last synced: 5 months ago
JSON representation

Easy Integration with multiple Microservice's using Feign Client

Awesome Lists containing this project

README

          

# FeignRest-Microservices

#### Pom.xml:

```


org.springframework.cloud
spring-cloud-starter-feign
1.4.4.RELEASE

```

#### Annotations.java:

@SpringBootApplication
@EnableFeignClients

#### SpringCloud/RestClients/CouponClient.java:

```
@FeignClient("stores")
public interface StoreClient {
@RequestMapping(method = RequestMethod.GET, value = "/stores")
List getStores();

@RequestMapping(method = RequestMethod.GET, value = "/stores")
Page getStores(Pageable pageable);

@RequestMapping(method = RequestMethod.POST, value = "/stores/{storeId}", consumes = "application/json")
Store update(@PathVariable("storeId") Long storeId, Store store);
}

```

#### Application.yml:

```
feign:
client:
config:
default:
connectTimeout: 5000
readTimeout: 5000
loggerLevel: basic

```