Latest dependency updates (Jackson 2.4, Jetty 9.2.1, H2 1.4.178, Apache HttpClient 4.3.4)
This commit is contained in:
parent
bb4a9cca1b
commit
88eabe874c
10
build.gradle
10
build.gradle
|
@ -21,10 +21,10 @@ configure(allprojects) { project ->
|
|||
ext.hibVal4Version = "4.3.1.Final"
|
||||
ext.hibVal5Version = "5.1.1.Final"
|
||||
ext.hsqldbVersion = "2.3.2"
|
||||
ext.jackson2Version = "2.3.3"
|
||||
ext.jackson2Version = "2.4.0"
|
||||
ext.gsonVersion = "2.2.4"
|
||||
ext.jasperReportsVersion = "5.6.0"
|
||||
ext.jettyVersion = "9.2.0.v20140526"
|
||||
ext.jettyVersion = "9.2.1.v20140609"
|
||||
ext.jodaVersion = "2.3"
|
||||
ext.junitVersion = "4.11"
|
||||
ext.openJpaVersion = "2.2.2" // 2.3.0 not Java 8 compatible (based on ASM 4)
|
||||
|
@ -560,7 +560,7 @@ project("spring-jdbc") {
|
|||
optional("javax.transaction:javax.transaction-api:1.2")
|
||||
optional("com.mchange:c3p0:0.9.2.1")
|
||||
optional("org.hsqldb:hsqldb:${hsqldbVersion}")
|
||||
optional("com.h2database:h2:1.3.176")
|
||||
optional("com.h2database:h2:1.4.178")
|
||||
optional("org.apache.derby:derby:10.10.2.0")
|
||||
optional("org.apache.derby:derbyclient:10.10.2.0")
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ project("spring-web") {
|
|||
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
||||
optional("com.caucho:hessian:4.0.38")
|
||||
optional("commons-fileupload:commons-fileupload:1.3.1")
|
||||
optional("org.apache.httpcomponents:httpclient:4.3.3")
|
||||
optional("org.apache.httpcomponents:httpclient:4.3.4")
|
||||
optional("org.apache.httpcomponents:httpasyncclient:4.0.1")
|
||||
optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
|
||||
optional("com.google.code.gson:gson:${gsonVersion}")
|
||||
|
@ -816,7 +816,7 @@ project("spring-webmvc") {
|
|||
}
|
||||
testCompile("javax.validation:validation-api:1.0.0.GA")
|
||||
testCompile("org.hibernate:hibernate-validator:${hibVal4Version}")
|
||||
testCompile("org.apache.httpcomponents:httpclient:4.3.3")
|
||||
testCompile("org.apache.httpcomponents:httpclient:4.3.4")
|
||||
testCompile("commons-fileupload:commons-fileupload:1.3.1")
|
||||
testCompile("commons-io:commons-io:1.3")
|
||||
testCompile("joda-time:joda-time:${jodaVersion}")
|
||||
|
|
|
@ -23,11 +23,6 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
|
@ -48,8 +43,12 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
|||
import com.fasterxml.jackson.databind.ser.BasicSerializerFactory;
|
||||
import com.fasterxml.jackson.databind.ser.Serializers;
|
||||
import com.fasterxml.jackson.databind.ser.std.ClassSerializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.NumberSerializers.NumberSerializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.NumberSerializer;
|
||||
import com.fasterxml.jackson.databind.type.SimpleType;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
@ -161,16 +160,16 @@ public class Jackson2ObjectMapperFactoryBeanTests {
|
|||
|
||||
@Test
|
||||
public void testSetModules() {
|
||||
JsonSerializer serializer1 = new NumberSerializer();
|
||||
NumberSerializer serializer1 = new NumberSerializer();
|
||||
SimpleModule module = new SimpleModule();
|
||||
module.addSerializer(Boolean.class,serializer1);
|
||||
module.addSerializer(Integer.class, serializer1);
|
||||
|
||||
this.factory.setModules(Arrays.asList(new Module[]{module}));
|
||||
this.factory.setModules(Arrays.asList(new Module[] {module}));
|
||||
this.factory.afterPropertiesSet();
|
||||
ObjectMapper objectMapper = this.factory.getObject();
|
||||
|
||||
Serializers serializers = getSerializerFactoryConfig(objectMapper).serializers().iterator().next();
|
||||
assertTrue(serializers.findSerializer(null, SimpleType.construct(Boolean.class), null) == serializer1);
|
||||
assertTrue(serializers.findSerializer(null, SimpleType.construct(Integer.class), null) == serializer1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue