·1
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
package com.lideeyunji.server;
|
||||
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
*/
|
||||
@MapperScan("${lideeyunji.info.base-package}.**.mapper.**") //低代码平台
|
||||
@SuppressWarnings("SpringComponentScan")
|
||||
@SpringBootApplication(scanBasePackages = {
|
||||
"${lideeyunji.info.base-package}.server",
|
||||
"${lideeyunji.info.base-package}.service",
|
||||
"${lideeyunji.info.base-package}.module",
|
||||
"${lideeyunji.info.base-package}.core",//核心模块
|
||||
"${lideeyunji.info.base-package}.**.spring"
|
||||
})
|
||||
public class lideeYunJiApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(lideeYunJiApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
40
lidee-admin/src/main/resources/application-local.yaml
Normal file
40
lidee-admin/src/main/resources/application-local.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
server:
|
||||
port: 48080
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
datasource:
|
||||
dynamic: # 多数据源配置
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
# MYSQL数据库 主库,业务库
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort001?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
lideeyunji: # 从库,框架库
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort001?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
slave: # 日志库单独
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort001?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: 123456
|
||||
redis:
|
||||
host: 127.0.0.1 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 2 # 数据库索引
|
||||
#password: lidee@123 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### 地代码平台相关配置 ####################
|
||||
|
||||
# 云玑配置项,设置当前项目所有自定义的配置
|
||||
lideeyunji:
|
||||
captcha:
|
||||
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试;
|
||||
demo: false # 关闭演示模式
|
||||
yunji: # 低代码平台
|
||||
debug: true #是否开启调试模式
|
||||
saveReqLog: false # 是否保存请求日志
|
||||
saveOpLog: false # 是否保存操作日志
|
||||
40
lidee-admin/src/main/resources/application-prod.yaml
Normal file
40
lidee-admin/src/main/resources/application-prod.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
server:
|
||||
port: 48080
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
datasource:
|
||||
dynamic: # 多数据源配置
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
# MYSQL数据库 主库,业务库
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: gryy@8888
|
||||
lideeyunji: # 从库,框架库
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: gryy@8888
|
||||
slave: # 日志库单独
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: gryy@8888
|
||||
redis:
|
||||
host: 127.0.0.1 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 15 # 数据库索引
|
||||
password: gryy@8888 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### 地代码平台相关配置 ####################
|
||||
|
||||
# 云玑配置项,设置当前项目所有自定义的配置
|
||||
lideeyunji:
|
||||
captcha:
|
||||
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试;
|
||||
demo: false # 关闭演示模式
|
||||
yunji: # 低代码平台
|
||||
debug: false #是否开启调试模式
|
||||
saveReqLog: true # 是否保存请求日志
|
||||
saveOpLog: true # 是否保存操作日志
|
||||
330
lidee-admin/src/main/resources/application.yaml
Normal file
330
lidee-admin/src/main/resources/application.yaml
Normal file
@@ -0,0 +1,330 @@
|
||||
spring:
|
||||
application:
|
||||
name: lideeyunji-server
|
||||
profiles:
|
||||
active: local # 读取配置
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||
|
||||
# Servlet 配置
|
||||
servlet:
|
||||
# 文件上传相关配置项
|
||||
multipart:
|
||||
max-file-size: 16MB # 单个文件大小
|
||||
max-request-size: 32MB # 设置总上传的文件大小
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
||||
|
||||
# Jackson 配置项
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
|
||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
||||
|
||||
# Cache 配置项
|
||||
cache:
|
||||
type: REDIS
|
||||
redis:
|
||||
time-to-live: 1h # 设置过期时间为 1 小时
|
||||
|
||||
--- #################### 接口文档配置 ####################
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
path: /swagger-ui
|
||||
default-flat-param-object: true
|
||||
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh_cn
|
||||
|
||||
# 工作流 Flowable 配置
|
||||
flowable:
|
||||
# 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
|
||||
# 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
|
||||
# 3. create_drop: 启动时自动创建表,关闭时自动删除表
|
||||
# 4. drop_create: 启动时,删除旧表,再创建新表
|
||||
database-schema-update: true # 设置为 false,可通过 https://github.com/flowable/flowable-sql 初始化
|
||||
db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置
|
||||
check-process-definitions: false # 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
|
||||
history-level: full # full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
|
||||
|
||||
# MyBatis Plus 的配置项
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
jdbc-type-for-null: 'null'
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
type-aliases-package: ${lideeyunji.info.base-package}.module.*.entity
|
||||
encryptor:
|
||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||
|
||||
mybatis-plus-join:
|
||||
banner: false # 是否打印 mybatis plus join banner,默认true
|
||||
sub-table-logic: true # 全局启用副表逻辑删除,默认true。关闭后关联查询不会加副表逻辑删除
|
||||
ms-cache: true # 拦截器MappedStatement缓存,默认 true
|
||||
table-alias: t # 表别名(默认 t)
|
||||
logic-del-type: on # 副表逻辑删除条件的位置,支持 WHERE、ON,默认 ON
|
||||
|
||||
# Spring Data Redis 配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
repositories:
|
||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
mvc:
|
||||
servlet:
|
||||
load-on-startup: 10
|
||||
# 数据源配置项
|
||||
autoconfigure:
|
||||
exclude:
|
||||
# - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
# - org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
||||
# - de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
||||
# - de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
||||
# - de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
datasource:
|
||||
druid: # Druid 【监控】相关的全局配置
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
allow: # 设置白名单,不填则允许所有访问
|
||||
url-pattern: /druid/*
|
||||
login-username: # 控制台管理用户名和密码
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
log-slow-sql: true # 慢 SQL 记录
|
||||
slow-sql-millis: 100
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
dynamic: # 多数据源配置
|
||||
druid: # Druid 【连接池】相关的全局配置
|
||||
initial-size: 10 # 初始连接数
|
||||
min-idle: 20 # 最小连接池数量
|
||||
max-active: 100 # 最大连接池数量
|
||||
max-wait: 60000 # 配置获取连接等待超时的时间,单位:毫秒
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
||||
min-evictable-idle-time-millis: 7200000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
||||
max-evictable-idle-time-millis: 25200000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
||||
#validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
socket-timeout: 60000 # socket超时时间,单位:毫秒
|
||||
connect-timeout: 60000 # 建立数据库连接超时时间,单位:毫秒
|
||||
|
||||
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
# Quartz 配置项,对应 QuartzProperties 配置类
|
||||
spring:
|
||||
quartz:
|
||||
auto-startup: true # 本地开发环境,尽量不要开启 Job
|
||||
scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
|
||||
job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
|
||||
wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
|
||||
properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
|
||||
org:
|
||||
quartz:
|
||||
# Scheduler 相关配置
|
||||
scheduler:
|
||||
instanceName: schedulerName
|
||||
instanceId: AUTO # 自动生成 instance ID
|
||||
# JobStore 相关配置
|
||||
jobStore:
|
||||
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
|
||||
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
|
||||
isClustered: true # 是集群模式
|
||||
clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
|
||||
misfireThreshold: 60000 # misfire 阀值,单位:毫秒。
|
||||
# 线程池相关配置
|
||||
threadPool:
|
||||
threadCount: 25 # 线程池大小。默认为 10 。
|
||||
threadPriority: 5 # 线程优先级
|
||||
class: org.quartz.simpl.SimpleThreadPool # 线程池类型
|
||||
jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置
|
||||
initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
# Lock4j 配置项
|
||||
lock4j:
|
||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
||||
|
||||
# Resilience4j 配置项
|
||||
resilience4j:
|
||||
ratelimiter:
|
||||
instances:
|
||||
backendA:
|
||||
limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50
|
||||
limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500
|
||||
timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
|
||||
register-health-indicator: true # 是否注册到健康监测
|
||||
|
||||
# Actuator 监控端点的配置项
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
||||
exposure:
|
||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
||||
|
||||
# Spring Boot Admin 配置项
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
# Spring Boot Admin Client 客户端的相关配置
|
||||
client:
|
||||
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
# Spring Boot Admin Server 服务端的相关配置
|
||||
context-path: /admin # 配置 Spring
|
||||
|
||||
--- #################### 验证码相关配置 ####################
|
||||
|
||||
aj:
|
||||
captcha:
|
||||
jigsaw: classpath:images/jigsaw # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
|
||||
pic-click: classpath:images/pic-click # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
|
||||
cache-type: redis # 缓存 local/redis...
|
||||
cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存
|
||||
timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行
|
||||
type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选
|
||||
water-mark: LideeYunJi # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
|
||||
interference-options: 0 # 滑动干扰项(0/1/2)
|
||||
req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false
|
||||
req-get-lock-limit: 5 # 验证失败 5 次,get接口锁定
|
||||
req-get-lock-seconds: 10 # 验证失败后,锁定时间间隔
|
||||
req-get-minute-limit: 30 # get 接口一分钟内请求数限制
|
||||
req-check-minute-limit: 60 # check 接口一分钟内请求数限制
|
||||
req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制
|
||||
|
||||
|
||||
--- #################### 第三方授权登录 ####################
|
||||
justauth:
|
||||
enabled: true
|
||||
type:
|
||||
DINGTALK: # 钉钉
|
||||
client-id: 123**************
|
||||
client-secret: 123**************
|
||||
ignore-check-redirect-uri: true
|
||||
|
||||
--- #################### 框架相关配置 ####################
|
||||
|
||||
lideeyunji:
|
||||
info:
|
||||
version: 2.2.4
|
||||
base-package: com.lideeyunji
|
||||
web-url: lidee.vip
|
||||
security:
|
||||
permit-all_urls:
|
||||
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
|
||||
- /admin-api/lideeyunji/open/** # 低代码平台,不需要登
|
||||
- /admin-api/lideeyunji/demo/**
|
||||
- /admin-api/lideeyunji/dingding/open/**
|
||||
websocket:
|
||||
enable: true # websocket的开关
|
||||
path: /infra/ws # 路径
|
||||
sender-type: local # 消息发送的类型,可选值为 local
|
||||
swagger:
|
||||
title: LideeYunJi低代码开发平台
|
||||
description: 提供管理后台所有功能
|
||||
version: ${lideeyunji.info.version}
|
||||
url: ${lideeyunji.info.web-url}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: false
|
||||
ignore-urls:
|
||||
- /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号
|
||||
- /admin-api/system/tenant/get-by-website # 基于域名获取租户,不许带租户编号
|
||||
- /admin-api/system/captcha/get # 获取图片验证码,和租户无关
|
||||
- /admin-api/system/captcha/check # 校验图片验证码,和租户无关
|
||||
- /admin-api/infra/file/*/get/** # 获取图片,和租户无关
|
||||
- /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号
|
||||
- /admin-api/lideeyunji/** # 低代码平台的全部放开,有自己的一套租户 规则
|
||||
ignore-tables:
|
||||
- DUAL
|
||||
- dual
|
||||
- ALL_TABLES
|
||||
- all_tables
|
||||
- ALL_INDEXES
|
||||
- all_indexes
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
- system_dict_data
|
||||
- system_dict_type
|
||||
- system_error_code
|
||||
- system_menu
|
||||
- system_sms_channel
|
||||
- system_sms_template
|
||||
- system_sms_log
|
||||
- system_sensitive_word
|
||||
- system_oauth2_client
|
||||
- system_mail_account
|
||||
- system_mail_template
|
||||
- system_mail_log
|
||||
- system_notify_template
|
||||
- system_notify_message
|
||||
- infra_codegen_column
|
||||
- infra_codegen_table
|
||||
- infra_config
|
||||
- infra_file_config
|
||||
- infra_file
|
||||
- infra_file_content
|
||||
- infra_job
|
||||
- infra_job_log
|
||||
- infra_data_source_config
|
||||
- tmp_report_data_1
|
||||
- tmp_report_data_income
|
||||
- 'yunji_dbform*' #低代码开头的不要多租户
|
||||
- 'yunji_desform*' #低代码开头的不要多租户
|
||||
- 'yunji_tab*' #低代码开头的不要多租户
|
||||
- 'yunji_report*' #低代码开头的不要多租户
|
||||
- 'yunji_log_*' #低代码开头的不要多租户
|
||||
- '*_seq' #oracle自增主键等
|
||||
- information_schema
|
||||
sms-code: # 短信验证码相关的配置项
|
||||
expire-times: 10m
|
||||
send-frequency: 1m
|
||||
send-maximum-quantity-per-day: 10
|
||||
begin-code: 9999 # 这里配置 9999 的原因是,测试方便。
|
||||
end-code: 9999 # 这里配置 9999 的原因是,测试方便。
|
||||
yunji: # 低代码平台相关配置项
|
||||
excludeTableNames: #不允许该类型的表开头
|
||||
- yunji_
|
||||
- qrtz_
|
||||
- system_
|
||||
- act_
|
||||
- bpm_
|
||||
- flw_
|
||||
- infra_
|
||||
#AES加解密 key 重新生成AesUtil.genAesKey()
|
||||
aesKey: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm
|
||||
ai:
|
||||
deepseek:
|
||||
apiKey: sk-b31fcf4e27bf45fbb65ace5bbc627d5d
|
||||
kimi:
|
||||
apiKey: sk-EE98wvDeTFvxRcBxDQmWhKQlewkGFIrfyCxvyNxDj8Vaf701
|
||||
debug: false
|
||||
94
lidee-admin/src/main/resources/logback-spring.xml
Normal file
94
lidee-admin/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="./logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/lideeyunji-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/lideeyunji-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/lideeyunji-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/lideeyunji-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
|
||||
<!-- 特定包的日志级别配置 -->
|
||||
<logger name="com.lideeyunji" level="INFO" />
|
||||
<logger name="com.lideeyunji.core.framework.mapper" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.core.framework.service" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.core.flow.mapper" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.core.flow.service" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.bpm.mapper" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.bpm.service" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.infra.mapper" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.infra.service" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.system.mapper" level="DEBUG" />
|
||||
<logger name="com.lideeyunji.service.system.service" level="DEBUG" />
|
||||
|
||||
<!-- 设置特定类只记录ERROR级别日志 -->
|
||||
<logger name="com.lideeyunji.core.framework.mapper.LogApiMapper" level="ERROR" />
|
||||
<logger name="com.lideeyunji.core.framework.mapper.LogApiErrorMapper" level="ERROR" />
|
||||
<logger name="com.lideeyunji.service.system.mapper.OperateLogMapper" level="ERROR" />
|
||||
<logger name="org.springframework.context.support.PostProcessorRegistrationDelegate" level="ERROR" />
|
||||
<logger name="org.mybatis.spring.mapper.ClassPathMapperScanner" level="ERROR" />
|
||||
<logger name="de.codecentric" level="ERROR" />
|
||||
|
||||
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user