Upgrade to Spring Framework 6 and Jakarta EE 9

Closes gh-750
Closes gh-748
This commit is contained in:
Andy Wilkinson
2021-09-28 15:01:55 +01:00
parent 68ff043fb3
commit 4223f70102
37 changed files with 147 additions and 217 deletions

View File

@@ -248,8 +248,9 @@ public class RestAssuredRestDocumentationIntegrationTests {
assertExpectedSnippetFilesExist(new File("build/generated-snippets/set-cookie"), "http-request.adoc",
"http-response.adoc", "curl-request.adoc");
assertThat(new File("build/generated-snippets/set-cookie/http-response.adoc"))
.has(content(httpResponse(TemplateFormats.asciidoctor(), HttpStatus.OK).header(HttpHeaders.SET_COOKIE,
"name=value; Domain=localhost; HttpOnly")));
.has(content(httpResponse(TemplateFormats.asciidoctor(), HttpStatus.OK)
.header(HttpHeaders.SET_COOKIE, "name=value; Domain=localhost; HttpOnly")
.header("Keep-Alive", "timeout=60").header("Connection", "keep-alive")));
}
@Test
@@ -307,7 +308,8 @@ public class RestAssuredRestDocumentationIntegrationTests {
assertThat(new File("build/generated-snippets/preprocessed-response/http-response.adoc"))
.has(content(httpResponse(TemplateFormats.asciidoctor(), HttpStatus.OK)
.header("Foo", "https://api.example.com/foo/bar")
.header("Content-Type", "application/json;charset=UTF-8")
.header("Content-Type", "application/json;charset=UTF-8").header("Keep-Alive", "timeout=60")
.header("Connection", "keep-alive")
.header(HttpHeaders.CONTENT_LENGTH, prettyPrinted.getBytes().length).content(prettyPrinted)));
}
@@ -326,7 +328,8 @@ public class RestAssuredRestDocumentationIntegrationTests {
assertThat(new File("build/generated-snippets/default-preprocessed-response/http-response.adoc"))
.has(content(httpResponse(TemplateFormats.asciidoctor(), HttpStatus.OK)
.header("Foo", "https://api.example.com/foo/bar")
.header("Content-Type", "application/json;charset=UTF-8")
.header("Content-Type", "application/json;charset=UTF-8").header("Keep-Alive", "timeout=60")
.header("Connection", "keep-alive")
.header(HttpHeaders.CONTENT_LENGTH, prettyPrinted.getBytes().length).content(prettyPrinted)));
}

View File

@@ -21,14 +21,13 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;