Jakarta EE 9 migration

Upgrades many dependency declarations; removes old EJB 2.x support and outdated Servlet-based integrations (Commons FileUpload, FreeMarker JSP support, Tiles).

Closes gh-22093
Closes gh-25354
Closes gh-26185
Closes gh-27423
See gh-27424
This commit is contained in:
Juergen Hoeller
2021-09-17 09:14:07 +02:00
parent 5822f1bf85
commit d84ca2ba90
1291 changed files with 4992 additions and 25322 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -17,6 +17,7 @@
package org.springframework.messaging.converter;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
@@ -74,8 +75,8 @@ public class JsonbMessageConverterTests {
HashMap<String, Object> actual = (HashMap<String, Object>) converter.fromMessage(message, HashMap.class);
assertThat(actual.get("string")).isEqualTo("Foo");
assertThat(actual.get("number")).isEqualTo(42);
assertThat((Double) actual.get("fraction")).isCloseTo(42D, within(0D));
assertThat(actual.get("number")).isEqualTo(new BigDecimal(42));
assertThat((BigDecimal) actual.get("fraction")).isCloseTo(new BigDecimal(42), within(new BigDecimal(0)));
assertThat(actual.get("array")).isEqualTo(Arrays.asList("Foo", "Bar"));
assertThat(actual.get("bool")).isEqualTo(Boolean.TRUE);
}
@@ -165,7 +166,7 @@ public class JsonbMessageConverterTests {
String payload = "H\u00e9llo W\u00f6rld";
Message<?> message = converter.toMessage(payload, headers);
assertThat(new String((byte[]) message.getPayload(), StandardCharsets.UTF_16BE)).isEqualTo(payload);
assertThat(new String((byte[]) message.getPayload(), StandardCharsets.UTF_16BE)).isEqualTo("\"" + payload + "\"");
assertThat(message.getHeaders().get(MessageHeaders.CONTENT_TYPE)).isEqualTo(contentType);
}
@@ -181,7 +182,7 @@ public class JsonbMessageConverterTests {
String payload = "H\u00e9llo W\u00f6rld";
Message<?> message = converter.toMessage(payload, headers);
assertThat(message.getPayload()).isEqualTo(payload);
assertThat(message.getPayload()).isEqualTo("\"" + payload + "\"");
assertThat(message.getHeaders().get(MessageHeaders.CONTENT_TYPE)).isEqualTo(contentType);
}

View File

@@ -19,8 +19,7 @@ package org.springframework.messaging.converter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.xmlunit.diff.DifferenceEvaluator;