mirror of
https://gitee.com/dcren/initializr.git
synced 2026-02-25 21:22:58 +08:00
Upgrade to Spring Boot 3.0.0
Closes gh-1342
This commit is contained in:
@@ -60,8 +60,8 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>jakarta.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class GradleConfigurationBuildCustomizerTests {
|
|||||||
void providedRuntimeConfigurationIsAddedWithNonWarProject() {
|
void providedRuntimeConfigurationIsAddedWithNonWarProject() {
|
||||||
GradleBuild build = new GradleBuild();
|
GradleBuild build = new GradleBuild();
|
||||||
build.dependencies().add("lib", "com.example", "lib", DependencyScope.COMPILE);
|
build.dependencies().add("lib", "com.example", "lib", DependencyScope.COMPILE);
|
||||||
build.dependencies().add("servlet", "javax.servlet", "servlet-api", DependencyScope.PROVIDED_RUNTIME);
|
build.dependencies().add("servlet", "jakarta.servlet", "jakarta.servlet-api", DependencyScope.PROVIDED_RUNTIME);
|
||||||
customize(build);
|
customize(build);
|
||||||
assertThat(build.configurations().names()).containsOnly("providedRuntime");
|
assertThat(build.configurations().names()).containsOnly("providedRuntime");
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ class GradleConfigurationBuildCustomizerTests {
|
|||||||
GradleBuild build = new GradleBuild();
|
GradleBuild build = new GradleBuild();
|
||||||
build.plugins().add("war");
|
build.plugins().add("war");
|
||||||
build.dependencies().add("lib", "com.example", "lib", DependencyScope.COMPILE);
|
build.dependencies().add("lib", "com.example", "lib", DependencyScope.COMPILE);
|
||||||
build.dependencies().add("servlet", "javax.servlet", "servlet-api", DependencyScope.PROVIDED_RUNTIME);
|
build.dependencies().add("servlet", "jakarta.servlet", "jakarta.servlet-api", DependencyScope.PROVIDED_RUNTIME);
|
||||||
customize(build);
|
customize(build);
|
||||||
assertThat(build.configurations().customizations()).isEmpty();
|
assertThat(build.configurations().customizations()).isEmpty();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public class InitializrProperties extends InitializrConfiguration {
|
|||||||
/**
|
/**
|
||||||
* A simple element from the properties.
|
* A simple element from the properties.
|
||||||
*/
|
*/
|
||||||
public static class SimpleElement {
|
public static final class SimpleElement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Element title.
|
* Element title.
|
||||||
@@ -172,7 +172,7 @@ public class InitializrProperties extends InitializrConfiguration {
|
|||||||
*/
|
*/
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
public SimpleElement(String value) {
|
private SimpleElement(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
<commons-text.version>1.10.0</commons-text.version>
|
<commons-text.version>1.10.0</commons-text.version>
|
||||||
<maven-resolver.version>1.7.3</maven-resolver.version>
|
<maven-resolver.version>1.7.3</maven-resolver.version>
|
||||||
<maven-resolver-provider.version>3.8.6</maven-resolver-provider.version>
|
<maven-resolver-provider.version>3.8.6</maven-resolver-provider.version>
|
||||||
<spring-boot.version>2.7.5</spring-boot.version>
|
<spring-boot.version>3.0.0</spring-boot.version>
|
||||||
<spring-cloud-contract.version>3.1.4</spring-cloud-contract.version>
|
<spring-cloud-contract.version>4.0.0-RC1</spring-cloud-contract.version>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
<url>${git.url}</url>
|
<url>${git.url}</url>
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>jakarta.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ehcache</groupId>
|
<groupId>org.ehcache</groupId>
|
||||||
<artifactId>ehcache</artifactId>
|
<artifactId>ehcache</artifactId>
|
||||||
|
<classifier>jakarta</classifier>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -19,10 +19,9 @@ package io.spring.initializr.web.autoconfigure;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import io.spring.initializr.web.support.Agent;
|
import io.spring.initializr.web.support.Agent;
|
||||||
import io.spring.initializr.web.support.Agent.AgentId;
|
import io.spring.initializr.web.support.Agent.AgentId;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -28,8 +28,6 @@ import java.util.function.BiConsumer;
|
|||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import io.spring.initializr.generator.buildsystem.BuildSystem;
|
import io.spring.initializr.generator.buildsystem.BuildSystem;
|
||||||
import io.spring.initializr.generator.buildsystem.maven.MavenBuildSystem;
|
import io.spring.initializr.generator.buildsystem.maven.MavenBuildSystem;
|
||||||
import io.spring.initializr.generator.project.ProjectDescription;
|
import io.spring.initializr.generator.project.ProjectDescription;
|
||||||
@@ -39,6 +37,7 @@ import io.spring.initializr.web.project.InvalidProjectRequestException;
|
|||||||
import io.spring.initializr.web.project.ProjectGenerationInvoker;
|
import io.spring.initializr.web.project.ProjectGenerationInvoker;
|
||||||
import io.spring.initializr.web.project.ProjectGenerationResult;
|
import io.spring.initializr.web.project.ProjectGenerationResult;
|
||||||
import io.spring.initializr.web.project.ProjectRequest;
|
import io.spring.initializr.web.project.ProjectRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||||
import org.apache.commons.compress.archivers.ArchiveOutputStream;
|
import org.apache.commons.compress.archivers.ArchiveOutputStream;
|
||||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -19,8 +19,6 @@ package io.spring.initializr.web.controller;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import io.spring.initializr.generator.version.Version;
|
import io.spring.initializr.generator.version.Version;
|
||||||
import io.spring.initializr.metadata.DependencyMetadata;
|
import io.spring.initializr.metadata.DependencyMetadata;
|
||||||
import io.spring.initializr.metadata.DependencyMetadataProvider;
|
import io.spring.initializr.metadata.DependencyMetadataProvider;
|
||||||
@@ -35,6 +33,7 @@ import io.spring.initializr.web.mapper.InitializrMetadataV22JsonMapper;
|
|||||||
import io.spring.initializr.web.mapper.InitializrMetadataV2JsonMapper;
|
import io.spring.initializr.web.mapper.InitializrMetadataV2JsonMapper;
|
||||||
import io.spring.initializr.web.mapper.InitializrMetadataVersion;
|
import io.spring.initializr.web.mapper.InitializrMetadataVersion;
|
||||||
import io.spring.initializr.web.project.InvalidProjectRequestException;
|
import io.spring.initializr.web.project.InvalidProjectRequestException;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.http.CacheControl;
|
import org.springframework.http.CacheControl;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,7 +20,7 @@ import io.spring.initializr.web.AbstractInitializrIntegrationTests.Config;
|
|||||||
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
import org.springframework.boot.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
import jakarta.servlet.RequestDispatcher;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
|
|||||||
21
pom.xml
21
pom.xml
@@ -231,4 +231,25 @@
|
|||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user