1. 新增AuditStatusValidator类,用以作为审核状态机

2. 新建DataListener,用以读取excel文件
3. 完成防护对象配置所有接口
4. 添加SqlSessionWrapper类用以进行批处理
5. ProtectObject类添加更多校验(IP、大小等)
This commit is contained in:
EnderByEndera
2024-01-05 21:42:19 +08:00
parent 776c7c0f6d
commit 0fb8dd87fe
15 changed files with 468 additions and 21 deletions

View File

@@ -1,7 +1,10 @@
package com.realtime.protection.configuration.entity.defense.object;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
@Data
@@ -17,10 +20,13 @@ public class ProtectObject {
private String protectObjectSystemName;
@JsonProperty("proobj_ip_address")
@Pattern(regexp = "^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$", message = "Invalid IPv4 Address")
private String protectObjectIPAddress;
@JsonProperty("proobj_port")
@NotNull(message = "proobj_port should not be empty.")
@Max(value = 65535, message = "port should not be more than 65535")
@Min(value = 1, message = "port should not be less than 1")
private Integer protectObjectPort;
@JsonProperty("proobj_url")

View File

@@ -1,6 +1,7 @@
package com.realtime.protection.configuration.entity.task;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@@ -13,15 +14,16 @@ public class Task {
private Integer taskId;
@JsonProperty("task_name")
@NotNull(message = "task_name should not be empty.")
@NotNull(message = "task_name should not be empty. ")
private String taskName;
@JsonProperty("task_start_time")
@NotNull(message = "task_start_time should not be empty.")
@NotNull(message = "task_start_time should not be empty. ")
private LocalDateTime taskStartTime;
@JsonProperty("task_end_time")
@NotNull(message = "task_end_time should not be empty.")
@NotNull(message = "task_end_time should not be empty. ")
@Future(message = "task_end_time should be a future time. ")
private LocalDateTime taskEndTime;
@JsonProperty("task_create_time")
@@ -31,11 +33,11 @@ public class Task {
private LocalDateTime taskModifyTime;
@JsonProperty("task_type")
@NotNull(message = "task_type should not be empty.")
@NotNull(message = "task_type should not be empty. ")
private String taskType;
@JsonProperty("task_act")
@NotNull(message = "task_act should not be empty.")
@NotNull(message = "task_act should not be empty. ")
private String taskAct;
@JsonProperty("task_create_username")