Authored by meijiajie

调整结构

Showing 37 changed files with 2316 additions and 45 deletions
@@ -292,12 +292,12 @@ @@ -292,12 +292,12 @@
292 </dependency> 292 </dependency>
293 293
294 <!-- 核心模块--> 294 <!-- 核心模块-->
295 - <!-- <dependency> 295 + <dependency>
296 <groupId>com.scm</groupId> 296 <groupId>com.scm</groupId>
297 - <artifactId>scm-framework</artifactId> 297 + <artifactId>scm-core</artifactId>
298 <version>${fp-scm.version}</version> 298 <version>${fp-scm.version}</version>
299 </dependency> 299 </dependency>
300 ---> 300 +
301 <!-- 系统模块--> 301 <!-- 系统模块-->
302 <dependency> 302 <dependency>
303 <groupId>com.scm</groupId> 303 <groupId>com.scm</groupId>
@@ -326,44 +326,48 @@ @@ -326,44 +326,48 @@
326 <version>${fp-scm.version}</version> 326 <version>${fp-scm.version}</version>
327 </dependency> 327 </dependency>
328 328
329 - <!-- SMS短信模块 -->  
330 - <dependency>  
331 - <groupId>com.scm</groupId>  
332 - <artifactId>scm-core</artifactId>  
333 - <version>${fp-scm.version}</version>  
334 - </dependency>  
335 -  
336 - <!--Mybatis--> 329 + <!-- Mybatis-->
337 <dependency> 330 <dependency>
338 <groupId>com.scm</groupId> 331 <groupId>com.scm</groupId>
339 <artifactId>scm-mybatis</artifactId> 332 <artifactId>scm-mybatis</artifactId>
340 <version>${fp-scm.version}</version> 333 <version>${fp-scm.version}</version>
341 </dependency> 334 </dependency>
342 335
  336 + <!-- 认证模块-->
343 <dependency> 337 <dependency>
344 <groupId>com.scm</groupId> 338 <groupId>com.scm</groupId>
345 <artifactId>scm-security</artifactId> 339 <artifactId>scm-security</artifactId>
346 <version>${fp-scm.version}</version> 340 <version>${fp-scm.version}</version>
347 </dependency> 341 </dependency>
348 342
  343 + <!-- web模块-->
349 <dependency> 344 <dependency>
350 <groupId>com.scm</groupId> 345 <groupId>com.scm</groupId>
351 <artifactId>scm-web</artifactId> 346 <artifactId>scm-web</artifactId>
352 <version>${fp-scm.version}</version> 347 <version>${fp-scm.version}</version>
353 </dependency> 348 </dependency>
354 349
  350 + <!-- redis模块-->
355 <dependency> 351 <dependency>
356 <groupId>com.scm</groupId> 352 <groupId>com.scm</groupId>
357 <artifactId>scm-redis</artifactId> 353 <artifactId>scm-redis</artifactId>
358 <version>${fp-scm.version}</version> 354 <version>${fp-scm.version}</version>
359 </dependency> 355 </dependency>
360 356
  357 + <!-- 限流模块-->
361 <dependency> 358 <dependency>
362 <groupId>com.scm</groupId> 359 <groupId>com.scm</groupId>
363 <artifactId>scm-ratelimiter</artifactId> 360 <artifactId>scm-ratelimiter</artifactId>
364 <version>${fp-scm.version}</version> 361 <version>${fp-scm.version}</version>
365 </dependency> 362 </dependency>
366 363
  364 + <!-- websocket模块-->
  365 + <dependency>
  366 + <groupId>com.scm</groupId>
  367 + <artifactId>scm-websocket</artifactId>
  368 + <version>${fp-scm.version}</version>
  369 + </dependency>
  370 +
367 </dependencies> 371 </dependencies>
368 </dependencyManagement> 372 </dependencyManagement>
369 373
@@ -375,6 +379,7 @@ @@ -375,6 +379,7 @@
375 <module>scm-system</module> 379 <module>scm-system</module>
376 <module>scm-extend</module> 380 <module>scm-extend</module>
377 </modules> 381 </modules>
  382 +
378 <packaging>pom</packaging> 383 <packaging>pom</packaging>
379 384
380 <build> 385 <build>
@@ -14,7 +14,7 @@ spring: @@ -14,7 +14,7 @@ spring:
14 datasource: 14 datasource:
15 type: com.zaxxer.hikari.HikariDataSource 15 type: com.zaxxer.hikari.HikariDataSource
16 driver-class-name: com.mysql.cj.jdbc.Driver 16 driver-class-name: com.mysql.cj.jdbc.Driver
17 - url: jdbc:mysql://192.168.1.18:3306/fp_scm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai 17 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
18 username: root 18 username: root
19 password: root 19 password: root
20 hikari: 20 hikari:
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 <module>scm-security</module> 24 <module>scm-security</module>
25 <module>scm-sms</module> 25 <module>scm-sms</module>
26 <module>scm-web</module> 26 <module>scm-web</module>
  27 + <module>scm-websocket</module>
27 28
28 </modules> 29 </modules>
29 30
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0"
  3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5 + <modelVersion>4.0.0</modelVersion>
  6 + <parent>
  7 + <groupId>com.scm</groupId>
  8 + <artifactId>fp_scm</artifactId>
  9 + <version>4.8.2</version>
  10 + </parent>
  11 +
  12 + <artifactId>scm-websocket</artifactId>
  13 +
  14 + <dependencies>
  15 + <dependency>
  16 + <groupId>com.scm</groupId>
  17 + <artifactId>scm-core</artifactId>
  18 + </dependency>
  19 + <dependency>
  20 + <groupId>com.scm</groupId>
  21 + <artifactId>scm-redis</artifactId>
  22 + </dependency>
  23 + <dependency>
  24 + <groupId>com.scm</groupId>
  25 + <artifactId>scm-security</artifactId>
  26 + </dependency>
  27 + <dependency>
  28 + <groupId>org.springframework.boot</groupId>
  29 + <artifactId>spring-boot-starter-websocket</artifactId>
  30 + <exclusions>
  31 + <exclusion>
  32 + <groupId>org.springframework.boot</groupId>
  33 + <artifactId>spring-boot-starter-tomcat</artifactId>
  34 + </exclusion>
  35 + </exclusions>
  36 + </dependency>
  37 + </dependencies>
  38 +
  39 +</project>
@@ -2,20 +2,121 @@ @@ -2,20 +2,121 @@
2 <project xmlns="http://maven.apache.org/POM/4.0.0" 2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 - <modelVersion>4.0.0</modelVersion>  
6 <parent> 5 <parent>
7 <groupId>com.scm</groupId> 6 <groupId>com.scm</groupId>
8 <artifactId>fp_scm</artifactId> 7 <artifactId>fp_scm</artifactId>
9 <version>4.8.2</version> 8 <version>4.8.2</version>
10 </parent> 9 </parent>
11 10
12 - <groupId>com.ruoyi.encrypt</groupId> 11 + <modelVersion>4.0.0</modelVersion>
  12 + <packaging>jar</packaging>
13 <artifactId>scm-garage-server</artifactId> 13 <artifactId>scm-garage-server</artifactId>
14 14
15 - <properties>  
16 - <maven.compiler.source>11</maven.compiler.source>  
17 - <maven.compiler.target>11</maven.compiler.target>  
18 - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
19 - </properties> 15 + <description>
  16 + 汽修端web服务入口
  17 + </description>
  18 +
  19 + <dependencies>
  20 +
  21 + <!-- spring-boot-devtools -->
  22 + <dependency>
  23 + <groupId>org.springframework.boot</groupId>
  24 + <artifactId>spring-boot-devtools</artifactId>
  25 + <optional>true</optional> <!-- 表示依赖不会传递 -->
  26 + </dependency>
  27 +
  28 + <!-- Mysql驱动包 -->
  29 + <dependency>
  30 + <groupId>com.mysql</groupId>
  31 + <artifactId>mysql-connector-j</artifactId>
  32 + </dependency>
  33 + <!-- Oracle -->
  34 + <dependency>
  35 + <groupId>com.oracle.database.jdbc</groupId>
  36 + <artifactId>ojdbc8</artifactId>
  37 + </dependency>
  38 + <!-- PostgreSql -->
  39 + <dependency>
  40 + <groupId>org.postgresql</groupId>
  41 + <artifactId>postgresql</artifactId>
  42 + </dependency>
  43 + <!-- SqlServer -->
  44 + <dependency>
  45 + <groupId>com.microsoft.sqlserver</groupId>
  46 + <artifactId>mssql-jdbc</artifactId>
  47 + </dependency>
  48 +
  49 +
  50 + <dependency>
  51 + <groupId>com.scm</groupId>
  52 + <artifactId>scm-system</artifactId>
  53 + </dependency>
  54 +
  55 + <!--
  56 + <dependency>
  57 + <groupId>com.scm</groupId>
  58 + <artifactId>ruoyi-job</artifactId>
  59 + </dependency>
  60 + -->
  61 +
  62 + <!-- 代码生成-->
  63 + <dependency>
  64 + <groupId>com.scm</groupId>
  65 + <artifactId>scm-generator</artifactId>
  66 + </dependency>
  67 +
  68 + <dependency>
  69 + <groupId>com.scm</groupId>
  70 + <artifactId>scm-ratelimiter</artifactId>
  71 + </dependency>
  72 +
  73 + <dependency>
  74 + <groupId>org.springframework.boot</groupId>
  75 + <artifactId>spring-boot-starter-test</artifactId>
  76 + <scope>test</scope>
  77 + </dependency>
  78 +
  79 + <!-- skywalking 整合 logback -->
  80 + <!-- <dependency>-->
  81 + <!-- <groupId>org.apache.skywalking</groupId>-->
  82 + <!-- <artifactId>apm-toolkit-logback-1.x</artifactId>-->
  83 + <!-- <version>${与你的agent探针版本保持一致}</version>-->
  84 + <!-- </dependency>-->
  85 + <!-- <dependency>-->
  86 + <!-- <groupId>org.apache.skywalking</groupId>-->
  87 + <!-- <artifactId>apm-toolkit-trace</artifactId>-->
  88 + <!-- <version>${与你的agent探针版本保持一致}</version>-->
  89 + <!-- </dependency>-->
  90 +
  91 + </dependencies>
20 92
  93 + <build>
  94 + <finalName>${project.artifactId}</finalName>
  95 + <plugins>
  96 + <plugin>
  97 + <groupId>org.springframework.boot</groupId>
  98 + <artifactId>spring-boot-maven-plugin</artifactId>
  99 + <version>${spring-boot.version}</version>
  100 + <configuration>
  101 + <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  102 + </configuration>
  103 + <executions>
  104 + <execution>
  105 + <goals>
  106 + <goal>repackage</goal>
  107 + </goals>
  108 + </execution>
  109 + </executions>
  110 + </plugin>
  111 + <plugin>
  112 + <groupId>org.apache.maven.plugins</groupId>
  113 + <artifactId>maven-war-plugin</artifactId>
  114 + <version>3.2.2</version>
  115 + <configuration>
  116 + <failOnMissingWebXml>false</failOnMissingWebXml>
  117 + <warName>${project.artifactId}</warName>
  118 + </configuration>
  119 + </plugin>
  120 + </plugins>
  121 + </build>
