调整部分包路径
parent
ce474889c7
commit
6b0a6be39c
@ -1,4 +1,4 @@
|
||||
package com.ruoyi.framework.datasource;
|
||||
package com.ruoyi.common.config.datasource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
@ -1,53 +1,53 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
/**
|
||||
* 线程池配置
|
||||
*
|
||||
* @author ruoyi
|
||||
**/
|
||||
@Configuration
|
||||
public class ThreadPoolConfig
|
||||
{
|
||||
// 核心线程池大小
|
||||
private int corePoolSize = 50;
|
||||
|
||||
// 最大可创建的线程数
|
||||
private int maxPoolSize = 200;
|
||||
|
||||
// 队列最大长度
|
||||
private int queueCapacity = 1000;
|
||||
|
||||
// 线程池维护线程所允许的空闲时间
|
||||
private int keepAliveSeconds = 300;
|
||||
|
||||
@Bean(name = "threadPoolTaskExecutor")
|
||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
|
||||
{
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(maxPoolSize);
|
||||
executor.setCorePoolSize(corePoolSize);
|
||||
executor.setQueueCapacity(queueCapacity);
|
||||
executor.setKeepAliveSeconds(keepAliveSeconds);
|
||||
// 线程池对拒绝任务(无线程可用)的处理策略
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行周期性或定时任务
|
||||
*/
|
||||
@Bean(name = "scheduledExecutorService")
|
||||
protected ScheduledExecutorService scheduledExecutorService()
|
||||
{
|
||||
return new ScheduledThreadPoolExecutor(corePoolSize,
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build());
|
||||
}
|
||||
}
|
||||
package com.ruoyi.common.config.thread;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
/**
|
||||
* 线程池配置
|
||||
*
|
||||
* @author ruoyi
|
||||
**/
|
||||
@Configuration
|
||||
public class ThreadPoolConfig
|
||||
{
|
||||
// 核心线程池大小
|
||||
private int corePoolSize = 50;
|
||||
|
||||
// 最大可创建的线程数
|
||||
private int maxPoolSize = 200;
|
||||
|
||||
// 队列最大长度
|
||||
private int queueCapacity = 1000;
|
||||
|
||||
// 线程池维护线程所允许的空闲时间
|
||||
private int keepAliveSeconds = 300;
|
||||
|
||||
@Bean(name = "threadPoolTaskExecutor")
|
||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
|
||||
{
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(maxPoolSize);
|
||||
executor.setCorePoolSize(corePoolSize);
|
||||
executor.setQueueCapacity(queueCapacity);
|
||||
executor.setKeepAliveSeconds(keepAliveSeconds);
|
||||
// 线程池对拒绝任务(无线程可用)的处理策略
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行周期性或定时任务
|
||||
*/
|
||||
@Bean(name = "scheduledExecutorService")
|
||||
protected ScheduledExecutorService scheduledExecutorService()
|
||||
{
|
||||
return new ScheduledThreadPoolExecutor(corePoolSize,
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build());
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.ruoyi.common.base;
|
||||
package com.ruoyi.common.core.domain;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.ruoyi.common.base;
|
||||
package com.ruoyi.common.core.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
@ -1,104 +1,104 @@
|
||||
package com.ruoyi.common.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Ztree树结构实体类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class Ztree implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 节点ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点父ID */
|
||||
private Long pId;
|
||||
|
||||
/** 节点名称 */
|
||||
private String name;
|
||||
|
||||
/** 节点标题 */
|
||||
private String title;
|
||||
|
||||
/** 是否勾选 */
|
||||
private boolean checked = false;
|
||||
|
||||
/** 是否展开 */
|
||||
private boolean open = false;
|
||||
|
||||
/** 是否能勾选 */
|
||||
private boolean nocheck = false;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getpId()
|
||||
{
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(Long pId)
|
||||
{
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean isChecked()
|
||||
{
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked)
|
||||
{
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public boolean isOpen()
|
||||
{
|
||||
return open;
|
||||
}
|
||||
|
||||
public void setOpen(boolean open)
|
||||
{
|
||||
this.open = open;
|
||||
}
|
||||
|
||||
public boolean isNocheck()
|
||||
{
|
||||
return nocheck;
|
||||
}
|
||||
|
||||
public void setNocheck(boolean nocheck)
|
||||
{
|
||||
this.nocheck = nocheck;
|
||||
}
|
||||
}
|
||||
package com.ruoyi.common.core.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Ztree树结构实体类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class Ztree implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 节点ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点父ID */
|
||||
private Long pId;
|
||||
|
||||
/** 节点名称 */
|
||||
private String name;
|
||||
|
||||
/** 节点标题 */
|
||||
private String title;
|
||||
|
||||
/** 是否勾选 */
|
||||
private boolean checked = false;
|
||||
|
||||
/** 是否展开 */
|
||||
private boolean open = false;
|
||||
|
||||
/** 是否能勾选 */
|
||||
private boolean nocheck = false;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getpId()
|
||||
{
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(Long pId)
|
||||
{
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean isChecked()
|
||||
{
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked)
|
||||
{
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public boolean isOpen()
|
||||
{
|
||||
return open;
|
||||
}
|
||||
|
||||
public void setOpen(boolean open)
|
||||
{
|
||||
this.open = open;
|
||||
}
|
||||
|
||||
public boolean isNocheck()
|
||||
{
|
||||
return nocheck;
|
||||
}
|
||||
|
||||
public void setNocheck(boolean nocheck)
|
||||
{
|
||||
this.nocheck = nocheck;
|
||||
}
|
||||
}
|
@ -1,94 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m-t" id="jobLogForm" th:if="${name == 'jobLog'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">日志序号:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobLogId}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务名称:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务组名:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobGroup}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务方法:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.methodName} + '(' + ${#strings.defaultString(jobLog.methodParams,'')} + ')'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">日志信息:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobMessage}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行状态:</label>
|
||||
<div class="form-control-static" th:class="${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${jobLog.status == '0' ? '正常' : '失败'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:style="'display:' + ${jobLog.status == '0' ? 'none' : 'block'}">
|
||||
<label class="col-sm-3 control-label">异常信息:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.exceptionInfo}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal m-t" id="jobForm" th:if="${name == 'job'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务序号:</label>
|
||||
<div class="form-control-static" th:text="${job.jobId}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务名称:</label>
|
||||
<div class="form-control-static" th:text="${job.jobName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务组名:</label>
|
||||
<div class="form-control-static" th:text="${job.jobGroup}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务方法:</label>
|
||||
<div class="form-control-static" th:text="${job.methodName} + '(' + ${#strings.defaultString(job.methodParams,'')} + ')'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行表达式:</label>
|
||||
<div class="form-control-static" th:text="${job.cronExpression}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">下次执行时间:</label>
|
||||
<div class="form-control-static" th:text="${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行策略:</label>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '0'}">默认策略</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '1'}">立即执行</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '2'}">执行一次</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '3'}">放弃执行</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行状态:</label>
|
||||
<div class="form-control-static" th:class="${job.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${job.status == '0' ? '正常' : '暂停'}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m-t" id="jobLogForm" th:if="${name == 'jobLog'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">日志序号:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobLogId}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务名称:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务组名:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobGroup}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务方法:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.methodName} + '(' + ${#strings.defaultString(jobLog.methodParams,'')} + ')'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">日志信息:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.jobMessage}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行状态:</label>
|
||||
<div class="form-control-static" th:class="${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${jobLog.status == '0' ? '正常' : '失败'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:style="'display:' + ${jobLog.status == '0' ? 'none' : 'block'}">
|
||||
<label class="col-sm-3 control-label">异常信息:</label>
|
||||
<div class="form-control-static" th:text="${jobLog.exceptionInfo}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal m-t" id="jobForm" th:if="${name == 'job'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务序号:</label>
|
||||
<div class="form-control-static" th:text="${job.jobId}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务名称:</label>
|
||||
<div class="form-control-static" th:text="${job.jobName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务组名:</label>
|
||||
<div class="form-control-static" th:text="${job.jobGroup}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务方法:</label>
|
||||
<div class="form-control-static" th:text="${job.methodName} + '(' + ${#strings.defaultString(job.methodParams,'')} + ')'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行表达式:</label>
|
||||
<div class="form-control-static" th:text="${job.cronExpression}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">下次执行时间:</label>
|
||||
<div class="form-control-static" th:text="${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行策略:</label>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '0'}">默认策略</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '1'}">立即执行</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '2'}">执行一次</div>
|
||||
<div class="form-control-static" th:if="${job.misfirePolicy == '3'}">放弃执行</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行状态:</label>
|
||||
<div class="form-control-static" th:class="${job.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${job.status == '0' ? '正常' : '暂停'}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue