Skip to content

Instantly share code, notes, and snippets.

@srdelarosa
Created March 20, 2021 03:58
Show Gist options
  • Save srdelarosa/5dbcf396e59827efbaf8a1fe5f069c45 to your computer and use it in GitHub Desktop.
Save srdelarosa/5dbcf396e59827efbaf8a1fe5f069c45 to your computer and use it in GitHub Desktop.
package com.newhorizons.takeitnow.item.infrastructure.feign;
import com.newhorizons.takeitnow.item.domain.entity.Product;
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<Product> getAll();
@GetMapping("/getProduct/{productId}")
Product getProduct(@PathVariable("productId") long productId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment