dev_gmy
jia 2024-04-20 20:30:47 +08:00
parent 9cae163ca9
commit b27c8ca725
5 changed files with 32 additions and 13 deletions

View File

@ -42,7 +42,6 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
return null;
}
String str = new String(bytes, DEFAULT_CHARSET);
return JSON.parseObject(str, clazz, AUTO_TYPE_FILTER);
}
}

View File

@ -0,0 +1,11 @@
package com.bwie.common.remote.system;
import com.bwie.common.constant.ServerNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
@FeignClient(
name = ServerNameConstants.SYSTEM_NAME,
fallbackFactory = RemoteUserService.class
)
public interface RemoteUserService {
}

View File

@ -0,0 +1,15 @@
package com.bwie.common.remote.system.factory;
import com.bwie.common.remote.system.RemoteUserService;
import lombok.extern.log4j.Log4j2;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
@Component
@Log4j2
public class RemoteUserFactory implements FallbackFactory<RemoteUserService> {
@Override
public RemoteUserService create(Throwable cause) {
return null;
}
}

View File

@ -1 +1,6 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.bwie.common.config.MybatisPlusConfig,\com.bwie.common.handler.GlobalExceptionHandle,\com.bwie.common.config.RedisConfig,\com.bwie.common.redis.RedisCache,\com.bwie.common.remote.system.factory.RemoteUserFactory
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.bwie.common.config.MybatisPlusConfig,\
com.bwie.common.handler.GlobalExceptionHandle,\
com.bwie.common.config.RedisConfig,\
com.bwie.common.redis.RedisCache,\
com.bwie.common.remote.system.factory.RemoteUserFactory

View File

@ -53,15 +53,4 @@ public class GatewayUtils {
}