From e267e0c55c9109b7cf3827f0ee9974a355056236 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 12 Aug 2022 01:09:55 +0400 Subject: [PATCH] change generator http method --- build.gradle | 7 +++---- src/main/java/ru/ulstu/controller/UtilController.java | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index d9ab7a4..c779c8a 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,6 @@ dependencies { ext { versionSLF4J = '1.7.24' versionJetty = '9.3.16.v20170120' - versionJackson = '2.9.4' } implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web' @@ -35,9 +34,9 @@ dependencies { implementation group: 'org.javassist', name: 'javassist', version: '3.25.0-GA' implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: versionJetty - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versionJackson - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versionJackson - implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versionJackson + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations' + implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310' implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.6.5' diff --git a/src/main/java/ru/ulstu/controller/UtilController.java b/src/main/java/ru/ulstu/controller/UtilController.java index 844ec29..8495cf0 100644 --- a/src/main/java/ru/ulstu/controller/UtilController.java +++ b/src/main/java/ru/ulstu/controller/UtilController.java @@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController; import ru.ulstu.configuration.ApiConfiguration; import ru.ulstu.datamodel.ts.TimeSeries; import ru.ulstu.service.UtilService; + import java.util.Map; @RestController @@ -30,7 +31,7 @@ public class UtilController { return new ResponseEntity<>(Map.of("result", true), HttpStatus.OK); } - @GetMapping("getRandom") + @PostMapping("getRandom") @Operation(description = "Получить временной ряд рандомной длины") public ResponseEntity getRandomTimeSeries(@RequestParam("length") int length) { return new ResponseEntity<>(utilService.getRandomTimeSeries(length), HttpStatus.OK);