Address some missed parts of the Jackson 3 migration
See gh-45535
This commit is contained in:
parent
c86eb5298a
commit
e764878b6d
|
@ -16,12 +16,6 @@
|
|||
|
||||
package org.springframework.boot.activemq.autoconfigure;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -53,14 +47,6 @@ class ActiveMQAutoConfigurationTests {
|
|||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(ActiveMQAutoConfiguration.class, JmsAutoConfiguration.class));
|
||||
|
||||
@Test
|
||||
void dunno() throws JsonProcessingException {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("key", null);
|
||||
String string = new ObjectMapper().setDefaultPropertyInclusion(Include.NON_NULL).writeValueAsString(map);
|
||||
System.out.println(string);
|
||||
}
|
||||
|
||||
@Test
|
||||
void brokerIsEmbeddedByDefault() {
|
||||
this.contextRunner.withUserConfiguration(EmptyConfiguration.class).run((context) -> {
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.springframework.boot.security.autoconfigure.servlet;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import tools.jackson.core.JsonParser;
|
||||
import tools.jackson.databind.DeserializationContext;
|
||||
import tools.jackson.databind.deser.std.StdDeserializer;
|
||||
import tools.jackson.databind.module.SimpleModule;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class GraphQlTypeExcludeFilter extends StandardAnnotationCustomizableType
|
|||
|
||||
private static final Class<?>[] NO_CONTROLLERS = {};
|
||||
|
||||
private static final String[] OPTIONAL_INCLUDES = { "com.fasterxml.jackson.databind.Module" };
|
||||
private static final String[] OPTIONAL_INCLUDES = { "tools.jackson.databind.JacksonModule" };
|
||||
|
||||
private static final Set<Class<?>> DEFAULT_INCLUDES;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
|
|||
*/
|
||||
public final class JsonTypeExcludeFilter extends StandardAnnotationCustomizableTypeExcludeFilter<JsonTest> {
|
||||
|
||||
private static final String JACKSON_MODULE = "com.fasterxml.jackson.databind.Module";
|
||||
private static final String JACKSON_MODULE = "tools.jackson.databind.JacksonModule";
|
||||
|
||||
private static final Set<Class<?>> DEFAULT_INCLUDES;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class RestClientTypeExcludeFilter extends StandardAnnotationCustomi
|
|||
|
||||
private static final Class<?>[] NO_COMPONENTS = {};
|
||||
|
||||
private static final String DATABIND_MODULE_CLASS_NAME = "com.fasterxml.jackson.databind.Module";
|
||||
private static final String DATABIND_MODULE_CLASS_NAME = "tools.jackson.databind.JacksonModule";
|
||||
|
||||
private static final Set<Class<?>> DEFAULT_INCLUDES;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public final class WebFluxTypeExcludeFilter extends StandardAnnotationCustomizab
|
|||
|
||||
private static final Class<?>[] NO_CONTROLLERS = {};
|
||||
|
||||
private static final String[] OPTIONAL_INCLUDES = { "com.fasterxml.jackson.databind.Module",
|
||||
private static final String[] OPTIONAL_INCLUDES = { "tools.jackson.databind.JacksonModule",
|
||||
"org.thymeleaf.dialect.IDialect" };
|
||||
|
||||
private static final Set<Class<?>> DEFAULT_INCLUDES;
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class WebMvcTypeExcludeFilter extends StandardAnnotationCustomizabl
|
|||
|
||||
private static final Class<?>[] NO_CONTROLLERS = {};
|
||||
|
||||
private static final String[] OPTIONAL_INCLUDES = { "com.fasterxml.jackson.databind.Module",
|
||||
private static final String[] OPTIONAL_INCLUDES = { "tools.jackson.databind.JacksonModule",
|
||||
"org.springframework.security.config.annotation.web.WebSecurityConfigurer",
|
||||
"org.springframework.security.web.SecurityFilterChain", "org.thymeleaf.dialect.IDialect" };
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ package org.springframework.boot.test.autoconfigure.graphql;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import graphql.GraphQLError;
|
||||
import graphql.execution.instrumentation.Instrumentation;
|
||||
import graphql.schema.DataFetchingEnvironment;
|
||||
import graphql.schema.idl.RuntimeWiring;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import reactor.core.publisher.Mono;
|
||||
import tools.jackson.databind.module.SimpleModule;
|
||||
|
||||
import org.springframework.boot.graphql.autoconfigure.GraphQlSourceBuilderCustomizer;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
|
|
@ -47,6 +47,7 @@ class RestClientTestWithoutJacksonIntegrationTests {
|
|||
void restClientTestCanBeUsedWhenJacksonIsNotOnTheClassPath() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
assertThat(ClassUtils.isPresent("com.fasterxml.jackson.databind.Module", classLoader)).isFalse();
|
||||
assertThat(ClassUtils.isPresent("tools.jackson.databind.JacksonModule", classLoader)).isFalse();
|
||||
this.server.expect(requestTo("/test")).andRespond(withSuccess("hello", MediaType.TEXT_HTML));
|
||||
assertThat(this.client.test()).isEqualTo("hello");
|
||||
}
|
||||
|
|
|
@ -18,10 +18,10 @@ package org.springframework.boot.test.autoconfigure.web.reactive;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.thymeleaf.dialect.IDialect;
|
||||
import reactor.core.publisher.Mono;
|
||||
import tools.jackson.databind.module.SimpleModule;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan.Filter;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
|
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.test.autoconfigure.web.servlet;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.thymeleaf.dialect.IDialect;
|
||||
import tools.jackson.databind.module.SimpleModule;
|
||||
|
||||
import org.springframework.boot.webmvc.autoconfigure.WebMvcRegistrations;
|
||||
import org.springframework.context.annotation.ComponentScan.Filter;
|
||||
|
|
|
@ -24,8 +24,4 @@ dependencies {
|
|||
api(project(":starter:spring-boot-starter"))
|
||||
|
||||
api(project(":module:spring-boot-jackson"))
|
||||
|
||||
api("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
|
||||
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
||||
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
|
||||
}
|
||||
|
|
|
@ -27,6 +27,6 @@ dependencies {
|
|||
|
||||
api(project(":module:spring-boot-rsocket"))
|
||||
|
||||
api("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
|
||||
api("io.rsocket:rsocket-transport-netty")
|
||||
api("tools.jackson.dataformat:jackson-dataformat-cbor")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue