forked from sevastyan_b/SSPR_25
gorskov_evgeniu_lab_3 ready
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user