mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-02-05 01:55:29 +08:00
3.2.0-beta,重构很大:升级springboot2.6.6、spring-cloud-alibaba 2021.1、mybatisplus3.5.1、代码规范部分重构
This commit is contained in:
@ -32,6 +32,7 @@ public class EmailJobAlarm implements JobAlarm {
|
||||
*
|
||||
* @param jobLog
|
||||
*/
|
||||
@Override
|
||||
public boolean doAlarm(XxlJobInfo info, XxlJobLog jobLog){
|
||||
boolean alarmResult = true;
|
||||
|
||||
|
||||
@ -363,8 +363,9 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
// the second immediately following it.
|
||||
while (difference == 1000) {
|
||||
newDate = getTimeAfter(lastDate);
|
||||
if(newDate == null)
|
||||
if(newDate == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
difference = newDate.getTime() - lastDate.getTime();
|
||||
|
||||
@ -532,7 +533,7 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
return i;
|
||||
}
|
||||
char c = s.charAt(i);
|
||||
if ((c >= 'A') && (c <= 'Z') && (!s.equals("L")) && (!s.equals("LW")) && (!s.matches("^L-[0-9]*[W]?"))) {
|
||||
if ((c >= 'A') && (c <= 'Z') && (!"L".equals(s)) && (!"LW".equals(s)) && (!s.matches("^L-[0-9]*[W]?"))) {
|
||||
String sub = s.substring(i, i + 3);
|
||||
int sval = -1;
|
||||
int eval = -1;
|
||||
@ -668,8 +669,9 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
if(c == '-') {
|
||||
ValueSet vs = getValue(0, s, i+1);
|
||||
lastdayOffset = vs.value;
|
||||
if(lastdayOffset > 30)
|
||||
if(lastdayOffset > 30) {
|
||||
throw new ParseException("Offset from last day must be <= 30", i+1);
|
||||
}
|
||||
i = vs.pos;
|
||||
}
|
||||
if(s.length() > i) {
|
||||
@ -732,8 +734,9 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
|
||||
if (c == 'L') {
|
||||
if (type == DAY_OF_WEEK) {
|
||||
if(val < 1 || val > 7)
|
||||
if(val < 1 || val > 7) {
|
||||
throw new ParseException("Day-of-Week values must be between 1 and 7", -1);
|
||||
}
|
||||
lastdayOfWeek = true;
|
||||
} else {
|
||||
throw new ParseException("'L' option is not valid here. (pos=" + i + ")", i);
|
||||
@ -750,8 +753,9 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
} else {
|
||||
throw new ParseException("'W' option is not valid here. (pos=" + i + ")", i);
|
||||
}
|
||||
if(val > 31)
|
||||
throw new ParseException("The 'W' option does not make sense with values larger than 31 (max number of days in a month)", i);
|
||||
if(val > 31) {
|
||||
throw new ParseException("The 'W' option does not make sense with values larger than 31 (max number of days in a month)", i);
|
||||
}
|
||||
TreeSet<Integer> set = getSet(type);
|
||||
set.add(val);
|
||||
i++;
|
||||
|
||||
@ -5,7 +5,7 @@ server:
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/xxl_job?Unicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://jeecg-boot-mysql:3306/xxl_job?Unicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
Reference in New Issue
Block a user