mirror of
https://gitee.com/dcren/initializr.git
synced 2025-12-20 03:49: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>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class GradleConfigurationBuildCustomizerTests {
|
||||
void providedRuntimeConfigurationIsAddedWithNonWarProject() {
|
||||
GradleBuild build = new GradleBuild();
|
||||
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);
|
||||
assertThat(build.configurations().names()).containsOnly("providedRuntime");
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class GradleConfigurationBuildCustomizerTests {
|
||||
GradleBuild build = new GradleBuild();
|
||||
build.plugins().add("war");
|
||||
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);
|
||||
assertThat(build.configurations().customizations()).isEmpty();
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class InitializrProperties extends InitializrConfiguration {
|
||||
/**
|
||||
* A simple element from the properties.
|
||||
*/
|
||||
public static class SimpleElement {
|
||||
public static final class SimpleElement {
|
||||
|
||||
/**
|
||||
* Element title.
|
||||
@@ -172,7 +172,7 @@ public class InitializrProperties extends InitializrConfiguration {
|
||||
*/
|
||||
private String value;
|
||||
|
||||
public SimpleElement(String value) {
|
||||
private SimpleElement(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<commons-text.version>1.10.0</commons-text.version>
|
||||
<maven-resolver.version>1.7.3</maven-resolver.version>
|
||||
<maven-resolver-provider.version>3.8.6</maven-resolver-provider.version>
|
||||
<spring-boot.version>2.7.5</spring-boot.version>
|
||||
<spring-cloud-contract.version>3.1.4</spring-cloud-contract.version>
|
||||
<spring-boot.version>3.0.0</spring-boot.version>
|
||||
<spring-cloud-contract.version>4.0.0-RC1</spring-cloud-contract.version>
|
||||
</properties>
|
||||
<scm>
|
||||
<url>${git.url}</url>
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
<dependency>
|
||||
<groupId>org.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
<classifier>jakarta</classifier>
|
||||
<scope>test</scope>
|
||||
</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");
|
||||
* 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.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import io.spring.initializr.web.support.Agent;
|
||||
import io.spring.initializr.web.support.Agent.AgentId;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.http.HttpHeaders;
|
||||
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");
|
||||
* 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.Function;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.spring.initializr.generator.buildsystem.BuildSystem;
|
||||
import io.spring.initializr.generator.buildsystem.maven.MavenBuildSystem;
|
||||
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.ProjectGenerationResult;
|
||||
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.ArchiveOutputStream;
|
||||
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");
|
||||
* 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.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.spring.initializr.generator.version.Version;
|
||||
import io.spring.initializr.metadata.DependencyMetadata;
|
||||
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.InitializrMetadataVersion;
|
||||
import io.spring.initializr.web.project.InvalidProjectRequestException;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.http.CacheControl;
|
||||
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");
|
||||
* 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.WebEnvironment;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
|
||||
/**
|
||||
* @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");
|
||||
* 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.List;
|
||||
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import jakarta.servlet.RequestDispatcher;
|
||||
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
21
pom.xml
21
pom.xml
@@ -231,4 +231,25 @@
|
||||
</profile>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user