diff --git a/build.gradle b/build.gradle index 96922ab..8ef88bb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,27 +1,23 @@ plugins { id 'java' - id 'io.spring.dependency-management' version '1.0.11.RELEASE' - id 'org.springframework.boot' version '2.6.4' + id 'org.springframework.boot' version '3.4.2' + id 'io.spring.dependency-management' version '1.1.7' } -jar { - archivesBaseName = 'time-series-smoothing' -} +group = 'ru.ulstu' +version = '0.0.1-SNAPSHOT' -group 'ru.ulstu' -version '1.0-SNAPSHOT' +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { maven { - url "https://repo.athene.tech/repository/maven-central/" + url = uri("http://repo.athene.tech/repository/maven-central/") + allowInsecureProtocol(true) } - maven { - url "https://repo.athene.tech/repository/maven-releases/" - } -} - -test { - useJUnitPlatform() } dependencies { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 13372ae..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d66f36f..e2847c8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Mon Dec 28 10:00:20 PST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip diff --git a/src/main/java/ru/ulstu/controller/IndexController.java b/src/main/java/ru/ulstu/controller/IndexController.java index 6a00753..f1dfc75 100644 --- a/src/main/java/ru/ulstu/controller/IndexController.java +++ b/src/main/java/ru/ulstu/controller/IndexController.java @@ -5,6 +5,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; +import ru.ulstu.DateUtils; import ru.ulstu.datamodel.ChartForm; import ru.ulstu.datamodel.ModelingResult; import ru.ulstu.datamodel.exception.ModelingException; @@ -16,8 +17,11 @@ import ru.ulstu.statistic.StatisticService; import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.format.FormatStyle; +import java.util.Date; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; @@ -114,7 +118,13 @@ public class IndexController { return Stream.concat(timeSeries.getValues().stream(), forecast.getValues().stream().skip(1)) .map(TimeSeriesValue::getDate) .sorted() - .map(date -> date.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT))) + .map(date -> { + Date date1 = DateUtils.addYears(DateUtils.localDateTimeToDate(date), 10); + LocalDateTime ldt = date1.toInstant() + .atZone(ZoneId.systemDefault()) + .toLocalDateTime(); + return ldt.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)); + }) .collect(Collectors.toList()); } diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties index 25a9439..780f273 100644 --- a/src/main/resources/messages_ru.properties +++ b/src/main/resources/messages_ru.properties @@ -1,9 +1,9 @@ messages.app-name=Time Series Smoothing -messages.menu.home=На главную -messages.time_series_forecast=Прогноз временного ряда -messages.date=Дата -messages.value=Уровень -messages.time_series_test_forecast=Тестовый прогноз -messages.time_series_model=Модель -messages.time_series=Временной ряд -messages.time_series_forecast_short=Прогноз \ No newline at end of file +messages.menu.home=Main +messages.time_series_forecast=Time series forecast +messages.date=Date +messages.value=Value +messages.time_series_test_forecast=Test forecast +messages.time_series_model=Model +messages.time_series=Time series +messages.time_series_forecast_short=Forecast \ No newline at end of file