currentContext = DataPermissionHelper.getContext();
- currentContext.clear();
- if (context != null && !context.isEmpty()) {
- currentContext.putAll(context);
- }
- }
-}
diff --git a/ruoyi-common/ruoyi-common-http/src/main/java/org/dromara/common/http/support/RemoteHttpFallbackProxyPostProcessor.java b/ruoyi-common/ruoyi-common-http/src/main/java/org/dromara/common/http/support/RemoteHttpFallbackProxyPostProcessor.java
new file mode 100644
index 000000000..50e4166a3
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-http/src/main/java/org/dromara/common/http/support/RemoteHttpFallbackProxyPostProcessor.java
@@ -0,0 +1,165 @@
+package org.dromara.common.http.support;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.dromara.common.core.annotation.RemoteHttpService;
+import org.springframework.aop.framework.ProxyFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanClassLoaderAware;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.util.ClassUtils;
+import org.springframework.util.ReflectionUtils;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
+
+/**
+ * 远程 HTTP 代理 fallback 包装器.
+ *
+ * 仅包装注册器生成的远程 HTTP 代理 Bean。代理调用报错时,
+ * 按接口上声明的 fallback 实现兜底,不处理本地 provider Bean。
+ *
+ *
这里故意保持和之前 mock/stub 类似的简单约束:
+ * fallback 必须实现接口本身,且方法签名与接口保持一致。
+ *
+ * @author Lion Li
+ */
+public class RemoteHttpFallbackProxyPostProcessor
+ implements BeanPostProcessor, BeanFactoryAware, BeanClassLoaderAware {
+
+ private static final String HTTP_SERVICE_GROUP_NAME_ATTRIBUTE = "httpServiceGroupName";
+ private static final String FALLBACK_WRAPPED_ATTRIBUTE = "remoteHttpFallbackWrapped";
+
+ private ConfigurableListableBeanFactory beanFactory;
+ private ClassLoader beanClassLoader;
+
+ @Override
+ public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws BeansException {
+ this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
+ }
+
+ @Override
+ public void setBeanClassLoader(ClassLoader classLoader) {
+ this.beanClassLoader = classLoader;
+ }
+
+ @Override
+ public Object postProcessAfterInitialization(Object bean, String beanName) {
+ if (bean instanceof FallbackDecoratedProxy) {
+ return bean;
+ }
+ Class> serviceInterface = resolveRemoteServiceInterface(beanName, bean);
+ if (serviceInterface == null) {
+ return bean;
+ }
+ RemoteHttpService remoteHttpService = serviceInterface.getAnnotation(RemoteHttpService.class);
+ if (remoteHttpService == null || remoteHttpService.fallback() == void.class) {
+ return bean;
+ }
+ Class> fallbackClass = remoteHttpService.fallback();
+ if (!serviceInterface.isAssignableFrom(fallbackClass)) {
+ throw new IllegalStateException("Fallback class must implement remote service interface: "
+ + fallbackClass.getName() + " -> " + serviceInterface.getName());
+ }
+ ProxyFactory proxyFactory = new ProxyFactory(bean);
+ proxyFactory.setInterfaces(ClassUtils.getAllInterfacesForClass(bean.getClass(), this.beanClassLoader));
+ proxyFactory.addInterface(FallbackDecoratedProxy.class);
+ proxyFactory.addAdvice((MethodInterceptor) invocation -> {
+ Method method = invocation.getMethod();
+ if (method.getDeclaringClass() == Object.class) {
+ return invocation.proceed();
+ }
+ try {
+ return invocation.proceed();
+ } catch (Throwable ex) {
+ return invokeFallback(serviceInterface, fallbackClass, method, invocation.getArguments(), ex);
+ }
+ });
+ markWrapped(beanName);
+ return proxyFactory.getProxy(this.beanClassLoader);
+ }
+
+ private Class> resolveRemoteServiceInterface(String beanName, Object bean) {
+ if (this.beanFactory == null || !this.beanFactory.containsBeanDefinition(beanName)) {
+ return null;
+ }
+ BeanDefinition beanDefinition = this.beanFactory.getBeanDefinition(beanName);
+ if (beanDefinition.getAttribute(HTTP_SERVICE_GROUP_NAME_ATTRIBUTE) == null) {
+ return null;
+ }
+ if (Boolean.TRUE.equals(beanDefinition.getAttribute(FALLBACK_WRAPPED_ATTRIBUTE))) {
+ return null;
+ }
+ Class> beanClass = resolveBeanClass(beanDefinition);
+ if (beanClass != null && beanClass.isInterface() && beanClass.isAnnotationPresent(RemoteHttpService.class)) {
+ return beanClass;
+ }
+ for (Class> interfaceType : ClassUtils.getAllInterfacesForClass(bean.getClass(), this.beanClassLoader)) {
+ if (interfaceType.isAnnotationPresent(RemoteHttpService.class)) {
+ return interfaceType;
+ }
+ }
+ return null;
+ }
+
+ private Class> resolveBeanClass(BeanDefinition beanDefinition) {
+ String beanClassName = beanDefinition.getBeanClassName();
+ return beanClassName == null ? null : ClassUtils.resolveClassName(beanClassName, this.beanClassLoader);
+ }
+
+ private Object invokeFallback(Class> serviceInterface, Class> fallbackClass, Method method, Object[] args, Throwable ex)
+ throws Throwable {
+ Object fallbackInstance = instantiateFallback(fallbackClass);
+ Method fallbackMethod = ReflectionUtils.findMethod(fallbackClass, method.getName(), method.getParameterTypes());
+ if (fallbackMethod == null) {
+ throw unwrap(ex);
+ }
+ ReflectionUtils.makeAccessible(fallbackMethod);
+ return invokeMethod(fallbackInstance, fallbackMethod, args);
+ }
+
+ private Object instantiateFallback(Class> fallbackClass) {
+ if (this.beanFactory == null) {
+ throw new IllegalStateException("BeanFactory not initialized for remote fallback: " + fallbackClass.getName());
+ }
+ return this.beanFactory.getBean(fallbackClass);
+ }
+
+ private void markWrapped(String beanName) {
+ if (this.beanFactory == null || !this.beanFactory.containsBeanDefinition(beanName)) {
+ return;
+ }
+ this.beanFactory.getBeanDefinition(beanName).setAttribute(FALLBACK_WRAPPED_ATTRIBUTE, true);
+ }
+
+ private Object invokeMethod(Object target, Method method, Object[] args) throws Throwable {
+ try {
+ return method.invoke(target, args);
+ } catch (InvocationTargetException ex) {
+ throw unwrap(ex.getTargetException());
+ } catch (IllegalAccessException ex) {
+ throw new IllegalStateException("Could not invoke remote fallback method: " + method, ex);
+ } catch (UndeclaredThrowableException ex) {
+ throw unwrap(ex);
+ } catch (RuntimeException ex) {
+ throw unwrap(ex);
+ }
+ }
+
+ private Throwable unwrap(Throwable throwable) {
+ Throwable current = throwable;
+ while (current instanceof InvocationTargetException invocationTargetException && invocationTargetException.getTargetException() != null) {
+ current = invocationTargetException.getTargetException();
+ }
+ while (current instanceof UndeclaredThrowableException undeclaredThrowableException && undeclaredThrowableException.getUndeclaredThrowable() != null) {
+ current = undeclaredThrowableException.getUndeclaredThrowable();
+ }
+ return current;
+ }
+
+ private interface FallbackDecoratedProxy {
+ }
+}
diff --git a/ruoyi-common/ruoyi-common-http/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-http/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index e7cd7b28b..9b53874f5 100644
--- a/ruoyi-common/ruoyi-common-http/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/ruoyi-common/ruoyi-common-http/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1,2 +1 @@
org.dromara.common.http.config.RemoteHttpAutoConfiguration
-org.dromara.common.http.config.RemoteHttpDataPermissionAutoConfiguration
diff --git a/ruoyi-common/ruoyi-common-redis/pom.xml b/ruoyi-common/ruoyi-common-redis/pom.xml
index 5f31a1fe9..f8a5a477f 100644
--- a/ruoyi-common/ruoyi-common-redis/pom.xml
+++ b/ruoyi-common/ruoyi-common-redis/pom.xml
@@ -68,6 +68,7 @@
org.apache.fory
fory-core
+ 0.13.1
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteFileServiceImpl.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteFileServiceImpl.java
index 8aad09b6e..6fb2f0e78 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteFileServiceImpl.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteFileServiceImpl.java
@@ -28,7 +28,7 @@ import java.util.List;
*/
@Slf4j
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/file")
+@RemoteServiceController
public class RemoteFileServiceImpl implements RemoteFileService {
private final ISysOssService sysOssService;
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMailServiceImpl.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMailServiceImpl.java
index 7aa6c4621..1e3d094a9 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMailServiceImpl.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMailServiceImpl.java
@@ -14,7 +14,7 @@ import org.dromara.resource.api.RemoteMailService;
*/
@Slf4j
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/mail")
+@RemoteServiceController
public class RemoteMailServiceImpl implements RemoteMailService {
/**
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMessageServiceImpl.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMessageServiceImpl.java
index 1a1118745..45b912f51 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMessageServiceImpl.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteMessageServiceImpl.java
@@ -16,7 +16,7 @@ import java.util.List;
*/
@Slf4j
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/message")
+@RemoteServiceController
public class RemoteMessageServiceImpl implements RemoteMessageService {
/**
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteSmsServiceImpl.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteSmsServiceImpl.java
index 364de5507..edcc164a5 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteSmsServiceImpl.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/remote/RemoteSmsServiceImpl.java
@@ -21,7 +21,7 @@ import java.util.List;
*/
@Slf4j
@RequiredArgsConstructor
-@RemoteServiceController(path = "/inner/remote/resource/sms")
+@RemoteServiceController
public class RemoteSmsServiceImpl implements RemoteSmsService {
/**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteClientServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteClientServiceImpl.java
index 292f4314e..431df6898 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteClientServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteClientServiceImpl.java
@@ -14,7 +14,7 @@ import org.dromara.system.service.ISysClientService;
* @author Michelle.Chung
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/client")
+@RemoteServiceController
public class RemoteClientServiceImpl implements RemoteClientService {
private final ISysClientService sysClientService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteConfigServiceImpl.java
index d7c6cf732..6ad2c7987 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteConfigServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteConfigServiceImpl.java
@@ -15,7 +15,7 @@ import java.util.List;
* @author Michelle.Chung
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/config")
+@RemoteServiceController
public class RemoteConfigServiceImpl implements RemoteConfigService {
private final ISysConfigService configService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDataScopeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDataScopeServiceImpl.java
index 503a56d0e..695d1ebf1 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDataScopeServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDataScopeServiceImpl.java
@@ -25,7 +25,7 @@ import java.util.List;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/data-scope")
+@RemoteServiceController
public class RemoteDataScopeServiceImpl implements RemoteDataScopeService {
private final SysRoleDeptMapper roleDeptMapper;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDeptServiceImpl.java
index 8c025f69d..ca7b9a0c9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDeptServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDeptServiceImpl.java
@@ -25,7 +25,7 @@ import java.util.Map;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/dept")
+@RemoteServiceController
public class RemoteDeptServiceImpl implements RemoteDeptService {
private final ISysDeptService deptService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDictServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDictServiceImpl.java
index 220dcb805..2bf860364 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDictServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteDictServiceImpl.java
@@ -18,7 +18,7 @@ import java.util.List;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/dict")
+@RemoteServiceController
public class RemoteDictServiceImpl implements RemoteDictService {
private final ISysDictTypeService sysDictTypeService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteLogServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteLogServiceImpl.java
index fe340bae6..eef9f3156 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteLogServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteLogServiceImpl.java
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.PostMapping;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/log")
+@RemoteServiceController
public class RemoteLogServiceImpl implements RemoteLogService {
private final ISysOperLogService operLogService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePermissionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePermissionServiceImpl.java
index 2f2cacd43..0b64607e9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePermissionServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePermissionServiceImpl.java
@@ -13,7 +13,7 @@ import java.util.Set;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/permission")
+@RemoteServiceController
public class RemotePermissionServiceImpl implements RemotePermissionService {
private final ISysPermissionService permissionService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePostServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePostServiceImpl.java
index df19215f8..5e64b1ccc 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePostServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemotePostServiceImpl.java
@@ -20,7 +20,7 @@ import java.util.Map;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/post")
+@RemoteServiceController
public class RemotePostServiceImpl implements RemotePostService {
private final SysPostMapper postMapper;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteRoleServiceImpl.java
index bbeeb01ac..6875df660 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteRoleServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteRoleServiceImpl.java
@@ -20,7 +20,7 @@ import java.util.Map;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/role")
+@RemoteServiceController
public class RemoteRoleServiceImpl implements RemoteRoleService {
private final SysRoleMapper roleMapper;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteSocialServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteSocialServiceImpl.java
index 2cb5501d2..95d3c9210 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteSocialServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteSocialServiceImpl.java
@@ -18,7 +18,7 @@ import java.util.List;
* @author Michelle.Chung
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/social")
+@RemoteServiceController
public class RemoteSocialServiceImpl implements RemoteSocialService {
private final ISysSocialService sysSocialService;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteTaskAssigneeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteTaskAssigneeServiceImpl.java
index dcf3edf3d..9cdcb2533 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteTaskAssigneeServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteTaskAssigneeServiceImpl.java
@@ -31,7 +31,7 @@ import java.util.Map;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/task-assignee")
+@RemoteServiceController
public class RemoteTaskAssigneeServiceImpl implements RemoteTaskAssigneeService {
// 上级Service注入下级Service 其他Service永远不可能注入当前类 避免循环注入
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteUserServiceImpl.java
index d1f7a48cf..168e87514 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteUserServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/remote/RemoteUserServiceImpl.java
@@ -41,7 +41,7 @@ import java.util.*;
* @author Lion Li
*/
@RequiredArgsConstructor
-@RemoteServiceController(path = "/remote/user")
+@RemoteServiceController
public class RemoteUserServiceImpl implements RemoteUserService {
private final ISysUserService userService;
diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/remote/RemoteWorkflowServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/remote/RemoteWorkflowServiceImpl.java
index 82a569619..6daf1c7d5 100644
--- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/remote/RemoteWorkflowServiceImpl.java
+++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/remote/RemoteWorkflowServiceImpl.java
@@ -17,7 +17,7 @@ import java.util.Map;
* @Author ZETA
* @Date 2024/6/3
*/
-@RemoteServiceController(path = "/remote/workflow")
+@RemoteServiceController
@RequiredArgsConstructor
public class RemoteWorkflowServiceImpl implements RemoteWorkflowService {
diff --git a/script/config/nacos/application-common.yml b/script/config/nacos/application-common.yml
index 3e5b3939b..64e0c1e4a 100644
--- a/script/config/nacos/application-common.yml
+++ b/script/config/nacos/application-common.yml
@@ -9,10 +9,20 @@ server:
# 最大线程数
max: 256
+remote:
+ http:
+ # 远程接口扫描范围,支持 Ant 风格包路径
+ scan-packages:
+ - org.dromara.**.api
+ # 全局请求log
+ request-log: true
+ # info 基础信息 param 参数信息 full 全部
+ log-level: info
+
spring:
http:
clients:
- # Spring HTTP 客户端默认超时配置,供非 Feign 客户端复用
+ # 默认 client HTTP 请求超时,供 RestClient / HTTP Service Client 复用
connect-timeout: 3s
read-timeout: 10s
imperative:
@@ -56,9 +66,6 @@ spring:
# 允许对象忽略json中不存在的属性
fail_on_unknown_properties: false
cloud:
- openfeign:
- circuitbreaker:
- enabled: true
inetutils:
# 指定全局使用ip网段
preferred-networks: