mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 整理删除无用注释 保证代码整洁
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- BEGIN 如果想使用 Tomcat 注释掉以下代码 -->
|
||||
<!-- SpringBoot Web容器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -34,14 +33,6 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!-- END -->
|
||||
|
||||
<!-- BEGIN 如果想使用 Tomcat 解除以下代码注释 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- END -->
|
||||
|
||||
<!-- SpringBoot 拦截器 -->
|
||||
<dependency>
|
||||
|
@ -18,13 +18,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* mybatis-plus配置类
|
||||
* mybatis-plus配置类(下方注释有插件介绍)
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@Configuration
|
||||
// 指定要扫描的Mapper类的包的路径
|
||||
@MapperScan("${mybatis-plus.mapperPackage}")
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
@ -35,14 +34,11 @@ public class MybatisPlusConfig {
|
||||
interceptor.addInnerInterceptor(paginationInnerInterceptor());
|
||||
// 乐观锁插件
|
||||
interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
|
||||
// 阻断插件
|
||||
// interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
|
||||
return interceptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页插件,自动识别数据库类型
|
||||
* https://baomidou.com/guide/interceptor-pagination.html
|
||||
*/
|
||||
public PaginationInnerInterceptor paginationInnerInterceptor() {
|
||||
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
|
||||
@ -55,41 +51,13 @@ public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* 乐观锁插件
|
||||
* https://baomidou.com/guide/interceptor-optimistic-locker.html
|
||||
*/
|
||||
public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor() {
|
||||
return new OptimisticLockerInnerInterceptor();
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果是对全表的删除或更新操作,就会终止该操作
|
||||
* https://baomidou.com/guide/interceptor-block-attack.html
|
||||
*/
|
||||
// public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
|
||||
// return new BlockAttackInnerInterceptor();
|
||||
// }
|
||||
|
||||
/**
|
||||
* sql性能规范插件(垃圾SQL拦截)
|
||||
* 如有需要可以启用
|
||||
*/
|
||||
// public IllegalSQLInnerInterceptor illegalSQLInnerInterceptor() {
|
||||
// return new IllegalSQLInnerInterceptor();
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 自定义主键策略
|
||||
* https://baomidou.com/guide/id-generator.html
|
||||
*/
|
||||
// @Bean
|
||||
// public IdentifierGenerator idGenerator() {
|
||||
// return new CustomIdGenerator();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 元对象字段填充控制器
|
||||
* https://baomidou.com/guide/auto-fill-metainfo.html
|
||||
*/
|
||||
@Bean
|
||||
public MetaObjectHandler metaObjectHandler() {
|
||||
@ -98,7 +66,6 @@ public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* sql注入器配置
|
||||
* https://baomidou.com/guide/sql-injector.html
|
||||
*/
|
||||
@Bean
|
||||
public ISqlInjector sqlInjector() {
|
||||
@ -113,6 +80,19 @@ public class MybatisPlusConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* PaginationInnerInterceptor 分页插件,自动识别数据库类型
|
||||
* https://baomidou.com/guide/interceptor-pagination.html
|
||||
* OptimisticLockerInnerInterceptor 乐观锁插件
|
||||
* https://baomidou.com/guide/interceptor-optimistic-locker.html
|
||||
* MetaObjectHandler 元对象字段填充控制器
|
||||
* https://baomidou.com/guide/auto-fill-metainfo.html
|
||||
* ISqlInjector sql注入器
|
||||
* https://baomidou.com/guide/sql-injector.html
|
||||
* BlockAttackInnerInterceptor 如果是对全表的删除或更新操作,就会终止该操作
|
||||
* https://baomidou.com/guide/interceptor-block-attack.html
|
||||
* IllegalSQLInnerInterceptor sql性能规范插件(垃圾SQL拦截)
|
||||
* IdentifierGenerator 自定义主键策略
|
||||
* https://baomidou.com/guide/id-generator.html
|
||||
* TenantLineInnerInterceptor 多租户插件
|
||||
* https://baomidou.com/guide/interceptor-tenant-line.html
|
||||
* DynamicTableNameInnerInterceptor 动态表名插件
|
||||
|
@ -76,7 +76,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
.setConnectionPoolSize(singleServerConfig.getConnectionPoolSize())
|
||||
.setDnsMonitoringInterval(singleServerConfig.getDnsMonitoringInterval());
|
||||
}
|
||||
|
||||
// 集群配置方式 参考下方注释
|
||||
RedissonProperties.ClusterServersConfig clusterServersConfig = redissonProperties.getClusterServersConfig();
|
||||
if (ObjectUtil.isNotNull(clusterServersConfig)) {
|
||||
// 使用集群模式
|
||||
@ -123,4 +123,69 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
return new RedissonSpringCacheManager(redissonClient, config, JsonJacksonCodec.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* redis集群配置 yml
|
||||
*
|
||||
* --- # redis 集群配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
* spring:
|
||||
* redis:
|
||||
* cluster:
|
||||
* nodes:
|
||||
* - 192.168.0.100:6379
|
||||
* - 192.168.0.101:6379
|
||||
* - 192.168.0.102:6379
|
||||
* # 密码
|
||||
* password:
|
||||
* # 连接超时时间
|
||||
* timeout: 10s
|
||||
* # 是否开启ssl
|
||||
* ssl: false
|
||||
*
|
||||
* redisson:
|
||||
* # 线程池数量
|
||||
* threads: 16
|
||||
* # Netty线程池数量
|
||||
* nettyThreads: 32
|
||||
* # 传输模式
|
||||
* transportMode: "NIO"
|
||||
* # 集群配置
|
||||
* clusterServersConfig:
|
||||
* # 客户端名称
|
||||
* clientName: ${ruoyi.name}
|
||||
* # master最小空闲连接数
|
||||
* masterConnectionMinimumIdleSize: 32
|
||||
* # master连接池大小
|
||||
* masterConnectionPoolSize: 64
|
||||
* # slave最小空闲连接数
|
||||
* slaveConnectionMinimumIdleSize: 32
|
||||
* # slave连接池大小
|
||||
* slaveConnectionPoolSize: 64
|
||||
* # 连接空闲超时,单位:毫秒
|
||||
* idleConnectionTimeout: 10000
|
||||
* # ping连接间隔
|
||||
* pingConnectionInterval: 1000
|
||||
* # 命令等待超时,单位:毫秒
|
||||
* timeout: 3000
|
||||
* # 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
|
||||
* retryAttempts: 3
|
||||
* # 命令重试发送时间间隔,单位:毫秒
|
||||
* retryInterval: 1500
|
||||
* # 从可用服务器的内部列表中排除 Redis Slave 重新连接尝试的间隔。
|
||||
* failedSlaveReconnectionInterval: 3000
|
||||
* # 发布和订阅连接池最小空闲连接数
|
||||
* subscriptionConnectionMinimumIdleSize: 1
|
||||
* # 发布和订阅连接池大小
|
||||
* subscriptionConnectionPoolSize: 50
|
||||
* # 单个连接最大订阅数量
|
||||
* subscriptionsPerConnection: 5
|
||||
* # 扫描间隔
|
||||
* scanInterval: 1000
|
||||
* # DNS监测时间间隔,单位:毫秒
|
||||
* dnsMonitoringInterval: 5000
|
||||
* # 读取模式
|
||||
* readMode: "SLAVE"
|
||||
* # 订阅模式
|
||||
* subscriptionMode: "MASTER"
|
||||
*/
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user