ajout configurations
This commit is contained in:
parent
4820a3cf10
commit
0b1e8a7975
5 changed files with 132 additions and 323 deletions
|
|
@ -56,6 +56,12 @@
|
|||
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.clientui;
|
|||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.netflix.ribbon.RibbonClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@SpringBootApplication
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.clientui.proxies;
|
||||
|
||||
import com.clientui.beans.ProductBean;
|
||||
import org.springframework.cloud.netflix.ribbon.RibbonClient;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
|
@ -8,7 +9,8 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@FeignClient(name = "microservice-produits", url = "localhost:9001")
|
||||
@FeignClient(name = "microservice-produits")
|
||||
@RibbonClient(name = "microservice-produits")
|
||||
public interface MicroserviceProduitsProxy {
|
||||
|
||||
@GetMapping(value = "/Produits")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue