Skip to content

Instantly share code, notes, and snippets.

@srdelarosa
Created March 20, 2021 03:52
Show Gist options
  • Save srdelarosa/4ffef45f9dceaaf25b197f163bcbe38a to your computer and use it in GitHub Desktop.
Save srdelarosa/4ffef45f9dceaaf25b197f163bcbe38a to your computer and use it in GitHub Desktop.
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