1、增加AlertMessage http接口,接收告警信息,生成指令入库
2、staticrule优先级、频率限制范围
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.realtime.protection.server.alertmessage;
|
||||
|
||||
import com.realtime.protection.configuration.entity.rule.dynamicrule.AlertMessage;
|
||||
import com.realtime.protection.configuration.response.ResponseResult;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("alertmessage")
|
||||
@Slf4j
|
||||
public class AlertMessageController
|
||||
{
|
||||
private final AlertMessageService alertMessageService;
|
||||
public AlertMessageController(final AlertMessageService alertMessageService) {
|
||||
this.alertMessageService = alertMessageService;
|
||||
}
|
||||
|
||||
@PostMapping("/new")
|
||||
public ResponseResult receiveAlertMessage(@RequestBody @Valid AlertMessage alertMessage){
|
||||
alertMessageService.receiveAlertMessage(alertMessage);
|
||||
return ResponseResult.ok();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user