gorskov_evgeniu_lab_3 ready

This commit is contained in:
2025-03-21 18:15:24 +04:00
parent ba280d58ca
commit 9c2094b833
24 changed files with 471 additions and 534 deletions

View File

@@ -0,0 +1,27 @@
package org.example.sspr3Evgeni;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
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;
@Slf4j
@RestController
@RequestMapping("/api/matrix")
@RequiredArgsConstructor
public class FindMaxController {
private final FindMaxService findMaxService;
@PostMapping("/findMax")
public ResponseEntity<Double> findMax(@RequestBody MatrixData requestData) {
long startTime = System.currentTimeMillis();
double max = findMaxService.findMaxAboveDiagonal(requestData.getMatrix());
log.info("Second cont finish the process matrix");
long totalTime = System.currentTimeMillis() - startTime;
return ResponseEntity.ok(max);
}
}