update 优化 异常处理器自动配置
This commit is contained in:
parent
14cedccaf3
commit
3ffd1e3b41
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerIntercept
|
|||||||
import org.dromara.common.core.factory.YmlPropertySourceFactory;
|
import org.dromara.common.core.factory.YmlPropertySourceFactory;
|
||||||
import org.dromara.common.core.utils.SpringUtils;
|
import org.dromara.common.core.utils.SpringUtils;
|
||||||
import org.dromara.common.mybatis.handler.InjectionMetaObjectHandler;
|
import org.dromara.common.mybatis.handler.InjectionMetaObjectHandler;
|
||||||
|
import org.dromara.common.mybatis.handler.MybatisExceptionHandler;
|
||||||
import org.dromara.common.mybatis.interceptor.PlusDataPermissionInterceptor;
|
import org.dromara.common.mybatis.interceptor.PlusDataPermissionInterceptor;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
@ -87,6 +88,14 @@ public class MybatisPlusConfig {
|
|||||||
return new DefaultIdentifierGenerator(NetUtil.getLocalhost());
|
return new DefaultIdentifierGenerator(NetUtil.getLocalhost());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常处理器
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public MybatisExceptionHandler mybatisExceptionHandler() {
|
||||||
|
return new MybatisExceptionHandler();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PaginationInnerInterceptor 分页插件,自动识别数据库类型
|
* PaginationInnerInterceptor 分页插件,自动识别数据库类型
|
||||||
* https://baomidou.com/pages/97710a/
|
* https://baomidou.com/pages/97710a/
|
||||||
|
@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.dromara.common.core.utils.SpringUtils;
|
import org.dromara.common.core.utils.SpringUtils;
|
||||||
import org.dromara.common.redis.config.properties.RedissonProperties;
|
import org.dromara.common.redis.config.properties.RedissonProperties;
|
||||||
import org.dromara.common.redis.handler.KeyPrefixHandler;
|
import org.dromara.common.redis.handler.KeyPrefixHandler;
|
||||||
|
import org.dromara.common.redis.handler.RedisExceptionHandler;
|
||||||
import org.redisson.client.codec.StringCodec;
|
import org.redisson.client.codec.StringCodec;
|
||||||
import org.redisson.codec.CompositeCodec;
|
import org.redisson.codec.CompositeCodec;
|
||||||
import org.redisson.codec.TypedJsonJacksonCodec;
|
import org.redisson.codec.TypedJsonJacksonCodec;
|
||||||
@ -97,6 +98,14 @@ public class RedisConfig {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常处理器
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public RedisExceptionHandler redisExceptionHandler() {
|
||||||
|
return new RedisExceptionHandler();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* redis集群配置 yml
|
* redis集群配置 yml
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user