#14 -- Update JDK

This commit is contained in:
Anton Romanov 2025-03-18 22:18:03 +04:00
parent 4e6c79f837
commit f2779945b4
5 changed files with 33 additions and 26 deletions

View File

@ -1,27 +1,23 @@
plugins { plugins {
id 'java' id 'java'
id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'org.springframework.boot' version '3.4.2'
id 'org.springframework.boot' version '2.6.4' id 'io.spring.dependency-management' version '1.1.7'
} }
jar { group = 'ru.ulstu'
archivesBaseName = 'time-series-smoothing' version = '0.0.1-SNAPSHOT'
}
group 'ru.ulstu' java {
version '1.0-SNAPSHOT' toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories { repositories {
maven { 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 { dependencies {

Binary file not shown.

View File

@ -1,6 +1,7 @@
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip

View File

@ -5,6 +5,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import ru.ulstu.DateUtils;
import ru.ulstu.datamodel.ChartForm; import ru.ulstu.datamodel.ChartForm;
import ru.ulstu.datamodel.ModelingResult; import ru.ulstu.datamodel.ModelingResult;
import ru.ulstu.datamodel.exception.ModelingException; import ru.ulstu.datamodel.exception.ModelingException;
@ -16,8 +17,11 @@ import ru.ulstu.statistic.StatisticService;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle; import java.time.format.FormatStyle;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -114,7 +118,13 @@ public class IndexController {
return Stream.concat(timeSeries.getValues().stream(), forecast.getValues().stream().skip(1)) return Stream.concat(timeSeries.getValues().stream(), forecast.getValues().stream().skip(1))
.map(TimeSeriesValue::getDate) .map(TimeSeriesValue::getDate)
.sorted() .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()); .collect(Collectors.toList());
} }

View File

@ -1,9 +1,9 @@
messages.app-name=Time Series Smoothing messages.app-name=Time Series Smoothing
messages.menu.home=На главную messages.menu.home=Main
messages.time_series_forecast=Прогноз временного ряда messages.time_series_forecast=Time series forecast
messages.date=Дата messages.date=Date
messages.value=Уровень messages.value=Value
messages.time_series_test_forecast=Тестовый прогноз messages.time_series_test_forecast=Test forecast
messages.time_series_model=Модель messages.time_series_model=Model
messages.time_series=Временной ряд messages.time_series=Time series
messages.time_series_forecast_short=Прогноз messages.time_series_forecast_short=Forecast