JDK-21
This commit is contained in:
parent
68da6681f5
commit
9ee62e2aa5
58
build.gradle
58
build.gradle
@ -1,51 +1,25 @@
|
||||
buildscript {
|
||||
ext {
|
||||
versionSpringBoot = '2.3.9.RELEASE'
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'org.springframework.boot' version '3.4.2'
|
||||
id 'io.spring.dependency-management' version '1.1.7'
|
||||
}
|
||||
|
||||
group = 'ru.ulstu'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: versionSpringBoot
|
||||
}
|
||||
}
|
||||
|
||||
group 'ru.ulstu'
|
||||
version '0.0.1'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
|
||||
jar {
|
||||
archiveBaseName = 'fuzzy-controller'
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = "UTF-8"
|
||||
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url="https://repository.ow2.org/nexus/content/repositories/public"
|
||||
url = uri("http://repo.athene.tech/repository/maven-central/")
|
||||
allowInsecureProtocol(true)
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
implementation.exclude module: "spring-boot-starter-tomcat"
|
||||
implementation.exclude module: "follow-redirects"
|
||||
implementation.exclude module: "is-buffer"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
|
||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
|
||||
@ -61,7 +35,7 @@ dependencies {
|
||||
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
|
||||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
|
||||
|
||||
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
|
||||
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.4'
|
||||
|
||||
implementation group: 'com.ibm.icu', name: 'icu4j', version: '63.1'
|
||||
implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.9.0.202009080501-r'
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1,5 +1,6 @@
|
||||
package ru.ulstu.fc.config;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -7,25 +8,13 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.servlet.NoHandlerFoundException;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@ControllerAdvice
|
||||
@ApiIgnore
|
||||
@Hidden
|
||||
class GlobalDefaultExceptionHandler {
|
||||
private final static Logger LOG = LoggerFactory.getLogger(GlobalDefaultExceptionHandler.class);
|
||||
public static final String DEFAULT_ERROR_VIEW = "error";
|
||||
|
||||
|
||||
// @ExceptionHandler(value = Exception.class)
|
||||
// public ModelAndView defaultErrorHandler(HttpServletRequest req, Exception e) {
|
||||
// LOG.warn(e.getMessage());
|
||||
// ModelAndView mav = new ModelAndView();
|
||||
// mav.addObject("exception", e);
|
||||
// mav.addObject("url", req.getRequestURL());
|
||||
// mav.setViewName(DEFAULT_ERROR_VIEW);
|
||||
// return mav;
|
||||
// }
|
||||
|
||||
@ExceptionHandler(NoHandlerFoundException.class)
|
||||
@ResponseStatus(HttpStatus.NOT_FOUND)
|
||||
public String handle(NoHandlerFoundException ex) {
|
||||
|
@ -14,16 +14,9 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
|
||||
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
|
||||
@Configuration
|
||||
public class MvcConfiguration implements WebMvcConfigurer {
|
||||
// @Override
|
||||
// public void addViewControllers(ViewControllerRegistry registry) {
|
||||
// registry.addViewController("/index");
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
@ -44,14 +37,6 @@ public class MvcConfiguration implements WebMvcConfigurer {
|
||||
return localeInterceptor;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket api() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("ru.ulstu"))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(localeInterceptor());
|
||||
|
@ -1,9 +1,9 @@
|
||||
package ru.ulstu.fc.config;
|
||||
|
||||
import nz.net.ultraq.thymeleaf.LayoutDialect;
|
||||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.thymeleaf.spring5.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring6.SpringTemplateEngine;
|
||||
import org.thymeleaf.templateresolver.ITemplateResolver;
|
||||
|
||||
@Configuration
|
||||
|
@ -1,5 +1,6 @@
|
||||
package ru.ulstu.fc.rule.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -9,14 +10,13 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import ru.ulstu.fc.rule.model.Antecedent;
|
||||
import ru.ulstu.fc.rule.model.InferenceForm;
|
||||
import ru.ulstu.fc.rule.service.FuzzyInferenceService;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@ApiIgnore
|
||||
@Hidden
|
||||
public class InferenceMvcController {
|
||||
private final FuzzyInferenceService fuzzyInferenceService;
|
||||
|
||||
|
@ -17,6 +17,4 @@ spring.datasource.password=password
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
spring.h2.console.enabled=true
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
# swagger-ui custom path
|
||||
springdoc.swagger-ui.path=/swagger-ui.html
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user