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:
@@ -21,9 +21,9 @@ import java.io.Writer;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import javax.json.bind.Jsonb;
|
||||
import javax.json.bind.JsonbBuilder;
|
||||
import javax.json.bind.JsonbConfig;
|
||||
import jakarta.json.bind.Jsonb;
|
||||
import jakarta.json.bind.JsonbBuilder;
|
||||
import jakarta.json.bind.JsonbConfig;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 5.3
|
||||
* @see javax.json.bind.Jsonb
|
||||
* @see javax.json.bind.JsonbBuilder
|
||||
* @see jakarta.json.bind.Jsonb
|
||||
* @see jakarta.json.bind.JsonbBuilder
|
||||
* @see #setJsonb
|
||||
*/
|
||||
public class JsonbMessageConverter extends AbstractJsonMessageConverter {
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
* {@link DataBuffer DataBuffer}.
|
||||
*
|
||||
* <p>Validation is applied if the method argument is annotated with
|
||||
* {@code @javax.validation.Valid} or
|
||||
* {@code @jakarta.validation.Valid} or
|
||||
* {@link org.springframework.validation.annotation.Validated}. Validation
|
||||
* failure results in an {@link MethodArgumentNotValidException}.
|
||||
*
|
||||
@@ -143,7 +143,7 @@ public class PayloadMethodArgumentResolver implements HandlerMethodArgumentResol
|
||||
* {@link Decoder}.
|
||||
*
|
||||
* <p>Validation is applied if the method argument is annotated with
|
||||
* {@code @javax.validation.Valid} or
|
||||
* {@code @jakarta.validation.Valid} or
|
||||
* {@link org.springframework.validation.annotation.Validated}. Validation
|
||||
* failure results in an {@link MethodArgumentNotValidException}.
|
||||
*
|
||||
|
||||
@@ -190,7 +190,7 @@ public class PayloadMethodArgumentResolver implements HandlerMethodArgumentResol
|
||||
|
||||
/**
|
||||
* Validate the payload if applicable.
|
||||
* <p>The default implementation checks for {@code @javax.validation.Valid},
|
||||
* <p>The default implementation checks for {@code @jakarta.validation.Valid},
|
||||
* Spring's {@link Validated},
|
||||
* and custom annotations whose name starts with "Valid".
|
||||
* @param message the currently processed message
|
||||
|
||||
@@ -112,7 +112,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
|
||||
jackson2Present = ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", classLoader) &&
|
||||
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator", classLoader);
|
||||
gsonPresent = ClassUtils.isPresent("com.google.gson.Gson", classLoader);
|
||||
jsonbPresent = ClassUtils.isPresent("javax.json.bind.Jsonb", classLoader);
|
||||
jsonbPresent = ClassUtils.isPresent("jakarta.json.bind.Jsonb", classLoader);
|
||||
kotlinSerializationJsonPresent = ClassUtils.isPresent("kotlinx.serialization.json.Json", classLoader);
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
|
||||
if (this.applicationContext != null && this.applicationContext.containsBean(MVC_VALIDATOR_NAME)) {
|
||||
validator = this.applicationContext.getBean(MVC_VALIDATOR_NAME, Validator.class);
|
||||
}
|
||||
else if (ClassUtils.isPresent("javax.validation.Validator", getClass().getClassLoader())) {
|
||||
else if (ClassUtils.isPresent("jakarta.validation.Validator", getClass().getClassLoader())) {
|
||||
Class<?> clazz;
|
||||
try {
|
||||
String className = "org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean";
|
||||
|
||||
Reference in New Issue
Block a user