RemoteAddressService.java
673 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;
@FeignClient(contextId = "remoteAddressService", value = ServiceNameConstants.CONFIG_SERVICE, fallbackFactory = RemoteAddressFallFactory.class)
public interface RemoteAddressService {
@GetMapping("address/getByUrl/{url}")
Address getAddressByUrl(@PathVariable("url") String url);
}