版本更新 v1.0.1

This commit is contained in:
疯狂的狮子li 2021-05-11 17:46:48 +08:00
parent 4a4d8f7123
commit fe8a2b401c
26 changed files with 255 additions and 155 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ruoyi-vue-plus",
"version": "1.0.0",
"version": "1.0.1",
"description": "RuoYi-Vue-Plus后台管理系统",
"author": "LionLi",
"license": "MIT",

View File

@ -82,3 +82,11 @@
.el-range-separator {
box-sizing: content-box;
}
.el-menu--collapse
> div
> .el-submenu
> .el-submenu__title
.el-submenu__icon-arrow {
display: none;
}

View File

@ -63,7 +63,7 @@ const mutations = {
}
}
},
DEL_RIGHT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
if (index === -1) {

View File

@ -34,7 +34,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8081`,
target: `http://localhost:8080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

View File

@ -17,6 +17,6 @@ public class RuoYiApplication
{
System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙");
System.out.println("(♥◠‿◠)ノ゙ RuoYi-Vue-Plus启动成功 ლ(´ڡ`ლ)゙");
}
}

View File

@ -23,7 +23,7 @@ import java.util.Map;
/**
* 用户对象 sys_user
*
*
* @author ruoyi
*/

View File

@ -68,4 +68,14 @@ public class InvalidExtensionException extends FileUploadException
super(allowedExtension, extension, filename);
}
}
public static class InvalidVideoExtensionException extends InvalidExtensionException
{
private static final long serialVersionUID = 1L;
public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename)
{
super(allowedExtension, extension, filename);
}
}
}

View File

@ -133,15 +133,13 @@ public class FileUploadUtils
{
File desc = new File(uploadDir + File.separator + fileName);
if (!desc.getParentFile().exists())
if (!desc.exists())
{
desc.getParentFile().mkdirs();
if (!desc.getParentFile().exists())
{
desc.getParentFile().mkdirs();
}
}
// 解决undertow文件上传bug,因底层实现不同,无需创建新文件
// if (!desc.exists())
// {
// desc.createNewFile();
// }
return desc;
}
@ -189,6 +187,11 @@ public class FileUploadUtils
throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
fileName);
}
else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
{
throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
fileName);
}
else
{
throw new InvalidExtensionException(allowedExtension, extension, fileName);

View File

@ -24,6 +24,8 @@ public class MimeTypeUtils
public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
"asf", "rm", "rmvb" };
public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
// 图片
"bmp", "gif", "jpg", "jpeg", "png",
@ -31,6 +33,8 @@ public class MimeTypeUtils
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
// 压缩文件
"rar", "zip", "gz", "bz2",
// 视频格式
"mp4", "avi", "rmvb",
// pdf
"pdf" };

View File

