mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	refactor: 适配 ContiNew Starter MyBatis Plus 自动配置
This commit is contained in:
		| @@ -120,9 +120,6 @@ sa-token: | ||||
|  | ||||
| --- ### MyBatis Plus 配置 | ||||
| mybatis-plus: | ||||
|   # Mapper 接口扫描包配置(该配置为自定义配置,非 MP 配置,不支持多包,如有需要可通过注解配置或提升扫描包层级) | ||||
|   # 该配置目前的唯一使用场景为:@MapperScan("${mybatis-plus.mapper-package}") | ||||
|   mapper-package: ${project.basePackage}.**.mapper | ||||
|   # Mapper XML 文件目录配置 | ||||
|   mapper-locations: classpath*:/mapper/**/*Mapper.xml | ||||
|   # 类型别名扫描包配置 | ||||
| @@ -154,6 +151,17 @@ mybatis-plus: | ||||
|       logic-delete-value: 1 | ||||
|       # 逻辑未删除全局值(默认 0,表示未删除) | ||||
|       logic-not-delete-value: 0 | ||||
|   ## 扩展配置 | ||||
|   extension: | ||||
|     enabled: true | ||||
|     # Mapper 接口扫描包配置 | ||||
|     mapper-package: ${project.basePackage}.**.mapper | ||||
|     # 数据权限实现 | ||||
|     data-permission-handler-impl: top.charles7c.cnadmin.common.config.mybatis.DataPermissionHandlerImpl | ||||
|     # 分页插件配置 | ||||
|     pagination: | ||||
|       enabled: true | ||||
|       db-type: mysql | ||||
|  | ||||
| --- ### 服务器配置 | ||||
| server: | ||||
|   | ||||
| @@ -1,30 +0,0 @@ | ||||
| ############################################################################ | ||||
| #                        P6Spy 配置(SQL 性能分析组件)                        # | ||||
| ############################################################################ | ||||
| modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory | ||||
| # 自定义日志打印 | ||||
| logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger | ||||
| #日志输出到控制台 | ||||
| appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger | ||||
| # 使用日志系统记录 SQL | ||||
| #appender=com.p6spy.engine.spy.appender.Slf4JLogger | ||||
| # 设置 P6Spy Driver 代理 | ||||
| deregisterdrivers=true | ||||
| # 取消 JDBC URL 前缀 | ||||
| useprefix=true | ||||
| # 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset. | ||||
| excludecategories=info,debug,result,commit,resultset | ||||
| # 日期格式 | ||||
| dateformat=yyyy-MM-dd HH:mm:ss | ||||
| # SQL语句打印时间格式 | ||||
| databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss | ||||
| # 实际驱动可多个 | ||||
| #driverlist=org.h2.Driver | ||||
| # 是否启用慢 SQL 记录 | ||||
| outagedetection=true | ||||
| # 慢 SQL 记录标准 2 秒 | ||||
| outagedetectioninterval=2 | ||||
| # 是否过滤 Log | ||||
| filter=true | ||||
| # 过滤 Log 时所排除的 SQL 关键字,以逗号分隔 | ||||
| exclude=SELECT 1 | ||||
		Reference in New Issue
	
	Block a user