|
|
|
@ -27,6 +27,7 @@ import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
import org.springframework.cloud.openfeign.CircuitBreakerNameResolver;
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
|
|
import static org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation;
|
|
|
|
@ -46,6 +47,7 @@ public class PolarisCircuitBreakerNameResolver implements CircuitBreakerNameReso
|
|
|
|
|
String path = "";
|
|
|
|
|
|
|
|
|
|
// Get path in @FeignClient.
|
|
|
|
|
if (StringUtils.hasText(target.url())) {
|
|
|
|
|
URI uri = null;
|
|
|
|
|
try {
|
|
|
|
|
uri = new URI(target.url());
|
|
|
|
@ -56,6 +58,7 @@ public class PolarisCircuitBreakerNameResolver implements CircuitBreakerNameReso
|
|
|
|
|
if (uri != null) {
|
|
|
|
|
path += uri.getPath();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get path in @RequestMapping.
|
|
|
|
|
RequestMapping requestMapping = findMergedAnnotation(method, RequestMapping.class);
|
|
|
|
|