|
@@ -0,0 +1,24 @@
|
|
|
+package com.onemap.system.api.factory;
|
|
|
+
|
|
|
+import com.onemap.common.core.web.domain.RequestResult;
|
|
|
+import com.onemap.system.api.SpatialService;
|
|
|
+import com.onemap.system.api.domain.WktsVo;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.cloud.openfeign.FallbackFactory;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+@Component
|
|
|
+public class SpatialFallbackFactory implements FallbackFactory<SpatialService> {
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(SpatialFallbackFactory.class);
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SpatialService create(Throwable cause) {
|
|
|
+ return new SpatialService() {
|
|
|
+ @Override
|
|
|
+ public RequestResult getImage(WktsVo wktsVo) {
|
|
|
+ return RequestResult.error("内部错误");
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+}
|