mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-03-30 01:34:46 +00:00
Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro
This commit is contained in:
@@ -11,12 +11,9 @@ import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
|
|||||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -28,26 +25,6 @@ import java.util.List;
|
|||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class BpmFlowableConfiguration {
|
public class BpmFlowableConfiguration {
|
||||||
|
|
||||||
/**
|
|
||||||
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean
|
|
||||||
*
|
|
||||||
* 如果不创建,会导致项目启动时,Flowable 报错的问题
|
|
||||||
*/
|
|
||||||
@Bean(name = "applicationTaskExecutor")
|
|
||||||
@ConditionalOnMissingBean(name = "applicationTaskExecutor")
|
|
||||||
public AsyncListenableTaskExecutor taskExecutor() {
|
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
||||||
executor.setCorePoolSize(8);
|
|
||||||
executor.setMaxPoolSize(8);
|
|
||||||
executor.setQueueCapacity(100);
|
|
||||||
executor.setThreadNamePrefix("flowable-task-Executor-");
|
|
||||||
executor.setAwaitTerminationSeconds(30);
|
|
||||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
|
||||||
executor.setAllowCoreThreadTimeOut(true);
|
|
||||||
executor.initialize();
|
|
||||||
return executor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM 模块的 ProcessEngineConfigurationConfigurer 实现类:
|
* BPM 模块的 ProcessEngineConfigurationConfigurer 实现类:
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
|||||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.flowable.bpmn.model.*;
|
import org.flowable.bpmn.model.*;
|
||||||
|
import org.flowable.common.engine.api.delegate.Expression;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
|
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
|
||||||
import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
|
import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
|
||||||
@@ -90,4 +91,21 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB
|
|||||||
super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter);
|
super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========== 屏蔽解析器覆写 ==========
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCollectionExpression(Expression collectionExpression) {
|
||||||
|
// 保持自定义变量名,忽略解析器写入的 collection 表达式
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCollectionVariable(String collectionVariable) {
|
||||||
|
// 保持自定义变量名,忽略解析器写入的 collection 变量名
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCollectionElementVariable(String collectionElementVariable) {
|
||||||
|
// 保持自定义变量名,忽略解析器写入的单元素变量名
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ public class AuthLoginReqVO extends CaptchaVerificationReqVO {
|
|||||||
|
|
||||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudaoyuanma")
|
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudaoyuanma")
|
||||||
@NotEmpty(message = "登录账号不能为空")
|
@NotEmpty(message = "登录账号不能为空")
|
||||||
@Length(min = 4, max = 16, message = "账号长度为 4-16 位")
|
@Length(min = 4, max = 30, message = "账号长度为 4-30 位")
|
||||||
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
|
@Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "账号格式为数字以及字母")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao")
|
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao")
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class UserSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
|
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
|
||||||
@NotBlank(message = "用户账号不能为空")
|
@NotBlank(message = "用户账号不能为空")
|
||||||
@Pattern(regexp = "^[a-zA-Z0-9]+$", message = "用户账号由 数字、字母 组成")
|
@Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
|
||||||
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
|
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
|
||||||
@DiffLogField(name = "用户账号")
|
@DiffLogField(name = "用户账号")
|
||||||
private String username;
|
private String username;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||||
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||||
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
@@ -68,7 +69,7 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(noRollbackFor = ServiceException.class)
|
||||||
public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
|
public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
|
||||||
// 查询访问令牌
|
// 查询访问令牌
|
||||||
OAuth2RefreshTokenDO refreshTokenDO = oauth2RefreshTokenMapper.selectByRefreshToken(refreshToken);
|
OAuth2RefreshTokenDO refreshTokenDO = oauth2RefreshTokenMapper.selectByRefreshToken(refreshToken);
|
||||||
|
|||||||
Reference in New Issue
Block a user