This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enderbyendera-realtime-prot…/src/main/java/com/realtime/protection/server/alertmessage/AlertMessageController.java

29 lines
1.0 KiB
Java
Raw Normal View History

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.processAlertMessage(alertMessage);
return ResponseResult.ok();
}
}