RemoteCustomerService.java
691 Bytes
package com.huaheng.config.api;
import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.config.api.domain.Customer;
import com.huaheng.config.api.factory.RemoteCustomerFallFactory;
import com.huaheng.config.api.factory.RemoteLocationFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.function.Consumer;
@FeignClient(contextId = "remoteCustomerService", value = ServiceNameConstants.CONFIG_SERVICE, fallbackFactory = RemoteCustomerFallFactory.class)
public interface RemoteCustomerService {
@GetMapping("/customer/getCode")
Customer getCode(String code);
}