21 </project> 122 </project>
  1 +package com.ruoyi;
  2 +
  3 +import org.springframework.boot.SpringApplication;
  4 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  5 +import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
  6 +
  7 +@SpringBootApplication
  8 +public class GarageApplication {
  9 +
  10 + public static void main(String[] args) {
  11 + System.setProperty("spring.devtools.restart.enabled", "false");
  12 + SpringApplication application = new SpringApplication(GarageApplication.class);
  13 + application.setApplicationStartup(new BufferingApplicationStartup(2048));
  14 + application.run(args);
  15 + System.out.println("Garage Server running successful...");
  16 + }
  17 +}
  1 +package com.ruoyi;
  2 +
  3 +import org.springframework.boot.builder.SpringApplicationBuilder;
  4 +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  5 +
  6 +/**
  7 + * web容器中进行部署
  8 + *
  9 + * @author ruoyi
  10 + */
  11 +public class GarageServletInitializer extends SpringBootServletInitializer {
  12 +
  13 + @Override
  14 + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  15 + return application.sources(GarageServletInitializer.class);
  16 + }
  17 +
  18 +}
  1 +--- # 监控中心配置
  2 +spring.boot.admin.client:
  3 + # 增加客户端开关
  4 + enabled: true
  5 + url: http://localhost:9090/admin
  6 + instance:
  7 + service-host-type: IP
  8 + username: ruoyi
  9 + password: 123456
  10 +
  11 +--- # xxl-job 配置
  12 +xxl.job:
  13 + # 执行器开关
  14 + enabled: true
  15 + # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  16 + admin-addresses: http://localhost:9100/xxl-job-admin
  17 + # 执行器通讯TOKEN:非空时启用
  18 + access-token: xxl-job
  19 + executor:
  20 + # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  21 + appname: xxl-job-executor
  22 + # 28080 端口 随着主应用端口飘逸 避免集群冲突
  23 + port: 2${server.port}
  24 + # 执行器注册:默认IP:PORT
  25 + address:
  26 + # 执行器IP:默认自动获取IP
  27 + ip:
  28 + # 执行器运行日志文件存储磁盘路径
  29 + logpath: ./logs/xxl-job
  30 + # 执行器日志文件保存天数:大于3生效
  31 + logretentiondays: 30
  32 +
  33 +--- # 数据源配置
  34 +spring:
  35 + datasource:
  36 + type: com.zaxxer.hikari.HikariDataSource
  37 + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  38 + dynamic:
  39 + # 性能分析插件(有性能损耗 不建议生产环境使用)
  40 + p6spy: true
  41 + # 设置默认的数据源或者数据源组,默认值即为 master
  42 + primary: master
  43 + # 严格模式 匹配不到数据源则报错
  44 + strict: true
  45 + hikari:
  46 + # 最大连接池数量
  47 + maxPoolSize: 20
  48 + # 最小空闲线程数量
  49 + minIdle: 10
  50 + # 配置获取连接等待超时的时间
  51 + connectionTimeout: 30000
  52 + # 校验超时时间
  53 + validationTimeout: 5000
  54 + # 空闲连接存活最大时间,默认10分钟
  55 + idleTimeout: 600000
  56 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  57 + maxLifetime: 1800000
  58 + # 多久检查一次连接的活性
  59 + keepaliveTime: 30000
  60 + datasource:
  61 + # 主库数据源
  62 + master:
  63 + type: com.zaxxer.hikari.HikariDataSource
  64 + driver-class-name: com.mysql.cj.jdbc.Driver
  65 + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  66 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  67 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  68 + username: root
  69 + password: root
  70 + # 从库数据源
  71 + slave:
  72 + lazy: true
  73 + type: com.zaxxer.hikari.HikariDataSource
  74 + driver-class-name: com.mysql.cj.jdbc.Driver
  75 + url: jdbc:mysql://192.168.3.117:3306/fp_scm2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  76 + username: root
  77 + password: root
  78 + shardingsphere:
  79 + datasource:
  80 + names: ds0
  81 + ds0:
  82 + type: com.zaxxer.hikari.HikariDataSource
  83 + driver-class-name: com.mysql.cj.jdbc.Driver
  84 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  85 + username: root
  86 + password: root
  87 +
  88 + rules: # 配置表规则
  89 + sharding:
  90 + # 表策略配置
  91 + tables:
  92 + # iot_device_log 是逻辑表
  93 + iot_device_log:
  94 + actualDataNodes: ds0.iot_device_log_$->{2025}0$->{1..9},ds0.iot_device_log_$->{2025}1$->{0..2}
  95 + tableStrategy:
  96 + # 使用标准分片策略
  97 + standard:
  98 + # 配置分片字段
  99 + shardingColumn: create_time
  100 + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
  101 + shardingAlgorithmName: time-sharding-algorithm
  102 + # 分片算法配置
  103 + shardingAlgorithms:
  104 + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
  105 + time-sharding-algorithm:
  106 + # 类型:自定义策略
  107 + type: CLASS_BASED
  108 + props:
  109 + # 分片策略
  110 + strategy: standard
  111 + # 分片算法类
  112 + algorithmClassName: com.ruoyi.mybatis.config.sharding.TimeShardingAlgorithm
  113 + props:
  114 + sql-show: true # 是否打印 ShardingSphere 生成的 SQL
  115 + show-process-log: true # 是否显示处理日志
  116 +
  117 +
  118 +
  119 +--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  120 +spring:
  121 + redis:
  122 + # 地址
  123 + host: 192.168.3.117
  124 + # 端口,默认为6379
  125 + port: 6379
  126 + # 数据库索引
  127 + database: 0
  128 + # 密码(如没有密码请注释掉)
  129 + password: zkqk666888
  130 + # 连接超时时间
  131 + timeout: 10s
  132 + # 是否开启ssl
  133 + ssl: false
  134 +
  135 +redisson:
  136 + # redis key前缀
  137 + keyPrefix:
  138 + # 线程池数量
  139 + threads: 4
  140 + # Netty线程池数量
  141 + nettyThreads: 8
  142 + # 单节点配置
  143 + singleServerConfig:
  144 + # 客户端名称
  145 + clientName: ${ruoyi.name}
  146 + # 最小空闲连接数
  147 + connectionMinimumIdleSize: 8
  148 + # 连接池大小
  149 + connectionPoolSize: 32
  150 + # 连接空闲超时,单位:毫秒
  151 + idleConnectionTimeout: 10000
  152 + # 命令等待超时,单位:毫秒
  153 + timeout: 3000
  154 + # 发布和订阅连接池大小
  155 + subscriptionConnectionPoolSize: 50
  156 +
  157 +--- # mail 邮件发送
  158 +mail:
  159 + enabled: false
  160 + host: smtp.163.com
  161 + port: 465
  162 + # 是否需要用户名密码验证
  163 + auth: true
  164 + # 发送方,遵循RFC-822标准
  165 + from: xxx@163.com
  166 + # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  167 + user: xxx@163.com
  168 + # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  169 + pass: xxxxxxxxxx
  170 + # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  171 + starttlsEnable: true
  172 + # 使用SSL安全连接
  173 + sslEnable: true
  174 + # SMTP超时时长,单位毫秒,缺省值不超时
  175 + timeout: 0
  176 + # Socket连接超时值,单位毫秒,缺省值不超时
  177 + connectionTimeout: 0
  178 +
  179 +--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  180 +# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  181 +sms:
  182 + # 阿里云 dysmsapi.aliyuncs.com
  183 + alibaba:
  184 + #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  185 + requestUrl: dysmsapi.aliyuncs.com
  186 + #阿里云的accessKey
  187 + accessKeyId: xxxxxxx
  188 + #阿里云的accessKeySecret
  189 + accessKeySecret: xxxxxxx
  190 + #短信签名
  191 + signature: 测试
  192 + tencent:
  193 + #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  194 + requestUrl: sms.tencentcloudapi.com
  195 + #腾讯云的accessKey
  196 + accessKeyId: xxxxxxx
  197 + #腾讯云的accessKeySecret
  198 + accessKeySecret: xxxxxxx
  199 + #短信签名
  200 + signature: 测试
  201 + #短信sdkAppId
  202 + sdkAppId: appid
  203 + #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  204 + territory: ap-guangzhou
  1 +--- # 临时文件存储位置 避免临时文件被系统清理报错
  2 +spring.servlet.multipart.location: /ruoyi/server/temp
  3 +
  4 +--- # 监控中心配置
  5 +spring.boot.admin.client:
  6 + # 增加客户端开关
  7 + enabled: true
  8 + url: http://localhost:9090/admin
  9 + instance:
  10 + service-host-type: IP
  11 + username: ruoyi
  12 + password: 123456
  13 +
  14 +--- # xxl-job 配置
  15 +xxl.job:
  16 + # 执行器开关
  17 + enabled: true
  18 + # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  19 + admin-addresses: http://localhost:9100/xxl-job-admin
  20 + # 执行器通讯TOKEN:非空时启用
  21 + access-token: xxl-job
  22 + executor:
  23 + # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  24 + appname: xxl-job-executor
  25 + # 28080 端口 随着主应用端口飘逸 避免集群冲突
  26 + port: 2${server.port}
  27 + # 执行器注册:默认IP:PORT
  28 + address:
  29 + # 执行器IP:默认自动获取IP
  30 + ip:
  31 + # 执行器运行日志文件存储磁盘路径
  32 + logpath: ./logs/xxl-job
  33 + # 执行器日志文件保存天数:大于3生效
  34 + logretentiondays: 30
  35 +
  36 +--- # 数据源配置
  37 +spring:
  38 + datasource:
  39 + type: com.zaxxer.hikari.HikariDataSource
  40 + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  41 + dynamic:
  42 + # 性能分析插件(有性能损耗 不建议生产环境使用)
  43 + p6spy: false
  44 + # 设置默认的数据源或者数据源组,默认值即为 master
  45 + primary: master
  46 + # 严格模式 匹配不到数据源则报错
  47 + strict: true
  48 + datasource:
  49 + # 主库数据源
  50 + master:
  51 + type: ${spring.datasource.type}
  52 + driverClassName: com.mysql.cj.jdbc.Driver
  53 + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  54 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  55 + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  56 + username: root
  57 + password: root
  58 + # 从库数据源
  59 + slave:
  60 + lazy: true
  61 + type: ${spring.datasource.type}
  62 + driverClassName: com.mysql.cj.jdbc.Driver
  63 + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  64 + username:
  65 + password:
  66 +# oracle:
  67 +# type: ${spring.datasource.type}
  68 +# driverClassName: oracle.jdbc.OracleDriver
  69 +# url: jdbc:oracle:thin:@//localhost:1521/XE
  70 +# username: ROOT
  71 +# password: root
  72 +# postgres:
  73 +# type: ${spring.datasource.type}
  74 +# driverClassName: org.postgresql.Driver
  75 +# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  76 +# username: root
  77 +# password: root
  78 +# sqlserver:
  79 +# type: ${spring.datasource.type}
  80 +# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  81 +# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  82 +# username: SA
  83 +# password: root
  84 + hikari:
  85 + # 最大连接池数量
  86 + maxPoolSize: 20
  87 + # 最小空闲线程数量
  88 + minIdle: 10
  89 + # 配置获取连接等待超时的时间
  90 + connectionTimeout: 30000
  91 + # 校验超时时间
  92 + validationTimeout: 5000
  93 + # 空闲连接存活最大时间,默认10分钟
  94 + idleTimeout: 600000
  95 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  96 + maxLifetime: 1800000
  97 + # 多久检查一次连接的活性
  98 + keepaliveTime: 30000
  99 +
  100 +--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  101 +spring:
  102 + redis:
  103 + # 地址
  104 + host: localhost
  105 + # 端口,默认为6379
  106 + port: 6379
  107 + # 数据库索引
  108 + database: 0
  109 + # 密码(如没有密码请注释掉)
  110 + # password:
  111 + # 连接超时时间
  112 + timeout: 10s
  113 + # 是否开启ssl
  114 + ssl: false
  115 +
  116 +redisson:
  117 + # redis key前缀
  118 + keyPrefix:
  119 + # 线程池数量
  120 + threads: 16
  121 + # Netty线程池数量
  122 + nettyThreads: 32
  123 + # 单节点配置
  124 + singleServerConfig:
  125 + # 客户端名称
  126 + clientName: ${ruoyi.name}
  127 + # 最小空闲连接数
  128 + connectionMinimumIdleSize: 32
  129 + # 连接池大小
  130 + connectionPoolSize: 64
  131 + # 连接空闲超时,单位:毫秒
  132 + idleConnectionTimeout: 10000
  133 + # 命令等待超时,单位:毫秒
  134 + timeout: 3000
  135 + # 发布和订阅连接池大小
  136 + subscriptionConnectionPoolSize: 50
  137 +
  138 +--- # mail 邮件发送
  139 +mail:
  140 + enabled: false
  141 + host: smtp.163.com
  142 + port: 465
  143 + # 是否需要用户名密码验证
  144 + auth: true
  145 + # 发送方,遵循RFC-822标准
  146 + from: xxx@163.com
  147 + # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  148 + user: xxx@163.com
  149 + # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  150 + pass: xxxxxxxxxx
  151 + # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  152 + starttlsEnable: true
  153 + # 使用SSL安全连接
  154 + sslEnable: true
  155 + # SMTP超时时长,单位毫秒,缺省值不超时
  156 + timeout: 0
  157 + # Socket连接超时值,单位毫秒,缺省值不超时
  158 + connectionTimeout: 0
  159 +
  160 +--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  161 +# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  162 +sms:
  163 + # 阿里云 dysmsapi.aliyuncs.com
  164 + alibaba:
  165 + #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  166 + requestUrl: dysmsapi.aliyuncs.com
  167 + #阿里云的accessKey
  168 + accessKeyId: xxxxxxx
  169 + #阿里云的accessKeySecret
  170 + accessKeySecret: xxxxxxx
  171 + #短信签名
  172 + signature: 测试
  173 + tencent:
  174 + #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  175 + requestUrl: sms.tencentcloudapi.com
  176 + #腾讯云的accessKey
  177 + accessKeyId: xxxxxxx
  178 + #腾讯云的accessKeySecret
  179 + accessKeySecret: xxxxxxx
  180 + #短信签名
  181 + signature: 测试
  182 + #短信sdkAppId
  183 + sdkAppId: appid
  184 + #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  185 + territory: ap-guangzhou
  1 +# 项目相关配置
  2 +ruoyi:
  3 + # 名称
  4 + name: Garage-Server
  5 + # 版本
  6 + version: ${fp-scm.version}
  7 + # 版权年份
  8 + copyrightYear: 2025
  9 + # 缓存懒加载
  10 + cacheLazy: false
  11 +
  12 +captcha:
  13 + # 页面 <参数设置> 可开启关闭 验证码校验
  14 + # 验证码类型 math 数组计算 char 字符验证
  15 + type: MATH
  16 + # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  17 + category: CIRCLE
  18 + # 数字验证码位数
  19 + numberLength: 1
  20 + # 字符验证码长度
  21 + charLength: 4
  22 +
  23 +# 开发环境配置
  24 +server:
  25 + # 服务器的HTTP端口,默认为8081
  26 + port: 8081
  27 + servlet:
  28 + # 应用的访问路径
  29 + context-path: /
  30 + # undertow 配置
  31 + undertow:
  32 + # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  33 + max-http-post-size: -1
  34 + # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  35 + # 每块buffer的空间大小,越小的空间被利用越充分
  36 + buffer-size: 512
  37 + # 是否分配的直接内存
  38 + direct-buffers: true
  39 + threads:
  40 + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  41 + io: 8
  42 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  43 + worker: 256
  44 +
  45 +# 日志配置
  46 +logging:
  47 + level:
  48 + com.ruoyi: @logging.level@
  49 + org.springframework: warn
  50 + config: classpath:logback-plus.xml
  51 +
  52 +# 用户配置
  53 +user:
  54 + password:
  55 + # 密码最大错误次数
  56 + maxRetryCount: 5
  57 + # 密码锁定时间(默认10分钟)
  58 + lockTime: 10
  59 +
  60 +# Spring配置
  61 +spring:
  62 + application:
  63 + name: ${ruoyi.name}
  64 + # 资源信息
  65 + messages:
  66 + # 国际化资源文件路径
  67 + basename: i18n/messages
  68 + profiles:
  69 + active: @profiles.active@
  70 + # 文件上传
  71 + servlet:
  72 + multipart:
  73 + # 单个文件大小
  74 + max-file-size: 10MB
  75 + # 设置总上传的文件大小
  76 + max-request-size: 20MB
  77 + # 服务模块
  78 + devtools:
  79 + restart:
  80 + # 热部署开关
  81 + enabled: true
  82 + mvc:
  83 + format:
  84 + date-time: yyyy-MM-dd HH:mm:ss
  85 + jackson:
  86 + # 日期格式化
  87 + date-format: yyyy-MM-dd HH:mm:ss
  88 + serialization:
  89 + # 格式化输出
  90 + indent_output: false
  91 + # 忽略无法转换的对象
  92 + fail_on_empty_beans: false
  93 + deserialization:
  94 + # 允许对象忽略json中不存在的属性
  95 + fail_on_unknown_properties: false
  96 +
  97 +# Sa-Token配置
  98 +sa-token:
  99 + # token名称 (同时也是cookie名称)
  100 + token-name: Authorization
  101 + # token有效期 设为一天 (必定过期) 单位: 秒
  102 + timeout: 86400
  103 + # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
  104 + # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
  105 + active-timeout: 1800
  106 + # 允许动态设置 token 有效期
  107 + dynamic-active-timeout: true
  108 + # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  109 + is-concurrent: true
  110 + # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  111 + is-share: false
  112 + # 是否尝试从header里读取token
  113 + is-read-header: true
  114 + # 是否尝试从cookie里读取token
  115 + is-read-cookie: false
  116 + # token前缀
  117 + token-prefix: "Bearer"
  118 + # jwt秘钥
  119 + jwt-secret-key: c681bbee566211f0a1580242ac110004
  120 +
  121 +# security配置
  122 +security:
  123 + # 排除路径
  124 + excludes:
  125 + # 静态资源
  126 + - /*.html
  127 + - /**/*.html
  128 + - /**/*.css
  129 + - /**/*.js
  130 + # 公共路径
  131 + - /favicon.ico
  132 + - /error
  133 + # swagger 文档配置
  134 + - /*/api-docs
  135 + - /*/api-docs/**
  136 + # actuator 监控配置
  137 + - /actuator
  138 + - /actuator/**
  139 + - /test/**
  140 +
  141 +# MyBatisPlus配置
  142 +# https://baomidou.com/config/
  143 +mybatis-plus:
  144 + # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  145 + # 例如 com.**.**.mapper
  146 + mapperPackage: com.ruoyi.**.mapper
  147 + # 对应的 XML 文件位置
  148 + mapperLocations: classpath*:mapper/**/*Mapper.xml
  149 + # 实体扫描,多个package用逗号或者分号分隔
  150 + typeAliasesPackage: com.ruoyi.**.domain
  151 + # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  152 + checkConfigLocation: false
  153 + configuration:
  154 + # 自动驼峰命名规则(camel case)映射
  155 + mapUnderscoreToCamelCase: true
  156 + # MyBatis 自动映射策略
  157 + # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  158 + autoMappingBehavior: PARTIAL
  159 + # MyBatis 自动映射时未知列或未知属性处理策
  160 + # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  161 + autoMappingUnknownColumnBehavior: NONE
  162 + # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  163 + # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  164 + # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  165 + logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  166 + global-config:
  167 + # 是否打印 Logo banner
  168 + banner: true
  169 + dbConfig:
  170 + # 主键类型
  171 + # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  172 + idType: ASSIGN_ID
  173 + # 逻辑已删除值
  174 + logicDeleteValue: 2
  175 + # 逻辑未删除值
  176 + logicNotDeleteValue: 0
  177 + # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  178 + # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  179 + insertStrategy: NOT_NULL
  180 + # 字段验证策略之 update,在 update 的时候的字段验证策略
  181 + updateStrategy: NOT_NULL
  182 + # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  183 + where-strategy: NOT_NULL
  184 +
  185 +# 数据加密
  186 +mybatis-encryptor:
  187 + # 是否开启加密
  188 + enable: true
  189 + # 默认加密算法
  190 + algorithm: BASE64
  191 + # 编码方式 BASE64/HEX。默认BASE64
  192 + encode: BASE64
  193 + # 安全秘钥 对称算法的秘钥 如:AES,SM4
  194 + password:
  195 + # 公私钥 非对称算法的公私钥 如:SM2,RSA
  196 + publicKey:
  197 + privateKey:
  198 +
  199 +springdoc:
  200 + api-docs:
  201 + # 是否开启接口文档
  202 + enabled: true
  203 +# swagger-ui:
  204 +# # 持久化认证数据
  205 +# persistAuthorization: true
  206 + info:
  207 + # 标题
  208 + title: '标题:${ruoyi.name}后台管理系统_接口文档'
  209 + # 描述
  210 + description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  211 + # 版本
  212 + version: '版本号: ${ruoyi-vue-plus.version}'
  213 + # 作者信息
  214 + contact:
  215 + name: Lion Li
  216 + email: crazylionli@163.com
  217 + url: https://gitee.com/dromara/RuoYi-Vue-Plus
  218 + components:
  219 + # 鉴权方式配置
  220 + security-schemes:
  221 + apiKey:
  222 + type: APIKEY
  223 + in: HEADER
  224 + name: ${sa-token.token-name}
  225 + #这里定义了两个分组,可定义多个,也可以不定义
  226 + group-configs:
  227 + - group: 1.演示模块
  228 + packages-to-scan: com.ruoyi.demo
  229 + - group: 2.系统模块
  230 + packages-to-scan: com.ruoyi.web
  231 + - group: 3.代码生成模块
  232 + packages-to-scan: com.ruoyi.generator
  233 +
  234 +# 防止XSS攻击
  235 +xss:
  236 + # 过滤开关
  237 + enabled: true
  238 + # 排除链接(多个用逗号分隔)
  239 + excludes: /system/notice
  240 + # 匹配链接
  241 + urlPatterns: /system/*,/monitor/*,/tool/*
  242 +
  243 +# 全局线程池相关配置
  244 +thread-pool:
  245 + # 是否开启线程池
  246 + enabled: false
  247 + # 队列最大长度
  248 + queueCapacity: 128
  249 + # 线程池维护线程所允许的空闲时间
  250 + keepAliveSeconds: 300
  251 +
  252 +--- # 分布式锁 lock4j 全局配置
  253 +lock4j:
  254 + # 获取分布式锁超时时间,默认为 3000 毫秒
  255 + acquire-timeout: 3000
  256 + # 分布式锁的超时时间,默认为 30 秒
  257 + expire: 30000
  258 +
  259 +--- # Actuator 监控端点的配置项
  260 +management:
  261 + health:
  262 + db:
  263 + enabled: false # 禁用所有数据源的健康检查
  264 + endpoints:
  265 + web:
  266 + exposure:
  267 + include: '*'
  268 + endpoint:
  269 + health:
  270 + show-details: ALWAYS
  271 + logfile:
  272 + external-file: ./logs/sys-console.log
  1 +Application Version: ${fp-scm.version}
  2 +Spring Boot Version: ${spring-boot.version}
  3 +__________ _____.___.__ ____ ____ __________.__
  4 +\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
  5 + | _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
  6 + | | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
  7 + |____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
  8 + \/ \/ \/ \/
  1 +#错误消息
  2 +not.null=* 必须填写
  3 +user.jcaptcha.error=验证码错误
  4 +user.jcaptcha.expire=验证码已失效
  5 +user.not.exists=对不起, 您的账号:{0} 不存在.
  6 +user.password.not.match=用户不存在/密码错误
  7 +user.password.retry.limit.count=密码输入错误{0}次
  8 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
  9 +user.password.delete=对不起,您的账号:{0} 已被删除
  10 +user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
  11 +role.blocked=角色已封禁,请联系管理员
  12 +user.logout.success=退出成功
  13 +length.not.valid=长度必须在{min}到{max}个字符之间
  14 +user.username.not.blank=用户名不能为空
  15 +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
  16 +user.username.length.valid=账户长度必须在{min}到{max}个字符之间
  17 +user.password.not.blank=用户密码不能为空
  18 +user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
  19 +user.password.not.valid=* 5-50个字符
  20 +user.email.not.valid=邮箱格式错误
  21 +user.email.not.blank=邮箱不能为空
  22 +user.phonenumber.not.blank=用户手机号不能为空
  23 +user.mobile.phone.number.not.valid=手机号格式错误
  24 +user.login.success=登录成功
  25 +user.register.success=注册成功
  26 +user.register.save.error=保存用户 {0} 失败,注册账号已存在
  27 +user.register.error=注册失败,请联系系统管理人员
  28 +user.notfound=请重新登录
  29 +user.forcelogout=管理员强制退出,请重新登录
  30 +user.unknown.error=未知错误,请重新登录
  31 +##文件上传消息
  32 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
  33 +upload.filename.exceed.length=上传的文件名最长{0}个字符
  34 +##权限
  35 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
  36 +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
  37 +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
  38 +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
  39 +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
  40 +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
  41 +repeat.submit.message=不允许重复提交,请稍候再试
  42 +rate.limiter.message=访问过于频繁,请稍候再试
  43 +sms.code.not.blank=短信验证码不能为空
  44 +sms.code.retry.limit.count=短信验证码输入错误{0}次
  45 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
  46 +email.code.not.blank=邮箱验证码不能为空
  47 +email.code.retry.limit.count=邮箱验证码输入错误{0}次
  48 +email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟
  49 +xcx.code.not.blank=小程序code不能为空
  1 +#错误消息
  2 +not.null=* Required fill in
  3 +user.jcaptcha.error=Captcha error
  4 +user.jcaptcha.expire=Captcha invalid
  5 +user.not.exists=Sorry, your account: {0} does not exist
  6 +user.password.not.match=User does not exist/Password error
  7 +user.password.retry.limit.count=Password input error {0} times
  8 +user.password.retry.limit.exceed=Password input error {0} times, account locked for {1} minutes
  9 +user.password.delete=Sorry, your account:{0} has been deleted
  10 +user.blocked=Sorry, your account: {0} has been disabled. Please contact the administrator
  11 +role.blocked=Role disabled,please contact administrators
  12 +user.logout.success=Exit successful
  13 +length.not.valid=The length must be between {min} and {max} characters
  14 +user.username.not.blank=Username cannot be blank
  15 +user.username.not.valid=* 2 to 20 chinese characters, letters, numbers or underscores, and must start with a non number
  16 +user.username.length.valid=Account length must be between {min} and {max} characters
  17 +user.password.not.blank=Password cannot be empty
  18 +user.password.length.valid=Password length must be between {min} and {max} characters
  19 +user.password.not.valid=* 5-50 characters
  20 +user.email.not.valid=Mailbox format error
  21 +user.email.not.blank=Mailbox cannot be blank
  22 +user.phonenumber.not.blank=Phone number cannot be blank
  23 +user.mobile.phone.number.not.valid=Phone number format error
  24 +user.login.success=Login successful
  25 +user.register.success=Register successful
  26 +user.register.save.error=Failed to save user {0}, The registered account already exists
  27 +user.register.error=Register failed, please contact system administrator
  28 +user.notfound=Please login again
  29 +user.forcelogout=The administrator is forced to exit,please login again
  30 +user.unknown.error=Unknown error, please login again
  31 +##文件上传消息
  32 +upload.exceed.maxSize=The uploaded file size exceeds the limit file size!<br/>the maximum allowed file size is:{0}MB!
  33 +upload.filename.exceed.length=The maximum length of uploaded file name is {0} characters
  34 +##权限
  35 +no.permission=You do not have permission to the data,please contact your administrator to add permissions [{0}]
  36 +no.create.permission=You do not have permission to create data,please contact your administrator to add permissions [{0}]
  37 +no.update.permission=You do not have permission to modify data,please contact your administrator to add permissions [{0}]
  38 +no.delete.permission=You do not have permission to delete data,please contact your administrator to add permissions [{0}]
  39 +no.export.permission=You do not have permission to export data,please contact your administrator to add permissions [{0}]
  40 +no.view.permission=You do not have permission to view data,please contact your administrator to add permissions [{0}]
  41 +repeat.submit.message=Repeat submit is not allowed, please try again later
  42 +rate.limiter.message=Visit too frequently, please try again later
  43 +sms.code.not.blank=Sms code cannot be blank
  44 +sms.code.retry.limit.count=Sms code input error {0} times
  45 +sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {1} minutes
  46 +email.code.not.blank=Email code cannot be blank
  47 +email.code.retry.limit.count=Email code input error {0} times
  48 +email.code.retry.limit.exceed=Email code input error {0} times, account locked for {1} minutes
  49 +xcx.code.not.blank=Mini program code cannot be blank
  1 +#错误消息
  2 +not.null=* 必须填写
  3 +user.jcaptcha.error=验证码错误
  4 +user.jcaptcha.expire=验证码已失效
  5 +user.not.exists=对不起, 您的账号:{0} 不存在.
  6 +user.password.not.match=用户不存在/密码错误
  7 +user.password.retry.limit.count=密码输入错误{0}次
  8 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
  9 +user.password.delete=对不起,您的账号:{0} 已被删除
  10 +user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
  11 +role.blocked=角色已封禁,请联系管理员
  12 +user.logout.success=退出成功
  13 +length.not.valid=长度必须在{min}到{max}个字符之间
  14 +user.username.not.blank=用户名不能为空
  15 +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
  16 +user.username.length.valid=账户长度必须在{min}到{max}个字符之间
  17 +user.password.not.blank=用户密码不能为空
  18 +user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
  19 +user.password.not.valid=* 5-50个字符
  20 +user.email.not.valid=邮箱格式错误
  21 +user.email.not.blank=邮箱不能为空
  22 +user.phonenumber.not.blank=用户手机号不能为空
  23 +user.mobile.phone.number.not.valid=手机号格式错误
  24 +user.login.success=登录成功
  25 +user.register.success=注册成功
  26 +user.register.save.error=保存用户 {0} 失败,注册账号已存在
  27 +user.register.error=注册失败,请联系系统管理人员
  28 +user.notfound=请重新登录
  29 +user.forcelogout=管理员强制退出,请重新登录
  30 +user.unknown.error=未知错误,请重新登录
  31 +##文件上传消息
  32 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
  33 +upload.filename.exceed.length=上传的文件名最长{0}个字符
  34 +##权限
  35 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
  36 +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
  37 +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
  38 +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
  39 +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
  40 +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
  41 +repeat.submit.message=不允许重复提交,请稍候再试
  42 +rate.limiter.message=访问过于频繁,请稍候再试
  43 +sms.code.not.blank=短信验证码不能为空
  44 +sms.code.retry.limit.count=短信验证码输入错误{0}次
  45 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
  46 +email.code.not.blank=邮箱验证码不能为空
  47 +email.code.retry.limit.count=邮箱验证码输入错误{0}次
  48 +email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟
  49 +xcx.code.not.blank=小程序code不能为空
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<configuration>
  3 + <property name="log.path" value="./logs"/>
  4 + <property name="console.log.pattern"
  5 + value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
  6 + <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
  7 +
  8 + <!-- 控制台输出 -->
  9 + <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  10 + <encoder>
  11 + <pattern>${console.log.pattern}</pattern>
  12 + <charset>utf-8</charset>
  13 + </encoder>
  14 + </appender>
  15 +
  16 + <!-- 控制台输出 -->
  17 + <appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
  18 + <file>${log.path}/garage-console.log</file>
  19 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  20 + <!-- 日志文件名格式 -->
  21 + <fileNamePattern>${log.path}/garage-console.%d{yyyy-MM-dd}.log</fileNamePattern>
  22 + <!-- 日志最大 1天 -->
  23 + <maxHistory>1</maxHistory>
  24 + </rollingPolicy>
  25 + <encoder>
  26 + <pattern>${log.pattern}</pattern>
  27 + <charset>utf-8</charset>
  28 + </encoder>
  29 + <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  30 + <!-- 过滤的级别 -->
  31 + <level>INFO</level>
  32 + </filter>
  33 + </appender>
  34 +
  35 + <!-- 系统日志输出 -->
  36 + <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
  37 + <file>${log.path}/garage-info.log</file>
  38 + <!-- 循环政策:基于时间创建日志文件 -->
  39 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  40 + <!-- 日志文件名格式 -->
  41 + <fileNamePattern>${log.path}/garage-info.%d{yyyy-MM-dd}.log</fileNamePattern>
  42 + <!-- 日志最大的历史 60天 -->
  43 + <maxHistory>60</maxHistory>
  44 + </rollingPolicy>
  45 + <encoder>
  46 + <pattern>${log.pattern}</pattern>
  47 + </encoder>
  48 + <filter class="ch.qos.logback.classic.filter.LevelFilter">
  49 + <!-- 过滤的级别 -->
  50 + <level>INFO</level>
  51 + <!-- 匹配时的操作:接收(记录) -->
  52 + <onMatch>ACCEPT</onMatch>
  53 + <!-- 不匹配时的操作:拒绝(不记录) -->
  54 + <onMismatch>DENY</onMismatch>
  55 + </filter>
  56 + </appender>
  57 +
  58 + <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
  59 + <file>${log.path}/garage-error.log</file>
  60 + <!-- 循环政策:基于时间创建日志文件 -->
  61 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  62 + <!-- 日志文件名格式 -->
  63 + <fileNamePattern>${log.path}/garage-error.%d{yyyy-MM-dd}.log</fileNamePattern>
  64 + <!-- 日志最大的历史 60天 -->
  65 + <maxHistory>60</maxHistory>
  66 + </rollingPolicy>
  67 + <encoder>
  68 + <pattern>${log.pattern}</pattern>
  69 + </encoder>
  70 + <filter class="ch.qos.logback.classic.filter.LevelFilter">
  71 + <!-- 过滤的级别 -->
  72 + <level>ERROR</level>
  73 + <!-- 匹配时的操作:接收(记录) -->
  74 + <onMatch>ACCEPT</onMatch>
  75 + <!-- 不匹配时的操作:拒绝(不记录) -->
  76 + <onMismatch>DENY</onMismatch>
  77 + </filter>
  78 + </appender>
  79 +
  80 + <!-- info异步输出 -->
  81 + <appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
  82 + <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
  83 + <discardingThreshold>0</discardingThreshold>
  84 + <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
  85 + <queueSize>512</queueSize>
  86 + <!-- 添加附加的appender,最多只能添加一个 -->
  87 + <appender-ref ref="file_info"/>
  88 + </appender>
  89 +
  90 + <!-- error异步输出 -->
  91 + <appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
  92 + <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
  93 + <discardingThreshold>0</discardingThreshold>
  94 + <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
  95 + <queueSize>512</queueSize>
  96 + <!-- 添加附加的appender,最多只能添加一个 -->
  97 + <appender-ref ref="file_error"/>
  98 + </appender>
  99 +
  100 + <!-- 整合 skywalking 控制台输出 tid -->
  101 +<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
  102 +<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
  103 +<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
  104 +<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
  105 +<!-- </layout>-->
  106 +<!-- <charset>utf-8</charset>-->
  107 +<!-- </encoder>-->
  108 +<!-- </appender>-->
  109 +
  110 + <!-- 整合 skywalking 推送采集日志 -->
  111 +<!-- <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
  112 +<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
  113 +<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
  114 +<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
  115 +<!-- </layout>-->
  116 +<!-- <charset>utf-8</charset>-->
  117 +<!-- </encoder>-->
  118 +<!-- </appender>-->
  119 +
  120 + <!--系统操作日志-->
  121 + <root level="info">
  122 + <appender-ref ref="console" />
  123 + <appender-ref ref="async_info" />
  124 + <appender-ref ref="async_error" />
  125 + <appender-ref ref="file_console" />
  126 +<!-- <appender-ref ref="sky_log"/>-->
  127 + </root>
  128 +
  129 +</configuration>
  1 +# p6spy 性能分析插件配置文件
  2 +modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
  3 +# 自定义日志打印
  4 +logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
  5 +#日志输出到控制台
  6 +appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
  7 +# 使用日志系统记录 sql
  8 +#appender=com.p6spy.engine.spy.appender.Slf4JLogger
  9 +# 设置 p6spy driver 代理
  10 +#deregisterdrivers=true
  11 +# 取消JDBC URL前缀
  12 +useprefix=true
  13 +# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
  14 +excludecategories=info,debug,result,commit,resultset
  15 +# 日期格式
  16 +dateformat=yyyy-MM-dd HH:mm:ss
  17 +# SQL语句打印时间格式
  18 +databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
  19 +# 实际驱动可多个
  20 +#driverlist=org.h2.Driver
  21 +# 是否开启慢SQL记录
  22 +outagedetection=true
  23 +# 慢SQL记录标准 2 秒
  24 +outagedetectioninterval=2
  25 +# 是否过滤 Log
  26 +filter=true
  27 +# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
  28 +exclude=SELECT 1
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <artifactId>scm-platform-server</artifactId> 12 <artifactId>scm-platform-server</artifactId>
13 13
14 <description> 14 <description>
15 - web服务入口 15 + 平台端web服务入口
16 </description> 16 </description>
17 17
18 <dependencies> 18 <dependencies>
@@ -19,7 +19,7 @@ public class PlatformApplication { @@ -19,7 +19,7 @@ public class PlatformApplication {
19 SpringApplication application = new SpringApplication(PlatformApplication.class); 19 SpringApplication application = new SpringApplication(PlatformApplication.class);
20 application.setApplicationStartup(new BufferingApplicationStartup(2048)); 20 application.setApplicationStartup(new BufferingApplicationStartup(2048));
21 application.run(args); 21 application.run(args);
22 - System.out.println("FP SCM running successful..."); 22 + System.out.println("Platform Server running successful...");
23 } 23 }
24 24
25 } 25 }
1 -package com.ruoyi.system.runner; 1 +package com.ruoyi.runner;
2 2
3 import com.ruoyi.common.config.RuoYiConfig; 3 import com.ruoyi.common.config.RuoYiConfig;
4 import com.ruoyi.system.service.ISysConfigService; 4 import com.ruoyi.system.service.ISysConfigService;
@@ -16,6 +16,7 @@ import lombok.RequiredArgsConstructor; @@ -16,6 +16,7 @@ import lombok.RequiredArgsConstructor;
16 import org.springframework.validation.annotation.Validated; 16 import org.springframework.validation.annotation.Validated;
17 import org.springframework.web.bind.annotation.*; 17 import org.springframework.web.bind.annotation.*;
18 18
  19 +import javax.annotation.PostConstruct;
19 import javax.servlet.http.HttpServletResponse; 20 import javax.servlet.http.HttpServletResponse;
20 import java.util.ArrayList; 21 import java.util.ArrayList;
21 import java.util.List; 22 import java.util.List;
@@ -64,7 +64,7 @@ spring: @@ -64,7 +64,7 @@ spring:
64 driver-class-name: com.mysql.cj.jdbc.Driver 64 driver-class-name: com.mysql.cj.jdbc.Driver
65 # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 65 # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
66 # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) 66 # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
67 - url: jdbc:mysql://192.168.1.18:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true 67 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
68 username: root 68 username: root
69 password: root 69 password: root
70 # 从库数据源 70 # 从库数据源
@@ -72,7 +72,7 @@ spring: @@ -72,7 +72,7 @@ spring:
72 lazy: true 72 lazy: true
73 type: com.zaxxer.hikari.HikariDataSource 73 type: com.zaxxer.hikari.HikariDataSource
74 driver-class-name: com.mysql.cj.jdbc.Driver 74 driver-class-name: com.mysql.cj.jdbc.Driver
75 - url: jdbc:mysql://192.168.1.18:3306/fp_scm2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true 75 + url: jdbc:mysql://192.168.3.117:3306/fp_scm2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
76 username: root 76 username: root
77 password: root 77 password: root
78 shardingsphere: 78 shardingsphere:
@@ -81,7 +81,7 @@ spring: @@ -81,7 +81,7 @@ spring:
81 ds0: 81 ds0:
82 type: com.zaxxer.hikari.HikariDataSource 82 type: com.zaxxer.hikari.HikariDataSource
83 driver-class-name: com.mysql.cj.jdbc.Driver 83 driver-class-name: com.mysql.cj.jdbc.Driver
84 - url: jdbc:mysql://192.168.1.18:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true 84 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
85 username: root 85 username: root
86 password: root 86 password: root
87 87
@@ -120,7 +120,7 @@ spring: @@ -120,7 +120,7 @@ spring:
120 spring: 120 spring:
121 redis: 121 redis:
122 # 地址 122 # 地址
123 - host: 192.168.1.18 123 + host: 192.168.3.117
124 # 端口,默认为6379 124 # 端口,默认为6379
125 port: 6379 125 port: 6379
126 # 数据库索引 126 # 数据库索引
1 # 项目相关配置 1 # 项目相关配置
2 ruoyi: 2 ruoyi:
3 # 名称 3 # 名称
4 - name: RuoYi-Vue-Plus 4 + name: Platform-Server
5 # 版本 5 # 版本
6 - version: ${ruoyi-vue-plus.version} 6 + version: ${fp-scm.version}
7 # 版权年份 7 # 版权年份
8 - copyrightYear: 2023 8 + copyrightYear: 2025
9 # 缓存懒加载 9 # 缓存懒加载
10 cacheLazy: false 10 cacheLazy: false
11 11
@@ -116,7 +116,7 @@ sa-token: @@ -116,7 +116,7 @@ sa-token:
116 # token前缀 116 # token前缀
117 token-prefix: "Bearer" 117 token-prefix: "Bearer"
118 # jwt秘钥 118 # jwt秘钥
119 - jwt-secret-key: abcdefghijklmnopqrstuvwxyz 119 + jwt-secret-key: c681bbee566211f0a1580242ac110004
120 120
121 # security配置 121 # security配置
122 security: 122 security:
1 -Application Version: ${ruoyi-vue-plus.version} 1 +Application Version: ${fp-scm.version}
2 Spring Boot Version: ${spring-boot.version} 2 Spring Boot Version: ${spring-boot.version}
3 __________ _____.___.__ ____ ____ __________.__ 3 __________ _____.___.__ ____ ____ __________.__
4 \______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______ 4 \______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
@@ -15,10 +15,10 @@ @@ -15,10 +15,10 @@
15 15
16 <!-- 控制台输出 --> 16 <!-- 控制台输出 -->
17 <appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender"> 17 <appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
18 - <file>${log.path}/sys-console.log</file> 18 + <file>${log.path}/platform-console.log</file>
19 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 19 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
20 <!-- 日志文件名格式 --> 20 <!-- 日志文件名格式 -->
21 - <fileNamePattern>${log.path}/sys-console.%d{yyyy-MM-dd}.log</fileNamePattern> 21 + <fileNamePattern>${log.path}/platform-console.%d{yyyy-MM-dd}.log</fileNamePattern>
22 <!-- 日志最大 1天 --> 22 <!-- 日志最大 1天 -->
23 <maxHistory>1</maxHistory> 23 <maxHistory>1</maxHistory>
24 </rollingPolicy> 24 </rollingPolicy>
@@ -34,11 +34,11 @@ @@ -34,11 +34,11 @@
34 34
35 <!-- 系统日志输出 --> 35 <!-- 系统日志输出 -->
36 <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> 36 <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
37 - <file>${log.path}/sys-info.log</file> 37 + <file>${log.path}/platform-info.log</file>
38 <!-- 循环政策:基于时间创建日志文件 --> 38 <!-- 循环政策:基于时间创建日志文件 -->
39 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 39 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
40 <!-- 日志文件名格式 --> 40 <!-- 日志文件名格式 -->
41 - <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern> 41 + <fileNamePattern>${log.path}/platform-info.%d{yyyy-MM-dd}.log</fileNamePattern>
42 <!-- 日志最大的历史 60天 --> 42 <!-- 日志最大的历史 60天 -->
43 <maxHistory>60</maxHistory> 43 <maxHistory>60</maxHistory>
44 </rollingPolicy> 44 </rollingPolicy>
@@ -56,11 +56,11 @@ @@ -56,11 +56,11 @@
56 </appender> 56 </appender>
57 57
58 <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> 58 <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
59 - <file>${log.path}/sys-error.log</file> 59 + <file>${log.path}/platform-error.log</file>
60 <!-- 循环政策:基于时间创建日志文件 --> 60 <!-- 循环政策:基于时间创建日志文件 -->
61 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 61 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
62 <!-- 日志文件名格式 --> 62 <!-- 日志文件名格式 -->
63 - <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern> 63 + <fileNamePattern>${log.path}/platform-error.%d{yyyy-MM-dd}.log</fileNamePattern>
64 <!-- 日志最大的历史 60天 --> 64 <!-- 日志最大的历史 60天 -->
65 <maxHistory>60</maxHistory> 65 <maxHistory>60</maxHistory>
66 </rollingPolicy> 66 </rollingPolicy>
@@ -6,7 +6,7 @@ dataSources: @@ -6,7 +6,7 @@ dataSources:
6 coupon_user_db_0: 6 coupon_user_db_0:
7 dataSourceClassName: com.zaxxer.hikari.HikariDataSource 7 dataSourceClassName: com.zaxxer.hikari.HikariDataSource
8 driverClassName: com.mysql.jdbc.Driver 8 driverClassName: com.mysql.jdbc.Driver
9 - jdbcUrl: jdbc:mysql://192.168.1.18:3306/ruoyi-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true 9 + jdbcUrl: jdbc:mysql://192.168.3.117:3306/ruoyi-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
10 username: root 10 username: root
11 password: root 11 password: root
12 12
@@ -2,20 +2,121 @@ @@ -2,20 +2,121 @@
2 <project xmlns="http://maven.apache.org/POM/4.0.0" 2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 - <modelVersion>4.0.0</modelVersion>  
6 <parent> 5 <parent>
7 <groupId>com.scm</groupId> 6 <groupId>com.scm</groupId>
8 <artifactId>fp_scm</artifactId> 7 <artifactId>fp_scm</artifactId>
9 <version>4.8.2</version> 8 <version>4.8.2</version>
10 </parent> 9 </parent>
11 10
12 - <groupId>com.ruoyi.encrypt</groupId> 11 + <modelVersion>4.0.0</modelVersion>
  12 + <packaging>jar</packaging>
13 <artifactId>scm-supplier-server</artifactId> 13 <artifactId>scm-supplier-server</artifactId>
14 14
15 - <properties>  
16 - <maven.compiler.source>11</maven.compiler.source>  
17 - <maven.compiler.target>11</maven.compiler.target>  
18 - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
19 - </properties> 15 + <description>
  16 + 汽配端web服务入口
  17 + </description>
  18 +
  19 + <dependencies>
  20 +
  21 + <!-- spring-boot-devtools -->
  22 + <dependency>
  23 + <groupId>org.springframework.boot</groupId>
  24 + <artifactId>spring-boot-devtools</artifactId>
  25 + <optional>true</optional> <!-- 表示依赖不会传递 -->
  26 + </dependency>
  27 +
  28 + <!-- Mysql驱动包 -->
  29 + <dependency>
  30 + <groupId>com.mysql</groupId>
  31 + <artifactId>mysql-connector-j</artifactId>
  32 + </dependency>
  33 + <!-- Oracle -->
  34 + <dependency>
  35 + <groupId>com.oracle.database.jdbc</groupId>
  36 + <artifactId>ojdbc8</artifactId>
  37 + </dependency>
  38 + <!-- PostgreSql -->
  39 + <dependency>
  40 + <groupId>org.postgresql</groupId>
  41 + <artifactId>postgresql</artifactId>
  42 + </dependency>
  43 + <!-- SqlServer -->
  44 + <dependency>
  45 + <groupId>com.microsoft.sqlserver</groupId>
  46 + <artifactId>mssql-jdbc</artifactId>
  47 + </dependency>
  48 +
  49 +
  50 + <dependency>
  51 + <groupId>com.scm</groupId>
  52 + <artifactId>scm-system</artifactId>
  53 + </dependency>
  54 +
  55 + <!--
  56 + <dependency>
  57 + <groupId>com.scm</groupId>
  58 + <artifactId>ruoyi-job</artifactId>
  59 + </dependency>
  60 + -->
  61 +
  62 + <!-- 代码生成-->
  63 + <dependency>
  64 + <groupId>com.scm</groupId>
  65 + <artifactId>scm-generator</artifactId>
  66 + </dependency>
  67 +
  68 + <dependency>
  69 + <groupId>com.scm</groupId>
  70 + <artifactId>scm-ratelimiter</artifactId>
  71 + </dependency>
  72 +
  73 + <dependency>
  74 + <groupId>org.springframework.boot</groupId>
  75 + <artifactId>spring-boot-starter-test</artifactId>
  76 + <scope>test</scope>
  77 + </dependency>
  78 +
  79 + <!-- skywalking 整合 logback -->
  80 + <!-- <dependency>-->
  81 + <!-- <groupId>org.apache.skywalking</groupId>-->
  82 + <!-- <artifactId>apm-toolkit-logback-1.x</artifactId>-->
  83 + <!-- <version>${与你的agent探针版本保持一致}</version>-->
  84 + <!-- </dependency>-->
  85 + <!-- <dependency>-->
  86 + <!-- <groupId>org.apache.skywalking</groupId>-->
  87 + <!-- <artifactId>apm-toolkit-trace</artifactId>-->
  88 + <!-- <version>${与你的agent探针版本保持一致}</version>-->
  89 + <!-- </dependency>-->
  90 +
  91 + </dependencies>
20 92
  93 + <build>
  94 + <finalName>${project.artifactId}</finalName>
  95 + <plugins>
  96 + <plugin>
  97 + <groupId>org.springframework.boot</groupId>
  98 + <artifactId>spring-boot-maven-plugin</artifactId>
  99 + <version>${spring-boot.version}</version>
  100 + <configuration>
  101 + <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  102 + </configuration>
  103 + <executions>
  104 + <execution>
  105 + <goals>
  106 + <goal>repackage</goal>
  107 + </goals>
  108 + </execution>
  109 + </executions>
  110 + </plugin>
  111 + <plugin>
  112 + <groupId>org.apache.maven.plugins</groupId>
  113 + <artifactId>maven-war-plugin</artifactId>
  114 + <version>3.2.2</version>
  115 + <configuration>
  116 + <failOnMissingWebXml>false</failOnMissingWebXml>
  117 + <warName>${project.artifactId}</warName>
  118 + </configuration>
  119 + </plugin>
  120 + </plugins>
  121 + </build>
21 </project> 122 </project>
  1 +package com.ruoyi;
  2 +
  3 +import org.springframework.boot.SpringApplication;
  4 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  5 +import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
  6 +
  7 +/**
  8 + * 启动程序
  9 + *
  10 + * @author ruoyi
  11 + */
  12 +
  13 +@SpringBootApplication
  14 +public class SupplierApplication {
  15 +
  16 + public static void main(String[] args) {
  17 + System.setProperty("spring.devtools.restart.enabled", "false");
  18 + SpringApplication application = new SpringApplication(SupplierApplication.class);
  19 + application.setApplicationStartup(new BufferingApplicationStartup(2048));
  20 + application.run(args);
  21 + System.out.println("Supplier Server running successful...");
  22 + }
  23 +
  24 +}
  1 +package com.ruoyi;
  2 +
  3 +import org.springframework.boot.builder.SpringApplicationBuilder;
  4 +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  5 +
  6 +/**
  7 + * web容器中进行部署
  8 + *
  9 + * @author ruoyi
  10 + */
  11 +public class SupplierServletInitializer extends SpringBootServletInitializer {
  12 +
  13 + @Override
  14 + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  15 + return application.sources(SupplierApplication.class);
  16 + }
  17 +
  18 +}
  1 +--- # 监控中心配置
  2 +spring.boot.admin.client:
  3 + # 增加客户端开关
  4 + enabled: true
  5 + url: http://localhost:9090/admin
  6 + instance:
  7 + service-host-type: IP
  8 + username: ruoyi
  9 + password: 123456
  10 +
  11 +--- # xxl-job 配置
  12 +xxl.job:
  13 + # 执行器开关
  14 + enabled: true
  15 + # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  16 + admin-addresses: http://localhost:9100/xxl-job-admin
  17 + # 执行器通讯TOKEN:非空时启用
  18 + access-token: xxl-job
  19 + executor:
  20 + # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  21 + appname: xxl-job-executor
  22 + # 28080 端口 随着主应用端口飘逸 避免集群冲突
  23 + port: 2${server.port}
  24 + # 执行器注册:默认IP:PORT
  25 + address:
  26 + # 执行器IP:默认自动获取IP
  27 + ip:
  28 + # 执行器运行日志文件存储磁盘路径
  29 + logpath: ./logs/xxl-job
  30 + # 执行器日志文件保存天数:大于3生效
  31 + logretentiondays: 30
  32 +
  33 +--- # 数据源配置
  34 +spring:
  35 + datasource:
  36 + type: com.zaxxer.hikari.HikariDataSource
  37 + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  38 + dynamic:
  39 + # 性能分析插件(有性能损耗 不建议生产环境使用)
  40 + p6spy: true
  41 + # 设置默认的数据源或者数据源组,默认值即为 master
  42 + primary: master
  43 + # 严格模式 匹配不到数据源则报错
  44 + strict: true
  45 + hikari:
  46 + # 最大连接池数量
  47 + maxPoolSize: 20
  48 + # 最小空闲线程数量
  49 + minIdle: 10
  50 + # 配置获取连接等待超时的时间
  51 + connectionTimeout: 30000
  52 + # 校验超时时间
  53 + validationTimeout: 5000
  54 + # 空闲连接存活最大时间,默认10分钟
  55 + idleTimeout: 600000
  56 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  57 + maxLifetime: 1800000
  58 + # 多久检查一次连接的活性
  59 + keepaliveTime: 30000
  60 + datasource:
  61 + # 主库数据源
  62 + master:
  63 + type: com.zaxxer.hikari.HikariDataSource
  64 + driver-class-name: com.mysql.cj.jdbc.Driver
  65 + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  66 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  67 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  68 + username: root
  69 + password: root
  70 + # 从库数据源
  71 + slave:
  72 + lazy: true
  73 + type: com.zaxxer.hikari.HikariDataSource
  74 + driver-class-name: com.mysql.cj.jdbc.Driver
  75 + url: jdbc:mysql://192.168.3.117:3306/fp_scm2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  76 + username: root
  77 + password: root
  78 + shardingsphere:
  79 + datasource:
  80 + names: ds0
  81 + ds0:
  82 + type: com.zaxxer.hikari.HikariDataSource
  83 + driver-class-name: com.mysql.cj.jdbc.Driver
  84 + url: jdbc:mysql://192.168.3.117:3306/fp_scm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  85 + username: root
  86 + password: root
  87 +
  88 + rules: # 配置表规则
  89 + sharding:
  90 + # 表策略配置
  91 + tables:
  92 + # iot_device_log 是逻辑表
  93 + iot_device_log:
  94 + actualDataNodes: ds0.iot_device_log_$->{2025}0$->{1..9},ds0.iot_device_log_$->{2025}1$->{0..2}
  95 + tableStrategy:
  96 + # 使用标准分片策略
  97 + standard:
  98 + # 配置分片字段
  99 + shardingColumn: create_time
  100 + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
  101 + shardingAlgorithmName: time-sharding-algorithm
  102 + # 分片算法配置
  103 + shardingAlgorithms:
  104 + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
  105 + time-sharding-algorithm:
  106 + # 类型:自定义策略
  107 + type: CLASS_BASED
  108 + props:
  109 + # 分片策略
  110 + strategy: standard
  111 + # 分片算法类
  112 + algorithmClassName: com.ruoyi.mybatis.config.sharding.TimeShardingAlgorithm
  113 + props:
  114 + sql-show: true # 是否打印 ShardingSphere 生成的 SQL
  115 + show-process-log: true # 是否显示处理日志
  116 +
  117 +
  118 +
  119 +--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  120 +spring:
  121 + redis:
  122 + # 地址
  123 + host: 192.168.3.117
  124 + # 端口,默认为6379
  125 + port: 6379
  126 + # 数据库索引
  127 + database: 0
  128 + # 密码(如没有密码请注释掉)
  129 + password: zkqk666888
  130 + # 连接超时时间
  131 + timeout: 10s
  132 + # 是否开启ssl
  133 + ssl: false
  134 +
  135 +redisson:
  136 + # redis key前缀
  137 + keyPrefix:
  138 + # 线程池数量
  139 + threads: 4
  140 + # Netty线程池数量
  141 + nettyThreads: 8
  142 + # 单节点配置
  143 + singleServerConfig:
  144 + # 客户端名称
  145 + clientName: ${ruoyi.name}
  146 + # 最小空闲连接数
  147 + connectionMinimumIdleSize: 8
  148 + # 连接池大小
  149 + connectionPoolSize: 32
  150 + # 连接空闲超时,单位:毫秒
  151 + idleConnectionTimeout: 10000
  152 + # 命令等待超时,单位:毫秒
  153 + timeout: 3000
  154 + # 发布和订阅连接池大小
  155 + subscriptionConnectionPoolSize: 50
  156 +
  157 +--- # mail 邮件发送
  158 +mail:
  159 + enabled: false
  160 + host: smtp.163.com
  161 + port: 465
  162 + # 是否需要用户名密码验证
  163 + auth: true
  164 + # 发送方,遵循RFC-822标准
  165 + from: xxx@163.com
  166 + # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  167 + user: xxx@163.com
  168 + # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  169 + pass: xxxxxxxxxx
  170 + # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  171 + starttlsEnable: true
  172 + # 使用SSL安全连接
  173 + sslEnable: true
  174 + # SMTP超时时长,单位毫秒,缺省值不超时
  175 + timeout: 0
  176 + # Socket连接超时值,单位毫秒,缺省值不超时
  177 + connectionTimeout: 0
  178 +
  179 +--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  180 +# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  181 +sms:
  182 + # 阿里云 dysmsapi.aliyuncs.com
  183 + alibaba:
  184 + #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  185 + requestUrl: dysmsapi.aliyuncs.com
  186 + #阿里云的accessKey
  187 + accessKeyId: xxxxxxx
  188 + #阿里云的accessKeySecret
  189 + accessKeySecret: xxxxxxx
  190 + #短信签名
  191 + signature: 测试
  192 + tencent:
  193 + #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  194 + requestUrl: sms.tencentcloudapi.com
  195 + #腾讯云的accessKey
  196 + accessKeyId: xxxxxxx
  197 + #腾讯云的accessKeySecret
  198 + accessKeySecret: xxxxxxx
  199 + #短信签名
  200 + signature: 测试
  201 + #短信sdkAppId
  202 + sdkAppId: appid
  203 + #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  204 + territory: ap-guangzhou
  1 +--- # 临时文件存储位置 避免临时文件被系统清理报错
  2 +spring.servlet.multipart.location: /ruoyi/server/temp
  3 +
  4 +--- # 监控中心配置
  5 +spring.boot.admin.client:
  6 + # 增加客户端开关
  7 + enabled: true
  8 + url: http://localhost:9090/admin
  9 + instance:
  10 + service-host-type: IP
  11 + username: ruoyi
  12 + password: 123456
  13 +
  14 +--- # xxl-job 配置
  15 +xxl.job:
  16 + # 执行器开关
  17 + enabled: true
  18 + # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  19 + admin-addresses: http://localhost:9100/xxl-job-admin
  20 + # 执行器通讯TOKEN:非空时启用
  21 + access-token: xxl-job
  22 + executor:
  23 + # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  24 + appname: xxl-job-executor
  25 + # 28080 端口 随着主应用端口飘逸 避免集群冲突
  26 + port: 2${server.port}
  27 + # 执行器注册:默认IP:PORT
  28 + address:
  29 + # 执行器IP:默认自动获取IP
  30 + ip:
  31 + # 执行器运行日志文件存储磁盘路径
  32 + logpath: ./logs/xxl-job
  33 + # 执行器日志文件保存天数:大于3生效
  34 + logretentiondays: 30
  35 +
  36 +--- # 数据源配置
  37 +spring:
  38 + datasource:
  39 + type: com.zaxxer.hikari.HikariDataSource
  40 + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  41 + dynamic:
  42 + # 性能分析插件(有性能损耗 不建议生产环境使用)
  43 + p6spy: false
  44 + # 设置默认的数据源或者数据源组,默认值即为 master
  45 + primary: master
  46 + # 严格模式 匹配不到数据源则报错
  47 + strict: true
  48 + datasource:
  49 + # 主库数据源
  50 + master:
  51 + type: ${spring.datasource.type}
  52 + driverClassName: com.mysql.cj.jdbc.Driver
  53 + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  54 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  55 + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  56 + username: root
  57 + password: root
  58 + # 从库数据源
  59 + slave:
  60 + lazy: true
  61 + type: ${spring.datasource.type}
  62 + driverClassName: com.mysql.cj.jdbc.Driver
  63 + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  64 + username:
  65 + password:
  66 +# oracle:
  67 +# type: ${spring.datasource.type}
  68 +# driverClassName: oracle.jdbc.OracleDriver
  69 +# url: jdbc:oracle:thin:@//localhost:1521/XE
  70 +# username: ROOT
  71 +# password: root
  72 +# postgres:
  73 +# type: ${spring.datasource.type}
  74 +# driverClassName: org.postgresql.Driver
  75 +# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  76 +# username: root
  77 +# password: root
  78 +# sqlserver:
  79 +# type: ${spring.datasource.type}
  80 +# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  81 +# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  82 +# username: SA
  83 +# password: root
  84 + hikari:
  85 + # 最大连接池数量
  86 + maxPoolSize: 20
  87 + # 最小空闲线程数量
  88 + minIdle: 10
  89 + # 配置获取连接等待超时的时间
  90 + connectionTimeout: 30000
  91 + # 校验超时时间
  92 + validationTimeout: 5000
  93 + # 空闲连接存活最大时间,默认10分钟
  94 + idleTimeout: 600000
  95 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  96 + maxLifetime: 1800000
  97 + # 多久检查一次连接的活性
  98 + keepaliveTime: 30000
  99 +
  100 +--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  101 +spring:
  102 + redis:
  103 + # 地址
  104 + host: localhost
  105 + # 端口,默认为6379
  106 + port: 6379
  107 + # 数据库索引
  108 + database: 0
  109 + # 密码(如没有密码请注释掉)
  110 + # password:
  111 + # 连接超时时间
  112 + timeout: 10s
  113 + # 是否开启ssl
  114 + ssl: false
  115 +
  116 +redisson:
  117 + # redis key前缀
  118 + keyPrefix:
  119 + # 线程池数量
  120 + threads: 16
  121 + # Netty线程池数量
  122 + nettyThreads: 32
  123 + # 单节点配置
  124 + singleServerConfig:
  125 + # 客户端名称
  126 + clientName: ${ruoyi.name}
  127 + # 最小空闲连接数
  128 + connectionMinimumIdleSize: 32
  129 + # 连接池大小
  130 + connectionPoolSize: 64
  131 + # 连接空闲超时,单位:毫秒
  132 + idleConnectionTimeout: 10000
  133 + # 命令等待超时,单位:毫秒
  134 + timeout: 3000
  135 + # 发布和订阅连接池大小
  136 + subscriptionConnectionPoolSize: 50
  137 +
  138 +--- # mail 邮件发送
  139 +mail:
  140 + enabled: false
  141 + host: smtp.163.com
  142 + port: 465
  143 + # 是否需要用户名密码验证
  144 + auth: true
  145 + # 发送方,遵循RFC-822标准
  146 + from: xxx@163.com
  147 + # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  148 + user: xxx@163.com
  149 + # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  150 + pass: xxxxxxxxxx
  151 + # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  152 + starttlsEnable: true
  153 + # 使用SSL安全连接
  154 + sslEnable: true
  155 + # SMTP超时时长,单位毫秒,缺省值不超时
  156 + timeout: 0
  157 + # Socket连接超时值,单位毫秒,缺省值不超时
  158 + connectionTimeout: 0
  159 +
  160 +--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  161 +# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  162 +sms:
  163 + # 阿里云 dysmsapi.aliyuncs.com
  164 + alibaba:
  165 + #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  166 + requestUrl: dysmsapi.aliyuncs.com
  167 + #阿里云的accessKey
  168 + accessKeyId: xxxxxxx
  169 + #阿里云的accessKeySecret
  170 + accessKeySecret: xxxxxxx
  171 + #短信签名
  172 + signature: 测试
  173 + tencent:
  174 + #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  175 + requestUrl: sms.tencentcloudapi.com
  176 + #腾讯云的accessKey
  177 + accessKeyId: xxxxxxx
  178 + #腾讯云的accessKeySecret
  179 + accessKeySecret: xxxxxxx
  180 + #短信签名
  181 + signature: 测试
  182 + #短信sdkAppId
  183 + sdkAppId: appid
  184 + #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  185 + territory: ap-guangzhou
  1 +# 项目相关配置
  2 +ruoyi:
  3 + # 名称
  4 + name: Supplier-Server
  5 + # 版本
  6 + version: ${fp-scm.version}
  7 + # 版权年份
  8 + copyrightYear: 2025
  9 + # 缓存懒加载
  10 + cacheLazy: false
  11 +
  12 +captcha:
  13 + # 页面 <参数设置> 可开启关闭 验证码校验
  14 + # 验证码类型 math 数组计算 char 字符验证
  15 + type: MATH
  16 + # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  17 + category: CIRCLE
  18 + # 数字验证码位数
  19 + numberLength: 1
  20 + # 字符验证码长度
  21 + charLength: 4
  22 +
  23 +# 开发环境配置
  24 +server:
  25 + # 服务器的HTTP端口,默认为8080
  26 + port: 8082
  27 + servlet:
  28 + # 应用的访问路径
  29 + context-path: /
  30 + # undertow 配置
  31 + undertow:
  32 + # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  33 + max-http-post-size: -1
  34 + # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  35 + # 每块buffer的空间大小,越小的空间被利用越充分
  36 + buffer-size: 512
  37 + # 是否分配的直接内存
  38 + direct-buffers: true
  39 + threads:
  40 + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  41 + io: 8
  42 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  43 + worker: 256
  44 +
  45 +# 日志配置
  46 +logging:
  47 + level:
  48 + com.ruoyi: @logging.level@
  49 + org.springframework: warn
  50 + config: classpath:logback-plus.xml
  51 +
  52 +# 用户配置
  53 +user:
  54 + password:
  55 + # 密码最大错误次数
  56 + maxRetryCount: 5
  57 + # 密码锁定时间(默认10分钟)
  58 + lockTime: 10
  59 +
  60 +# Spring配置
  61 +spring:
  62 + application:
  63 + name: ${ruoyi.name}
  64 + # 资源信息
  65 + messages:
  66 + # 国际化资源文件路径
  67 + basename: i18n/messages
  68 + profiles:
  69 + active: @profiles.active@
  70 + # 文件上传
  71 + servlet:
  72 + multipart:
  73 + # 单个文件大小
  74 + max-file-size: 10MB
  75 + # 设置总上传的文件大小
  76 + max-request-size: 20MB
  77 + # 服务模块
  78 + devtools:
  79 + restart:
  80 + # 热部署开关
  81 + enabled: true
  82 + mvc:
  83 + format:
  84 + date-time: yyyy-MM-dd HH:mm:ss
  85 + jackson:
  86 + # 日期格式化
  87 + date-format: yyyy-MM-dd HH:mm:ss
  88 + serialization:
  89 + # 格式化输出
  90 + indent_output: false
  91 + # 忽略无法转换的对象
  92 + fail_on_empty_beans: false
  93 + deserialization:
  94 + # 允许对象忽略json中不存在的属性
  95 + fail_on_unknown_properties: false
  96 +
  97 +# Sa-Token配置
  98 +sa-token:
  99 + # token名称 (同时也是cookie名称)
  100 + token-name: Authorization
  101 + # token有效期 设为一天 (必定过期) 单位: 秒
  102 + timeout: 86400
  103 + # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
  104 + # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
  105 + active-timeout: 1800
  106 + # 允许动态设置 token 有效期
  107 + dynamic-active-timeout: true
  108 + # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  109 + is-concurrent: true
  110 + # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  111 + is-share: false
  112 + # 是否尝试从header里读取token
  113 + is-read-header: true
  114 + # 是否尝试从cookie里读取token
  115 + is-read-cookie: false
  116 + # token前缀
  117 + token-prefix: "Bearer"
  118 + # jwt秘钥
  119 + jwt-secret-key: c681bbee566211f0a1580242ac110004
  120 +
  121 +# security配置
  122 +security:
  123 + # 排除路径
  124 + excludes:
  125 + # 静态资源
  126 + - /*.html
  127 + - /**/*.html
  128 + - /**/*.css
  129 + - /**/*.js
  130 + # 公共路径
  131 + - /favicon.ico
  132 + - /error
  133 + # swagger 文档配置
  134 + - /*/api-docs
  135 + - /*/api-docs/**
  136 + # actuator 监控配置
  137 + - /actuator
  138 + - /actuator/**
  139 + - /test/**
  140 +
  141 +# MyBatisPlus配置
  142 +# https://baomidou.com/config/
  143 +mybatis-plus:
  144 + # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  145 + # 例如 com.**.**.mapper
  146 + mapperPackage: com.ruoyi.**.mapper
  147 + # 对应的 XML 文件位置
  148 + mapperLocations: classpath*:mapper/**/*Mapper.xml
  149 + # 实体扫描,多个package用逗号或者分号分隔
  150 + typeAliasesPackage: com.ruoyi.**.domain
  151 + # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  152 + checkConfigLocation: false
  153 + configuration:
  154 + # 自动驼峰命名规则(camel case)映射
  155 + mapUnderscoreToCamelCase: true
  156 + # MyBatis 自动映射策略
  157 + # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  158 + autoMappingBehavior: PARTIAL
  159 + # MyBatis 自动映射时未知列或未知属性处理策
  160 + # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  161 + autoMappingUnknownColumnBehavior: NONE
  162 + # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  163 + # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  164 + # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  165 + logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  166 + global-config:
  167 + # 是否打印 Logo banner
  168 + banner: true
  169 + dbConfig:
  170 + # 主键类型
  171 + # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  172 + idType: ASSIGN_ID
  173 + # 逻辑已删除值
  174 + logicDeleteValue: 2
  175 + # 逻辑未删除值
  176 + logicNotDeleteValue: 0
  177 + # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  178 + # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  179 + insertStrategy: NOT_NULL
  180 + # 字段验证策略之 update,在 update 的时候的字段验证策略
  181 + updateStrategy: NOT_NULL
  182 + # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  183 + where-strategy: NOT_NULL
  184 +
  185 +# 数据加密
  186 +mybatis-encryptor:
  187 + # 是否开启加密
  188 + enable: true
  189 + # 默认加密算法
  190 + algorithm: BASE64
  191 + # 编码方式 BASE64/HEX。默认BASE64
  192 + encode: BASE64
  193 + # 安全秘钥 对称算法的秘钥 如:AES,SM4
  194 + password:
  195 + # 公私钥 非对称算法的公私钥 如:SM2,RSA
  196 + publicKey:
  197 + privateKey:
  198 +
  199 +springdoc:
  200 + api-docs:
  201 + # 是否开启接口文档
  202 + enabled: true
  203 +# swagger-ui:
  204 +# # 持久化认证数据
  205 +# persistAuthorization: true
  206 + info:
  207 + # 标题
  208 + title: '标题:${ruoyi.name}后台管理系统_接口文档'
  209 + # 描述
  210 + description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  211 + # 版本
  212 + version: '版本号: ${ruoyi-vue-plus.version}'
  213 + # 作者信息
  214 + contact:
  215 + name: Lion Li
  216 + email: crazylionli@163.com
  217 + url: https://gitee.com/dromara/RuoYi-Vue-Plus
  218 + components:
  219 + # 鉴权方式配置
  220 + security-schemes:
  221 + apiKey:
  222 + type: APIKEY
  223 + in: HEADER
  224 + name: ${sa-token.token-name}
  225 + #这里定义了两个分组,可定义多个,也可以不定义
  226 + group-configs:
  227 + - group: 1.演示模块
  228 + packages-to-scan: com.ruoyi.demo
  229 + - group: 2.系统模块
  230 + packages-to-scan: com.ruoyi.web
  231 + - group: 3.代码生成模块
  232 + packages-to-scan: com.ruoyi.generator
  233 +
  234 +# 防止XSS攻击
  235 +xss:
  236 + # 过滤开关
  237 + enabled: true
  238 + # 排除链接(多个用逗号分隔)
  239 + excludes: /system/notice
  240 + # 匹配链接
  241 + urlPatterns: /system/*,/monitor/*,/tool/*
  242 +
  243 +# 全局线程池相关配置
  244 +thread-pool:
  245 + # 是否开启线程池
  246 + enabled: false
  247 + # 队列最大长度
  248 + queueCapacity: 128
  249 + # 线程池维护线程所允许的空闲时间
  250 + keepAliveSeconds: 300
  251 +
  252 +--- # 分布式锁 lock4j 全局配置
  253 +lock4j:
  254 + # 获取分布式锁超时时间,默认为 3000 毫秒
  255 + acquire-timeout: 3000
  256 + # 分布式锁的超时时间,默认为 30 秒
  257 + expire: 30000
  258 +
  259 +--- # Actuator 监控端点的配置项
  260 +management:
  261 + health:
  262 + db:
  263 + enabled: false # 禁用所有数据源的健康检查
  264 + endpoints:
  265 + web:
  266 + exposure:
  267 + include: '*'
  268 + endpoint:
  269 + health:
  270 + show-details: ALWAYS
  271 + logfile:
  272 + external-file: ./logs/sys-console.log
  1 +Application Version: ${fp-scm.version}
  2 +Spring Boot Version: ${spring-boot.version}
  3 +__________ _____.___.__ ____ ____ __________.__
  4 +\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
  5 + | _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
  6 + | | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
  7 + |____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
  8 + \/ \/ \/ \/
  1 +#错误消息
  2 +not.null=* 必须填写
  3 +user.jcaptcha.error=验证码错误
  4 +user.jcaptcha.expire=验证码已失效
  5 +user.not.exists=对不起, 您的账号:{0} 不存在.
  6 +user.password.not.match=用户不存在/密码错误
  7 +user.password.retry.limit.count=密码输入错误{0}次
  8 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
  9 +user.password.delete=对不起,您的账号:{0} 已被删除
  10 +user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
  11 +role.blocked=角色已封禁,请联系管理员
  12 +user.logout.success=退出成功
  13 +length.not.valid=长度必须在{min}到{max}个字符之间
  14 +user.username.not.blank=用户名不能为空
  15 +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
  16 +user.username.length.valid=账户长度必须在{min}到{max}个字符之间
  17 +user.password.not.blank=用户密码不能为空
  18 +user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
  19 +user.password.not.valid=* 5-50个字符
  20 +user.email.not.valid=邮箱格式错误
  21 +user.email.not.blank=邮箱不能为空
  22 +user.phonenumber.not.blank=用户手机号不能为空
  23 +user.mobile.phone.number.not.valid=手机号格式错误
  24 +user.login.success=登录成功
  25 +user.register.success=注册成功
  26 +user.register.save.error=保存用户 {0} 失败,注册账号已存在
  27 +user.register.error=注册失败,请联系系统管理人员
  28 +user.notfound=请重新登录
  29 +user.forcelogout=管理员强制退出,请重新登录
  30 +user.unknown.error=未知错误,请重新登录
  31 +##文件上传消息
  32 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
  33 +upload.filename.exceed.length=上传的文件名最长{0}个字符
  34 +##权限
  35 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
  36 +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
  37 +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
  38 +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
  39 +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
  40 +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
  41 +repeat.submit.message=不允许重复提交,请稍候再试
  42 +rate.limiter.message=访问过于频繁,请稍候再试
  43 +sms.code.not.blank=短信验证码不能为空
  44 +sms.code.retry.limit.count=短信验证码输入错误{0}次
  45 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
  46 +email.code.not.blank=邮箱验证码不能为空
  47 +email.code.retry.limit.count=邮箱验证码输入错误{0}次
  48 +email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟
  49 +xcx.code.not.blank=小程序code不能为空
  1 +#错误消息
  2 +not.null=* Required fill in
  3 +user.jcaptcha.error=Captcha error
  4 +user.jcaptcha.expire=Captcha invalid
  5 +user.not.exists=Sorry, your account: {0} does not exist
  6 +user.password.not.match=User does not exist/Password error
  7 +user.password.retry.limit.count=Password input error {0} times
  8 +user.password.retry.limit.exceed=Password input error {0} times, account locked for {1} minutes
  9 +user.password.delete=Sorry, your account:{0} has been deleted
  10 +user.blocked=Sorry, your account: {0} has been disabled. Please contact the administrator
  11 +role.blocked=Role disabled,please contact administrators
  12 +user.logout.success=Exit successful
  13 +length.not.valid=The length must be between {min} and {max} characters
  14 +user.username.not.blank=Username cannot be blank
  15 +user.username.not.valid=* 2 to 20 chinese characters, letters, numbers or underscores, and must start with a non number
  16 +user.username.length.valid=Account length must be between {min} and {max} characters
  17 +user.password.not.blank=Password cannot be empty
  18 +user.password.length.valid=Password length must be between {min} and {max} characters
  19 +user.password.not.valid=* 5-50 characters
  20 +user.email.not.valid=Mailbox format error
  21 +user.email.not.blank=Mailbox cannot be blank
  22 +user.phonenumber.not.blank=Phone number cannot be blank
  23 +user.mobile.phone.number.not.valid=Phone number format error
  24 +user.login.success=Login successful
  25 +user.register.success=Register successful
  26 +user.register.save.error=Failed to save user {0}, The registered account already exists
  27 +user.register.error=Register failed, please contact system administrator
  28 +user.notfound=Please login again
  29 +user.forcelogout=The administrator is forced to exit,please login again
  30 +user.unknown.error=Unknown error, please login again
  31 +##文件上传消息
  32 +upload.exceed.maxSize=The uploaded file size exceeds the limit file size!<br/>the maximum allowed file size is:{0}MB!
  33 +upload.filename.exceed.length=The maximum length of uploaded file name is {0} characters
  34 +##权限
  35 +no.permission=You do not have permission to the data,please contact your administrator to add permissions [{0}]
  36 +no.create.permission=You do not have permission to create data,please contact your administrator to add permissions [{0}]
  37 +no.update.permission=You do not have permission to modify data,please contact your administrator to add permissions [{0}]
  38 +no.delete.permission=You do not have permission to delete data,please contact your administrator to add permissions [{0}]
  39 +no.export.permission=You do not have permission to export data,please contact your administrator to add permissions [{0}]
  40 +no.view.permission=You do not have permission to view data,please contact your administrator to add permissions [{0}]
  41 +repeat.submit.message=Repeat submit is not allowed, please try again later
  42 +rate.limiter.message=Visit too frequently, please try again later
  43 +sms.code.not.blank=Sms code cannot be blank
  44 +sms.code.retry.limit.count=Sms code input error {0} times
  45 +sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {1} minutes
  46 +email.code.not.blank=Email code cannot be blank
  47 +email.code.retry.limit.count=Email code input error {0} times
  48 +email.code.retry.limit.exceed=Email code input error {0} times, account locked for {1} minutes
  49 +xcx.code.not.blank=Mini program code cannot be blank
  1 +#错误消息
  2 +not.null=* 必须填写
  3 +user.jcaptcha.error=验证码错误
  4 +user.jcaptcha.expire=验证码已失效
  5 +user.not.exists=对不起, 您的账号:{0} 不存在.
  6 +user.password.not.match=用户不存在/密码错误
  7 +user.password.retry.limit.count=密码输入错误{0}次
  8 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
  9 +user.password.delete=对不起,您的账号:{0} 已被删除
  10 +user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
  11 +role.blocked=角色已封禁,请联系管理员
  12 +user.logout.success=退出成功
  13 +length.not.valid=长度必须在{min}到{max}个字符之间
  14 +user.username.not.blank=用户名不能为空
  15 +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
  16 +user.username.length.valid=账户长度必须在{min}到{max}个字符之间
  17 +user.password.not.blank=用户密码不能为空
  18 +user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
  19 +user.password.not.valid=* 5-50个字符
  20 +user.email.not.valid=邮箱格式错误
  21 +user.email.not.blank=邮箱不能为空
  22 +user.phonenumber.not.blank=用户手机号不能为空
  23 +user.mobile.phone.number.not.valid=手机号格式错误
  24 +user.login.success=登录成功
  25 +user.register.success=注册成功
  26 +user.register.save.error=保存用户 {0} 失败,注册账号已存在
  27 +user.register.error=注册失败,请联系系统管理人员
  28 +user.notfound=请重新登录
  29 +user.forcelogout=管理员强制退出,请重新登录
  30 +user.unknown.error=未知错误,请重新登录
  31 +##文件上传消息
  32 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
  33 +upload.filename.exceed.length=上传的文件名最长{0}个字符
  34 +##权限
  35 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
  36 +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
  37 +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
  38 +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
  39 +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
  40 +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
  41 +repeat.submit.message=不允许重复提交,请稍候再试
  42 +rate.limiter.message=访问过于频繁,请稍候再试
  43 +sms.code.not.blank=短信验证码不能为空
  44 +sms.code.retry.limit.count=短信验证码输入错误{0}次
  45 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
  46 +email.code.not.blank=邮箱验证码不能为空
  47 +email.code.retry.limit.count=邮箱验证码输入错误{0}次
  48 +email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟
  49 +xcx.code.not.blank=小程序code不能为空
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<configuration>
  3 + <property name="log.path" value="./logs"/>
  4 + <property name="console.log.pattern"
  5 + value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
  6 + <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
  7 +
  8 + <!-- 控制台输出 -->
  9 + <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  10 + <encoder>
  11 + <pattern>${console.log.pattern}</pattern>
  12 + <charset>utf-8</charset>
  13 + </encoder>
  14 + </appender>
  15 +
  16 + <!-- 控制台输出 -->
  17 + <appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
  18 + <file>${log.path}/supplier-console.log</file>
  19 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  20 + <!-- 日志文件名格式 -->
  21 + <fileNamePattern>${log.path}/supplier-console.%d{yyyy-MM-dd}.log</fileNamePattern>
  22 + <!-- 日志最大 1天 -->
  23 + <maxHistory>1</maxHistory>
  24 + </rollingPolicy>
  25 + <encoder>
  26 + <pattern>${log.pattern}</pattern>
  27 + <charset>utf-8</charset>
  28 + </encoder>
  29 + <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  30 + <!-- 过滤的级别 -->
  31 + <level>INFO</level>
  32 + </filter>
  33 + </appender>
  34 +
  35 + <!-- 系统日志输出 -->
  36 + <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
  37 + <file>${log.path}/supplier-info.log</file>
  38 + <!-- 循环政策:基于时间创建日志文件 -->
  39 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  40 + <!-- 日志文件名格式 -->
  41 + <fileNamePattern>${log.path}/supplier-info.%d{yyyy-MM-dd}.log</fileNamePattern>
  42 + <!-- 日志最大的历史 60天 -->
  43 + <maxHistory>60</maxHistory>
  44 + </rollingPolicy>
  45 + <encoder>
  46 + <pattern>${log.pattern}</pattern>
  47 + </encoder>
  48 + <filter class="ch.qos.logback.classic.filter.LevelFilter">
  49 + <!-- 过滤的级别 -->
  50 + <level>INFO</level>
  51 + <!-- 匹配时的操作:接收(记录) -->
  52 + <onMatch>ACCEPT</onMatch>
  53 + <!-- 不匹配时的操作:拒绝(不记录) -->
  54 + <onMismatch>DENY</onMismatch>
  55 + </filter>
  56 + </appender>
  57 +
  58 + <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
  59 + <file>${log.path}/supplier-error.log</file>
  60 + <!-- 循环政策:基于时间创建日志文件 -->
  61 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  62 + <!-- 日志文件名格式 -->
  63 + <fileNamePattern>${log.path}/supplier-error.%d{yyyy-MM-dd}.log</fileNamePattern>
  64 + <!-- 日志最大的历史 60天 -->
  65 + <maxHistory>60</maxHistory>
  66 + </rollingPolicy>
  67 + <encoder>
  68 + <pattern>${log.pattern}</pattern>
  69 + </encoder>
  70 + <filter class="ch.qos.logback.classic.filter.LevelFilter">
  71 + <!-- 过滤的级别 -->
  72 + <level>ERROR</level>
  73 + <!-- 匹配时的操作:接收(记录) -->
  74 + <onMatch>ACCEPT</onMatch>
  75 + <!-- 不匹配时的操作:拒绝(不记录) -->
  76 + <onMismatch>DENY</onMismatch>
  77 + </filter>
  78 + </appender>
  79 +
  80 + <!-- info异步输出 -->
  81 + <appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
  82 + <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
  83 + <discardingThreshold>0</discardingThreshold>
  84 + <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
  85 + <queueSize>512</queueSize>
  86 + <!-- 添加附加的appender,最多只能添加一个 -->
  87 + <appender-ref ref="file_info"/>
  88 + </appender>
  89 +
  90 + <!-- error异步输出 -->
  91 + <appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
  92 + <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
  93 + <discardingThreshold>0</discardingThreshold>
  94 + <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
  95 + <queueSize>512</queueSize>
  96 + <!-- 添加附加的appender,最多只能添加一个 -->
  97 + <appender-ref ref="file_error"/>
  98 + </appender>
  99 +
  100 + <!-- 整合 skywalking 控制台输出 tid -->
  101 +<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
  102 +<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
  103 +<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
  104 +<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
  105 +<!-- </layout>-->
  106 +<!-- <charset>utf-8</charset>-->
  107 +<!-- </encoder>-->
  108 +<!-- </appender>-->
  109 +
  110 + <!-- 整合 skywalking 推送采集日志 -->
  111 +<!-- <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
  112 +<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
  113 +<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
  114 +<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
  115 +<!-- </layout>-->
  116 +<!-- <charset>utf-8</charset>-->
  117 +<!-- </encoder>-->
  118 +<!-- </appender>-->
  119 +
  120 + <!--系统操作日志-->
  121 + <root level="info">
  122 + <appender-ref ref="console" />
  123 + <appender-ref ref="async_info" />
  124 + <appender-ref ref="async_error" />
  125 + <appender-ref ref="file_console" />
  126 +<!-- <appender-ref ref="sky_log"/>-->
  127 + </root>
  128 +
  129 +</configuration>
  1 +# p6spy 性能分析插件配置文件
  2 +modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
  3 +# 自定义日志打印
  4 +logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
  5 +#日志输出到控制台
  6 +appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
  7 +# 使用日志系统记录 sql
  8 +#appender=com.p6spy.engine.spy.appender.Slf4JLogger
  9 +# 设置 p6spy driver 代理
  10 +#deregisterdrivers=true
  11 +# 取消JDBC URL前缀
  12 +useprefix=true
  13 +# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
  14 +excludecategories=info,debug,result,commit,resultset
  15 +# 日期格式
  16 +dateformat=yyyy-MM-dd HH:mm:ss
  17 +# SQL语句打印时间格式
  18 +databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
  19 +# 实际驱动可多个
  20 +#driverlist=org.h2.Driver
  21 +# 是否开启慢SQL记录
  22 +outagedetection=true
  23 +# 慢SQL记录标准 2 秒
  24 +outagedetectioninterval=2
  25 +# 是否过滤 Log
  26 +filter=true
  27 +# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
  28 +exclude=SELECT 1