定时任务支持并发控制

This commit is contained in:
RuoYi
2019-03-13 19:45:12 +08:00
parent 9fc42511c6
commit e34b4ea63d
24 changed files with 430 additions and 300 deletions

View File

@@ -0,0 +1,41 @@
package com.ruoyi.common.utils;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.commons.lang3.exception.ExceptionUtils;
/**
* 错误信息处理类。
*
* @author ruoyi
*/
public class ExceptionUtil
{
/**
* 获取exception的详细错误信息。
*/
public static String getExceptionMessage(Throwable e)
{
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
String str = sw.toString();
return str;
}
public static String getRootErrorMseeage(Exception e)
{
Throwable root = ExceptionUtils.getRootCause(e);
root = (root == null ? e : root);
if (root == null)
{
return "";
}
String msg = root.getMessage();
if (msg == null)
{
return "null";
}
return StringUtils.defaultString(msg);
}
}

View File

@@ -40,7 +40,7 @@ public class YamlUtil
if (map != null && !map.isEmpty() && qualifiedKey != null)
{
String input = String.valueOf(qualifiedKey);
if (!input.equals(""))
if (!"".equals(input))
{
if (input.contains("."))
{

View File

@@ -647,7 +647,9 @@ public class ExcelUtil<T>
{
tempClass = tempClass.getSuperclass();
if (tempClass != null)
{
tempFields.addAll(Arrays.asList(tempClass.getDeclaredFields()));
}
}
putToFields(tempFields);
}