@ -32,7 +32,7 @@ import java.util.stream.Collectors;
/**
* Excel相关处理
*
*
* @author ruoyi
*/
public class ExcelUtil<T>
@ -88,12 +88,12 @@ public class ExcelUtil<T>
* 统计列表
*/
private Map<Integer, Double> statistics = new HashMap<Integer, Double>();
/**
* 数字格式
*/
private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00");
/**
* 实体对象
*/
@ -119,7 +119,7 @@ public class ExcelUtil<T>
/**
* 对excel表单默认第一个索引名转换成list
*
*
* @param is 输入流
* @return 转换后集合
*/
@ -130,7 +130,7 @@ public class ExcelUtil<T>
/**
* 对excel表单指定表格索引名转换成list
*
*
* @param sheetName 表格索引名
* @param is 输入流
* @return 转换后集合
@ -298,7 +298,7 @@ public class ExcelUtil<T>
/**
* 对list数据源将其里面的数据导入到excel表单
*
*
* @param list 导出数据集合
* @param sheetName 工作表的名称
* @return 结果
@ -311,7 +311,7 @@ public class ExcelUtil<T>
/**
* 对list数据源将其里面的数据导入到excel表单
*
*
* @param sheetName 工作表的名称
* @return 结果
*/
@ -323,7 +323,7 @@ public class ExcelUtil<T>
/**
* 对list数据源将其里面的数据导入到excel表单
*
*
* @return 结果
*/
public AjaxResult exportExcel()
@ -391,7 +391,7 @@ public class ExcelUtil<T>
/**
* 填充excel数据
*
*
* @param index 序号
* @param row 单元格行
*/
@ -418,7 +418,7 @@ public class ExcelUtil<T>
/**
* 创建表格样式
*
*
* @param wb 工作薄对象
* @return 样式列表
*/
@ -456,7 +456,7 @@ public class ExcelUtil<T>
headerFont.setColor(IndexedColors.WHITE.getIndex());
style.setFont(headerFont);
styles.put("header", style);
style = wb.createCellStyle();
style.setAlignment(HorizontalAlignment.CENTER);
style.setVerticalAlignment(VerticalAlignment.CENTER);
@ -500,7 +500,7 @@ public class ExcelUtil<T>
/**
* 设置单元格信息
*
*
* @param value 单元格值
* @param attr 注解相关
* @param cell 单元格信息
@ -531,7 +531,7 @@ public class ExcelUtil<T>
}
}
}
/**
* 获取画布
*/
@ -646,7 +646,7 @@ public class ExcelUtil<T>
/**
* 设置 POI XSSFSheet 单元格提示
*
*
* @param sheet 表单
* @param promptTitle 提示标题
* @param promptContent 提示内容
@ -656,7 +656,7 @@ public class ExcelUtil<T>
* @param endCol 结束列
*/
public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow,
int firstCol, int endCol)
int firstCol, int endCol)
{
DataValidationHelper helper = sheet.getDataValidationHelper();
DataValidationConstraint constraint = helper.createCustomConstraint("DD1");
@ -669,7 +669,7 @@ public class ExcelUtil<T>
/**
* 设置某些列的值只能输入预制的数据,显示下拉框.
*
*
* @param sheet 要设置的sheet.
* @param textlist 下拉框显示的内容
* @param firstRow 开始行
@ -703,7 +703,7 @@ public class ExcelUtil<T>
/**
* 解析导出值 0=,1=,2=未知
*
*
* @param propertyValue 参数值
* @param converterExp 翻译注解
* @param separator 分隔符
@ -740,7 +740,7 @@ public class ExcelUtil<T>
/**
* 反向解析值 =0,=1,未知=2
*
*
* @param propertyValue 参数值
* @param converterExp 翻译注解
* @param separator 分隔符
@ -774,10 +774,10 @@ public class ExcelUtil<T>
}
return StrUtil.strip(propertyString.toString(), null,separator);
}
/**
* 解析字典值
*
*
* @param dictValue 字典值
* @param dictType 字典类型
* @param separator 分隔符
@ -790,7 +790,7 @@ public class ExcelUtil<T>
/**
* 反向解析值字典值
*
*
* @param dictLabel 字典标签
* @param dictType 字典类型
* @param separator 分隔符
@ -800,7 +800,7 @@ public class ExcelUtil<T>
{
return DictUtils.getDictValue(dictType, dictLabel, separator);
}
/**
* 合计统计信息
*/
@ -837,7 +837,7 @@ public class ExcelUtil<T>
cell = row.createCell(0);
cell.setCellStyle(styles.get("total"));
cell.setCellValue("合计");
for (Integer key : keys)
{
cell = row.createCell(key);
@ -859,7 +859,7 @@ public class ExcelUtil<T>
/**
* 获取下载路径
*
*
* @param filename 文件名称
*/
public String getAbsoluteFile(String filename)
@ -875,7 +875,7 @@ public class ExcelUtil<T>
/**
* 获取bean中的属性值
*
*
* @param vo 实体对象
* @param field 字段
* @param excel 注解
@ -906,7 +906,7 @@ public class ExcelUtil<T>
/**
* 以类的属性的get方法方法形式获取值
*
*
* @param o
* @param name
* @return value
@ -955,7 +955,7 @@ public class ExcelUtil<T>
this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList());
this.maxHeight = getRowHeight();
}
/**
* 根据注解获取最大行高
*/
@ -991,7 +991,7 @@ public class ExcelUtil<T>
/**
* 创建工作表
*
*
* @param sheetNo sheet数量
* @param index 序号
*/
@ -1012,7 +1012,7 @@ public class ExcelUtil<T>
/**
* 获取单元格值
*
*
* @param row 获取的行
* @param column 获取单元格列号
* @return 单元格值

View File

@ -1,30 +1,26 @@
package com.ruoyi.framework.config;
import java.util.TimeZone;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import java.util.TimeZone;
/**
* 程序注解配置
*
* @author ruoyi
* @author Lion Li
*/
@Configuration
// 表示通过aop框架暴露该代理对象,AopContext能够访问
@EnableAspectJAutoProxy(exposeProxy = true)
// 指定要扫描的Mapper类的包的路径
@MapperScan("com.ruoyi.**.mapper")
public class ApplicationConfig
{
public class ApplicationConfig {
/**
* 时区配置
*/
@Bean
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
{
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() {
return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
}
}

View File

@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
*
* @author Lion Li
*/
@EnableFeignClients("com.ruoyi.**.feign")
@EnableFeignClients("${feign.package}")
@Configuration
@ConditionalOnClass(Feign.class)
@AutoConfigureBefore(FeignAutoConfiguration.class)

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.ruoyi.framework.mybatisplus.CreateAndUpdateMetaObjectHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@ -17,6 +18,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
*/
@EnableTransactionManagement(proxyTargetClass = true)
@Configuration
// 指定要扫描的Mapper类的包的路径
@MapperScan("${mybatis-plus.mapperPackage}")
public class MybatisPlusConfig {
@Bean

View File

@ -1,44 +1,65 @@
package com.ruoyi.framework.config;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
import com.ruoyi.common.utils.Threads;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.ruoyi.common.utils.Threads;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 线程池配置
*
* @author ruoyi
* @author Lion Li
**/
@Configuration
public class ThreadPoolConfig
{
public class ThreadPoolConfig {
// 核心线程池大小
private int corePoolSize = 50;
@Value("${threadPoolConfig.corePoolSize}")
private int corePoolSize;
// 最大可创建的线程数
private int maxPoolSize = 200;
@Value("${threadPoolConfig.maxPoolSize}")
private int maxPoolSize;
// 队列最大长度
private int queueCapacity = 1000;
@Value("${threadPoolConfig.queueCapacity}")
private int queueCapacity;
// 线程池维护线程所允许的空闲时间
private int keepAliveSeconds = 300;
@Value("${threadPoolConfig.keepAliveSeconds}")
private int keepAliveSeconds;
// 线程池对拒绝任务(无线程可用)的处理策略
@Value("${threadPoolConfig.rejectedExecutionHandler}")
private String rejectedExecutionHandler;
@Bean(name = "threadPoolTaskExecutor")
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
{
@ConditionalOnProperty(prefix = "threadPoolTaskExecutor", name = "enabled", havingValue = "true")
public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setMaxPoolSize(maxPoolSize);
executor.setCorePoolSize(corePoolSize);
executor.setQueueCapacity(queueCapacity);
executor.setKeepAliveSeconds(keepAliveSeconds);
// 线程池对拒绝任务(无线程可用)的处理策略
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
RejectedExecutionHandler handler;
if (rejectedExecutionHandler.equals("CallerRunsPolicy")) {
handler = new ThreadPoolExecutor.CallerRunsPolicy();
} else if (rejectedExecutionHandler.equals("DiscardOldestPolicy")) {
handler = new ThreadPoolExecutor.DiscardOldestPolicy();
} else if (rejectedExecutionHandler.equals("DiscardPolicy")) {
handler = new ThreadPoolExecutor.DiscardPolicy();
} else {
handler = new ThreadPoolExecutor.AbortPolicy();
}
executor.setRejectedExecutionHandler(handler);
return executor;
}
@ -46,14 +67,11 @@ public class ThreadPoolConfig
* 执行周期性或定时任务
*/
@Bean(name = "scheduledExecutorService")
protected ScheduledExecutorService scheduledExecutorService()
{
protected ScheduledExecutorService scheduledExecutorService() {
return new ScheduledThreadPoolExecutor(corePoolSize,
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build())
{
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build()) {
@Override
protected void afterExecute(Runnable r, Throwable t)
{
protected void afterExecute(Runnable r, Throwable t) {
super.afterExecute(r, t);
Threads.printException(r, t);
}

View File

@ -101,7 +101,7 @@ public class GenController extends BaseController
/**
* 导入表结构保存
*/
@PreAuthorize("@ss.hasPermi('tool:gen:list')")
@PreAuthorize("@ss.hasPermi('tool:gen:import')")
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
@PostMapping("/importTable")
public AjaxResult importTableSave(String tables)

View File

@ -68,6 +68,7 @@ public class SysConfig implements Serializable {
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
@ -80,6 +81,7 @@ public class SysConfig implements Serializable {
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/**

View File

@ -56,6 +56,7 @@ public class SysNotice implements Serializable {
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
@ -68,6 +69,7 @@ public class SysNotice implements Serializable {
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/**

View File

@ -67,6 +67,7 @@ public class SysPost implements Serializable {
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
@ -79,6 +80,7 @@ public class SysPost implements Serializable {
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/**

View File

@ -241,7 +241,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
List<SysDept> children = list(new LambdaQueryWrapper<SysDept>()
.apply("find_in_set({0},ancestors)",deptId));
for (SysDept child : children) {
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
}
if (children.size() > 0) {
updateBatchById(children);

View File

@ -25,7 +25,7 @@ import java.util.stream.Collectors;
/**
* 菜单 业务层处理
*
*
* @author ruoyi
*/
@Service

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.service.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope;

View File

@ -48,6 +48,7 @@ public class SysOperlogController extends BaseController
return util.exportExcel(list, "操作日志");
}
@Log(title = "操作日志", businessType = BusinessType.DELETE)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/{operIds}")
public AjaxResult remove(@PathVariable Long[] operIds)

View File

@ -21,32 +21,54 @@ import java.util.List;
/**
* Swagger2的接口配置
*
* @author ruoyi
*
* @author Lion Li
*/
@Configuration
@EnableSwagger2WebMvc
@EnableKnife4j
public class SwaggerConfig
{
/** 系统基础配置 */
public class SwaggerConfig {
/**
* 系统基础配置
*/
@Autowired
private RuoYiConfig ruoyiConfig;
/** 是否开启swagger */
/**
* 是否开启swagger
*/
@Value("${swagger.enabled}")
private boolean enabled;
/** 设置请求的统一前缀 */
/**
* 设置请求的统一前缀
*/
@Value("${swagger.pathMapping}")
private String pathMapping;
/**
* 标题
*/
@Value("${swagger.title}")
private String title;
/**
* 描述
*/
@Value("${swagger.description}")
private String description;
/**
* 版本
*/
@Value("${swagger.version}")
private String version;
/**
* 创建API
*/
@Bean
public Docket createRestApi()
{
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
// 是否启用Swagger
.enable(enabled)
@ -70,8 +92,7 @@ public class SwaggerConfig
/**
* 安全模式这里指定token通过Authorization头请求头传递
*/
private List<ApiKey> securitySchemes()
{
private List<ApiKey> securitySchemes() {
List<ApiKey> apiKeyList = new ArrayList<ApiKey>();
apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
return apiKeyList;
@ -80,8 +101,7 @@ public class SwaggerConfig
/**
* 安全上下文
*/
private List<SecurityContext> securityContexts()
{
private List<SecurityContext> securityContexts() {
List<SecurityContext> securityContexts = new ArrayList<>();
securityContexts.add(
SecurityContext.builder()
@ -94,8 +114,7 @@ public class SwaggerConfig
/**
* 默认的安全上引用
*/
private List<SecurityReference> defaultAuth()
{
private List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
@ -107,18 +126,17 @@ public class SwaggerConfig
/**
* 添加摘要信息
*/
private ApiInfo apiInfo()
{
private ApiInfo apiInfo() {
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题若依管理系统_接口文档")
.title(title)
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
.description(description)
// 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本
.version("版本号:" + ruoyiConfig.getVersion())
.version(version)
.build();
}
}

View File

@ -65,15 +65,15 @@ spring:
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
profiles:
active: @profiles.active@
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
# 设置总上传的文件大小
max-request-size: 20MB
multipart:
# 单个文件大小
max-file-size: 10MB
# 设置总上传的文件大小
max-request-size: 20MB
# 服务模块
devtools:
restart:
@ -109,16 +109,17 @@ management:
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30
# MyBatis配置
# https://baomidou.com/config/
mybatis-plus:
mapperPackage: com.ruoyi.**.mapper
# 对应的 XML 文件位置
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 实体扫描多个package用逗号或者分号分隔
@ -205,11 +206,11 @@ mybatis-plus:
selectStrategy: NOT_EMPTY
# PageHelper分页插件
pagehelper:
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
params: count=countSql
# Swagger配置
swagger:
@ -217,9 +218,15 @@ swagger:
enabled: true
# 请求前缀
pathMapping: /dev-api
# 标题
title: '标题RuoYi-Vue-Plus后台管理系统_接口文档'
# 描述
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
# 版本
version: '版本号: ${ruoyi-vue-plus.version}'
# 防止XSS攻击
xss:
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
@ -227,7 +234,26 @@ xss:
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
threadPoolConfig:
# 是否开启线程池
enabled: false
# 核心线程池大小
corePoolSize: 8
# 最大可创建的线程数
maxPoolSize: 16
# 队列最大长度
queueCapacity: 128
# 线程池维护线程所允许的空闲时间
keepAliveSeconds: 300
# 线程池对拒绝任务(无线程可用)的处理策略
# CallerRunsPolicy 等待
# DiscardOldestPolicy 放弃最旧的
# DiscardPolicy 丢弃
# AbortPolicy 中止
rejectedExecutionHandler: CallerRunsPolicy
feign:
package: com.ruoyi.**.feign
# 开启压缩
compression:
request:

View File

@ -1,2 +1,8 @@
Application Version: ${ruoyi.version}
Spring Boot Version: ${spring-boot.version}
Application Version: ${ruoyi-vue-plus.version}
Spring Boot Version: ${spring-boot.version}
__________ _____.___.__ ____ ____ __________.__
\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
| _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
| | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
|____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
\/ \/ \/ \/

View File

@ -5,13 +5,13 @@
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${console.log.pattern}</pattern>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${console.log.pattern}</pattern>
<charset>utf-8</charset>
</encoder>
</appender>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="file_console" class="ch.qos.logback.core.FileAppender">
@ -25,21 +25,21 @@
<level>INFO</level>
</filter>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-info.log</file>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-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">
<fileNamePattern>${log.path}/sys-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>
<!-- 匹配时的操作:接收(记录) -->
@ -47,16 +47,16 @@
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-error.log</file>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
@ -64,16 +64,16 @@
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 用户访问日志输出 -->
<!-- 用户访问日志输出 -->
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-user.log</file>
<file>${log.path}/sys-user.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 按天回滚 daily -->
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
@ -84,24 +84,24 @@
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
<appender-ref ref="file_console" />
</root>
<!--系统用户操作日志-->
<!--系统用户操作日志-->
<logger name="sys-user" level="info">
<appender-ref ref="sys-user"/>
</logger>