Start building against Spring Data Kay snapshots

See gh-13890
This commit is contained in:
Stephane Nicoll
2018-07-25 15:34:52 +02:00
parent 1ab98ca33f
commit 99f33d5070
2 changed files with 2 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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,11 +17,7 @@
package org.springframework.boot.autoconfigure.data.rest;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.After;
import org.junit.Test;
@@ -146,31 +142,6 @@ public class RepositoryRestMvcAutoConfigurationTests {
assertThat(bean.getBaseUri()).isEqualTo(URI.create(""));
}
@Test
public void objectMappersAreConfiguredUsingObjectMapperBuilder()
throws JsonProcessingException {
load(TestConfigurationWithObjectMapperBuilder.class);
assertThatDateIsFormattedCorrectly("halObjectMapper");
assertThatDateIsFormattedCorrectly("objectMapper");
}
@Test
public void primaryObjectMapperIsAvailable() {
load(TestConfiguration.class);
Map<String, ObjectMapper> objectMappers = this.context
.getBeansOfType(ObjectMapper.class);
assertThat(objectMappers.size()).isGreaterThan(1);
this.context.getBean(ObjectMapper.class);
}
public void assertThatDateIsFormattedCorrectly(String beanName)
throws JsonProcessingException {
ObjectMapper objectMapper = this.context.getBean(beanName, ObjectMapper.class);
assertThat(objectMapper.writeValueAsString(new Date(1413387983267L)))
.isEqualTo("\"2014-10\"");
}
private void load(Class<?> config, String... environment) {
AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
applicationContext.setServletContext(new MockServletContext());

View File

@@ -155,7 +155,7 @@
<spring-amqp.version>2.0.5.BUILD-SNAPSHOT</spring-amqp.version>
<spring-batch.version>4.0.1.RELEASE</spring-batch.version>
<spring-cloud-connectors.version>2.0.2.RELEASE</spring-cloud-connectors.version>
<spring-data-releasetrain.version>Kay-SR8</spring-data-releasetrain.version>
<spring-data-releasetrain.version>Kay-BUILD-SNAPSHOT</spring-data-releasetrain.version>
<spring-hateoas.version>0.25.0.BUILD-SNAPSHOT</spring-hateoas.version>
<spring-integration.version>5.0.7.BUILD-SNAPSHOT</spring-integration.version>
<spring-kafka.version>2.1.8.BUILD-SNAPSHOT</spring-kafka.version>