add:第一版测试版本。
This commit is contained in:
@@ -14,11 +14,13 @@ package org.nl;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -31,6 +33,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@EnableTransactionManagement
|
||||
@MapperScan("org.nl.**.mapper")
|
||||
public class Application {
|
||||
|
||||
/* 解决druid 日志报错:discard long time none received connection:xxx */
|
||||
@@ -47,7 +52,7 @@ public class Application {
|
||||
@SneakyThrows
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(Application.class);
|
||||
springApplication.setBannerMode(Banner.Mode.OFF);
|
||||
// springApplication.setBannerMode(Banner.Mode.OFF);
|
||||
ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
|
||||
Environment env = configurableApplicationContext.getEnvironment();
|
||||
log.info("""
|
||||
|
||||
8
nl-web-app/src/main/resources/banner.txt
Normal file
8
nl-web-app/src/main/resources/banner.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
_ _ ___________ _ _____ _ ___________ _____
|
||||
| \ | | _ | ___ \ | | ___| | | ___| ___|_ _|
|
||||
| \| | | | | |_/ / | | |__ | | | |__ | |_ | |
|
||||
| . ` | | | | ___ \ | | __|| | | __|| _| | |
|
||||
| |\ \ \_/ / |_/ / |____| |___| |____| |___| | | |
|
||||
\_| \_/\___/\____/\_____/\____/\_____/\____/\_| \_/
|
||||
|
||||
:: Spring Boot :: (v3.2.1.RELEASE)
|
||||
93
nl-web-app/src/main/resources/config/application-dev.yml
Normal file
93
nl-web-app/src/main/resources/config/application-dev.yml
Normal file
@@ -0,0 +1,93 @@
|
||||
server:
|
||||
# 端口
|
||||
port: 8081
|
||||
tomcat:
|
||||
max-swallow-size: 100MB
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/nl_frobt?serverTimezone=GMT%2B8&characterEncoding=utf-8&userSSL=false
|
||||
username: root
|
||||
password: 123456
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://localhost:3306/nl_frobt?serverTimezone=GMT%2B8&characterEncoding=utf-8&userSSL=false
|
||||
# username: root
|
||||
# password: 123456
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
min-idle: 15
|
||||
# 最大连接数
|
||||
max-active: 30
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 3000
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 连接在池中最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: true
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 1
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 记录慢SQL
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
# 文件存储路径
|
||||
file:
|
||||
mac:
|
||||
path: ~/file/
|
||||
avatar: ~/avatar/
|
||||
linux:
|
||||
path: /home/eladmin/file/
|
||||
avatar: /home/eladmin/avatar/
|
||||
windows:
|
||||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
# 文件大小 /M
|
||||
maxSize: 100
|
||||
avatarMaxSize: 5
|
||||
|
||||
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# token有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: random-128
|
||||
# 是否输出操作日志
|
||||
is-log: true
|
||||
86
nl-web-app/src/main/resources/config/application-prod.yml
Normal file
86
nl-web-app/src/main/resources/config/application-prod.yml
Normal file
@@ -0,0 +1,86 @@
|
||||
server:
|
||||
# 端口
|
||||
port: 8011
|
||||
tomcat:
|
||||
max-swallow-size: 100MB
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.100.201:3307/nl_apt15e?serverTimezone=GMT%2B8&characterEncoding=utf-8&userSSL=false
|
||||
username: root
|
||||
password: 123456
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
min-idle: 15
|
||||
# 最大连接数
|
||||
max-active: 30
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 3000
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 连接在池中最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: true
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 1
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 记录慢SQL
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
# 文件存储路径
|
||||
file:
|
||||
mac:
|
||||
path: ~/file/
|
||||
avatar: ~/avatar/
|
||||
linux:
|
||||
path: /home/fr1511b/nlapt15e/file/
|
||||
avatar: /home/fr1511b/nlapt15e/avatar/
|
||||
windows:
|
||||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
# 文件大小 /M
|
||||
maxSize: 100
|
||||
avatarMaxSize: 5
|
||||
|
||||
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# token有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: random-128
|
||||
# 是否输出操作日志
|
||||
is-log: true
|
||||
54
nl-web-app/src/main/resources/config/application.yml
Normal file
54
nl-web-app/src/main/resources/config/application.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
messages:
|
||||
basename: language/task/task,language/error/error,language/buss/buss
|
||||
encoding: UTF-8
|
||||
profiles:
|
||||
active: dev
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: false
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mapper-locations: classpath*:org/nl/**/mapping/*.xml
|
||||
global-config:
|
||||
banner: false
|
||||
|
||||
logging:
|
||||
file:
|
||||
path: logs
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
customize:
|
||||
log-dir: ${logging.file.path}/root
|
||||
errorImage-dir: ErrorImage
|
||||
|
||||
#密码加密传输,前端公钥加密,后端私钥解密
|
||||
rsa:
|
||||
private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMjhH5OmC7osPfdelXwkX1uTW1vuj8miZIU546Y6dy7TI2RF04rcW2eneBqrvF/8Ni1b+A+bqAJfMi01TDBmdyp+7vyZzUPRXv02HpI/ZM9dkQhv2m4VnTNnWOM0mY/7fJtDfLXhfDNmBMz7h57oDUFV0ESQtp5i4K7hlIVeezijAgMBAAECgYBVuPQfruksPnsHGB7UhjUHQD/pYEmN8zXQQJ7sLeD0Y3ej78RRaq268xVm1Eij8V4xRyD5kCRHNtaTwj3MHb3V68QC3amBR392yay4+S5ZOEPOjZ64hMSZWPezHbemLMjtUn1NR1k1aGfaiGPEk3npiXJHf9ZXU2GGglLJ50eP+QJBAPD3TTRtOVuTIPQS+m0PEeW6ALZDp3EONoqOMePuGLqj38QjwV+jGdxzA+Hhsf8oQo+QG2S3YPph09TFZc3dvj0CQQDVaY9TGeDyxf2DDL/oBFecIkixkV/AWRJb9CrDCZ8H9K1xWuEmhIW1pFJ+gmjbZccZQe/n1M+tRKq9DPaXsiBfAkANgE27GkOUdfHquwV9BtMh5AIWNEQ1eW5k5QK2mqiYDIaFHtu+2Ayi5W7aQSMQANl54cEnK38riD+uNEE3/6yhAkAN3ZfkTFAjNd3sv81QI8gVatzSPKG9+4uH0etdVKiyeaEzNjZerEmLrat2cL6jUo+HApO1ukvr9AQr2EXFQVt9AkEAoQcTx50AK6osp15kAoOQH5NV7TF2qoDbkNfp4xJReLlNpn9oPh2CNQOuVfna5gDQmkaEaJwwVuBvWN5RPrp2HA==
|
||||
|
||||
# sa-token白名单配置
|
||||
security:
|
||||
# 排除路径
|
||||
excludes:
|
||||
# 认证
|
||||
- /auth/login
|
||||
# apt屏幕操作
|
||||
- /mapMonitor/**
|
||||
- /api/scheduleTask/**
|
||||
- /setting/**
|
||||
- /vehicle/**
|
||||
- /webSocket/**
|
||||
- /file/**
|
||||
- /routeInfo/**
|
||||
- /station/**
|
||||
# 静态资源
|
||||
- /*.html
|
||||
- /**/*.html
|
||||
- /**/*.css
|
||||
- /**/*.js
|
||||
@@ -0,0 +1,7 @@
|
||||
starting_point = 起点
|
||||
end_point = 终点
|
||||
successful = 操作成功!
|
||||
failed = 操作失败!
|
||||
latest = 已经是最新的!
|
||||
param_is_null = 参数为空!
|
||||
password_error = 账号或密码错误
|
||||
@@ -0,0 +1,7 @@
|
||||
starting_point = Starting Point
|
||||
end_point = End Point
|
||||
successful = successful!
|
||||
failed = Failed!
|
||||
latest = Already up to date!
|
||||
param_is_null = The parameter is empty!
|
||||
password_error = Wrong account or password
|
||||
@@ -0,0 +1,7 @@
|
||||
starting_point = 起点
|
||||
end_point = 终点
|
||||
successful = 操作成功!
|
||||
failed = 操作失败!
|
||||
latest = 已经是最新的!
|
||||
param_is_null = 参数为空!
|
||||
password_error = 账号或密码错误
|
||||
@@ -0,0 +1,29 @@
|
||||
error_request_vehicle = 访问车体接口异常:
|
||||
error_request_rcs = 访问RCS接口异常:
|
||||
error_starting_mapping = 开始建图失败
|
||||
error_cut_manually = 切手动失败
|
||||
error_cut_automatically = 切自动失败
|
||||
error_end_mapping = 结束建图失败
|
||||
error_set_station = 设置站点失败
|
||||
error_get_Maps = 获取地图列表失败
|
||||
error_deploy_maps = 部署地图失败
|
||||
error_app_maps = 应用地图失败
|
||||
error_get_map_pack = 获取地图包失败
|
||||
error_map_pack_isNull = "地图包数据为空,扫描失败。请重新建图"
|
||||
error_map_pgm = 地图PGM转换失败
|
||||
error_yaml_isNull = .YAML文件内容为空
|
||||
error_formatting_error = 格式错误
|
||||
error_parsing = YAML解析失败:
|
||||
error_process_map_pack = 处理地图包数据失败:
|
||||
error_png_convert_transparency = .png点云图将灰度图像转换为透明背景图像失败:
|
||||
error_p5 = 不支持的PGM格式,仅支持P5二进制格式
|
||||
error_invalid_size = 无效的尺寸格式
|
||||
error_pgm_parse = PGM解析错误:
|
||||
error_synchronized_map = 同步地图失败
|
||||
error_relocate = 重定位指令下发失败
|
||||
error_restart = 车体程序重启失败
|
||||
error_abandon_mapping = 放弃建图失败
|
||||
error_auto_back = 自动返回上一个点失败
|
||||
error_restart_system = 重启系统失败
|
||||
error_initializing_system = 初始化底层系统失败
|
||||
error_set_forkLegs= 操作叉腿避障失败
|
||||
@@ -0,0 +1,28 @@
|
||||
error_request_vehicle = Abnormal access to the vehicle body interface
|
||||
error_request_rcs = Accessing the RCS interface is abnormal
|
||||
error_starting_mapping = Failed to start mapping
|
||||
error_cut_manually = Cut manual failure
|
||||
error_cut_automatically = Cut automatically fails
|
||||
error_end_mapping = End mapping failed
|
||||
error_set_station = Setting up the site failed
|
||||
error_get_Maps = Failed to get the map list
|
||||
error_deploy_maps = Deploying the map failed
|
||||
error_app_maps = Applying the map failed
|
||||
error_get_map_pack = Failed to get the map package
|
||||
error_map_pack_isNull = The map package data is empty and the scan fails. Please rebuild the map
|
||||
error_map_pgm = Map PGM conversion failed
|
||||
error_yaml_isNull = .yaml file content is empty
|
||||
error_parsing = YAML parsing failed:
|
||||
error_process_map_pack = Failed to process map packet data:
|
||||
error_png_convert_transparency = Converting a grayscale image to a transparent background image .png a point cloud plot fails:
|
||||
error_p5 = PGM format is not supported, only P5 binary format is supported
|
||||
error_invalid_size = Invalid size format
|
||||
error_pgm_parse = PGM parsing error:
|
||||
error_synchronized_map = Syncing maps failed
|
||||
error_relocate = The relocation instruction failed to be issued
|
||||
error_restart = The body program restarts failed
|
||||
error_abandon_mapping = Abandoned mapping failed
|
||||
error_auto_back = Automatically returning to the previous point failed
|
||||
error_restart_system = Rebooting the system failed
|
||||
error_initializing_system = Initializing the underlying system failed
|
||||
error_set_forkLegs= The operation of the fork leg to avoid obstacles failed
|
||||
@@ -0,0 +1,28 @@
|
||||
error_request_vehicle = 访问车体接口异常
|
||||
error_request_rcs = 访问RCS接口异常
|
||||
error_starting_mapping = 开始建图失败
|
||||
error_cut_manually = 切手动失败
|
||||
error_cut_automatically = 切自动失败
|
||||
error_end_mapping = 结束建图失败
|
||||
error_set_station = 设置站点失败
|
||||
error_get_Maps = 获取地图列表失败
|
||||
error_deploy_maps = 部署地图失败
|
||||
error_app_maps = 应用地图失败
|
||||
error_get_map_pack = 获取地图包失败
|
||||
error_map_pack_isNull = "地图包数据为空,扫描失败。请重新建图"
|
||||
error_map_pgm = 地图PGM转换失败
|
||||
error_yaml_isNull = .YAML文件内容为空
|
||||
error_parsing = YAML解析失败:
|
||||
error_process_map_pack = 处理地图包数据失败:
|
||||
error_png_convert_transparency = .png点云图将灰度图像转换为透明背景图像失败:
|
||||
error_p5 = 不支持的PGM格式,仅支持P5二进制格式
|
||||
error_invalid_size = 无效的尺寸格式
|
||||
error_pgm_parse = PGM解析错误:
|
||||
error_synchronized_map = 同步地图失败
|
||||
error_relocate = 重定位指令下发失败
|
||||
error_restart = 车体程序重启失败
|
||||
error_abandon_mapping = 放弃建图失败
|
||||
error_auto_back = 自动返回上一个点失败
|
||||
error_restart_system = 重启系统失败
|
||||
error_initializing_system = 初始化底层系统失败
|
||||
error_set_forkLegs= 操作叉腿避障失败
|
||||
@@ -0,0 +1,5 @@
|
||||
task_Id_isNull=任务不存在!【{0}】
|
||||
task_Is_exist=当前有正在执行中的任务!
|
||||
task_Is_not_exist=当前没有任务在执行中!
|
||||
not_return_point = 没有返回点!
|
||||
task_cannot_be_enforced = 任务链操作类型无法执行,请重新选择
|
||||
@@ -0,0 +1,5 @@
|
||||
task_Id_isNull=The task with the task code of {0} was not found
|
||||
task_Is_exist=There are tasks in progress!
|
||||
task_Is_not_exist=No tasks are currently in progress!
|
||||
not_return_point = There is no return point!
|
||||
task_cannot_be_enforced = The task chain operation type cannot be executed, please select it again
|
||||
@@ -0,0 +1,5 @@
|
||||
task_Id_isNull=未找到任务编码为{0}的任务
|
||||
task_Is_exist=当前有正在执行中的任务!
|
||||
task_Is_not_exist=当前没有任务在执行中!
|
||||
not_return_point = 没有返回点!
|
||||
task_cannot_be_enforced = 任务链操作类型无法执行,请重新选择
|
||||
73
nl-web-app/src/main/resources/logback-spring.xml
Normal file
73
nl-web-app/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- 级别[ALL< Trace < DEBUG < INFO < WARN < ERROR < FATAL < OFF] -->
|
||||
<!-- monitorInterval(单位s)指定log4j自动重新配置的监测间隔时间-->
|
||||
<configuration scan="true" scanPeriod="30 seconds" debug="false">
|
||||
<property name="log.charset" value="utf-8"/>
|
||||
<property name="log.pattern" value="%black(nlAdmin-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36} - %method) - %white(%msg%n)"/>
|
||||
<SpringProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
|
||||
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 appender class 中的log.pattern 表示日志滚动输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 日志首次输出的文件地址 -->
|
||||
<!-- <file>${LOG_HOME}/info.log</file>-->
|
||||
<!-- 滚动输出策略:基于时间创建日志文件 ,这样第二天输出的日志,就会按照 fileNamePattern 新建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${LOG_HOME}/root/%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>20MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<!-- 日志内容输出格式设置为定义好的 log.pattern-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
<!-- 日志内容输出过滤器 -->
|
||||
<!-- <filter class="ch.qos.logback.classic.filter.LevelFilter">-->
|
||||
<!-- <!– 过滤的级别 –>-->
|
||||
<!-- <level>INFO</level>-->
|
||||
<!-- <!– 匹配时的操作:接收(记录) –>-->
|
||||
<!-- <onMatch>ACCEPT</onMatch>-->
|
||||
<!-- <!– 不匹配时的操作:拒绝(不记录) –>-->
|
||||
<!-- <onMismatch>DENY</onMismatch>-->
|
||||
<!-- </filter>-->
|
||||
</appender>
|
||||
|
||||
<!-- <appender name="async" class="ch.qos.logback.classic.AsyncAppender">-->
|
||||
<!-- <!– 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 –>-->
|
||||
<!-- <discardingThreshold>0</discardingThreshold>-->
|
||||
<!-- <queueSize>256</queueSize>-->
|
||||
<!-- <appender-ref ref="console"/>-->
|
||||
<!-- </appender>-->
|
||||
|
||||
<appender name="async_file_info" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
<queueSize>256</queueSize>
|
||||
<appender-ref ref="file_info"/>
|
||||
</appender>
|
||||
|
||||
<!--系统操作日志 root 根路径的日志级别 info -->
|
||||
<root level="info">
|
||||
<!-- 将定义好的几个日志输出 追加到 root 上 -->
|
||||
<!-- <appender-ref ref="console"/>-->
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="async_file_info" />
|
||||
</root>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user