IndexFeignClient.java
828 Bytes
package com.glsx.admin.remote;
import com.glsx.admin.pojo.request.ProductReq;
import com.glsx.admin.remote.impl.IndexHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@FeignClient(name = "${feign.server.name}",url = "${feign.server.url}", fallback = IndexHystrix.class)
public interface IndexFeignClient {
@ResponseBody
@RequestMapping(value = "/home", method = {RequestMethod.GET})
String getHome();
@ResponseBody
@RequestMapping(value = "/getProduct", method = {RequestMethod.GET})
String getProduct(@RequestBody ProductReq product);
}