Created
March 20, 2021 03:52
-
-
Save srdelarosa/4ffef45f9dceaaf25b197f163bcbe38a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.newhorizons.takeitnow.item.infrastructure.feign; | |
import com.newhorizons.takeitnow.item.application.mainmodule.dto.ProductDto; | |
import org.springframework.cloud.openfeign.FeignClient; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import java.util.List; | |
@FeignClient(name = "product-service", url = "http://localhost:8001/", path = "/takeitnow/api") | |
@RequestMapping("/products") | |
public interface IProductFeign { | |
@GetMapping("/getAll") | |
List<ProductDto> getAll(); | |
@GetMapping("/getProduct/{productId}") | |
ProductDto getProduct(@PathVariable("productId") long productId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment