RemoteAddressService.java 729 Bytes
package com.huaheng.config.api;

import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.config.api.domain.Address;
import com.huaheng.config.api.factory.RemoteAddressFallFactory;
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.RequestParam;

@FeignClient(contextId = "remoteAddressService", value = ServiceNameConstants.CONFIG_SERVICE, fallbackFactory = RemoteAddressFallFactory.class)
public interface RemoteAddressService {

    @GetMapping("address/getAddress")
    Address getAddress(@RequestParam("param") String param);
}