diff --git a/.travis.yml b/.travis.yml
index e3efdaba..c7435d0c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,8 @@ env:
- PROFILE=non-existant
- PROFILE=spring42
- PROFILE=spring43
- - PROFILE=spring42-next
+ - PROFILE=spring43-next
+ - PROFILE=spring5-next
cache:
directories:
- $HOME/.m2
diff --git a/pom.xml b/pom.xml
index 662f1583..1257855f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
spring42
- 4.2.6.RELEASE
+ 4.2.7.RELEASE
2.6.5
@@ -83,21 +83,29 @@
spring43
- 4.3.0.RC1
+ 4.3.1.RELEASE
2.7.4
-
-
- spring-libs-milestone
- http://repo.spring.io/libs-milestone
-
-
spring43-next
- 4.3.0.BUILD-SNAPSHOT
+ 4.3.2.BUILD-SNAPSHOT
+ 2.7.4
+
+
+
+ spring-libs-snapshot
+ http://repo.spring.io/libs-snapshot
+
+
+
+
+
+ spring5-next
+
+ 5.0.0.BUILD-SNAPSHOT
2.7.4
diff --git a/src/main/java/org/springframework/hateoas/config/HypermediaSupportBeanDefinitionRegistrar.java b/src/main/java/org/springframework/hateoas/config/HypermediaSupportBeanDefinitionRegistrar.java
index 913f55c1..c1bf6e44 100644
--- a/src/main/java/org/springframework/hateoas/config/HypermediaSupportBeanDefinitionRegistrar.java
+++ b/src/main/java/org/springframework/hateoas/config/HypermediaSupportBeanDefinitionRegistrar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2015 the original author or authors.
+ * Copyright 2013-2016 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.
@@ -64,7 +64,6 @@ import org.springframework.plugin.core.support.PluginRegistryFactoryBean;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.web.client.RestTemplate;
-import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -77,7 +76,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
*
* @author Oliver Gierke
*/
-@SuppressWarnings("deprecation")
class HypermediaSupportBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {
private static final String DELEGATING_REL_PROVIDER_BEAN_NAME = "_relProvider";
@@ -253,13 +251,10 @@ class HypermediaSupportBeanDefinitionRegistrar implements ImportBeanDefinitionRe
adapter.setMessageConverters(potentiallyRegisterModule(adapter.getMessageConverters()));
}
- if (bean instanceof AnnotationMethodHandlerAdapter) {
+ if (bean instanceof RequestMappingHandlerAdapter) {
- AnnotationMethodHandlerAdapter adapter = (AnnotationMethodHandlerAdapter) bean;
- List> augmentedConverters = potentiallyRegisterModule(
- Arrays.asList(adapter.getMessageConverters()));
- adapter
- .setMessageConverters(augmentedConverters.toArray(new HttpMessageConverter>[augmentedConverters.size()]));
+ RequestMappingHandlerAdapter adapter = (RequestMappingHandlerAdapter) bean;
+ adapter.setMessageConverters(potentiallyRegisterModule(adapter.getMessageConverters()));
}
if (bean instanceof RestTemplate) {
diff --git a/src/test/java/org/springframework/hateoas/config/EnableHypermediaSupportIntegrationTest.java b/src/test/java/org/springframework/hateoas/config/EnableHypermediaSupportIntegrationTest.java
index f5101e36..4ac60d3a 100644
--- a/src/test/java/org/springframework/hateoas/config/EnableHypermediaSupportIntegrationTest.java
+++ b/src/test/java/org/springframework/hateoas/config/EnableHypermediaSupportIntegrationTest.java
@@ -19,7 +19,6 @@ import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.lang.reflect.Method;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -50,7 +49,6 @@ import org.springframework.util.ReflectionUtils;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.HandlerMethodArgumentResolverComposite;
-import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
@@ -62,7 +60,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
*
* @author Oliver Gierke
*/
-@SuppressWarnings("deprecation")
@RunWith(MockitoJUnitRunner.class)
public class EnableHypermediaSupportIntegrationTest {
@@ -152,13 +149,13 @@ public class EnableHypermediaSupportIntegrationTest {
private static void assertEntityLinksSetUp(ApplicationContext context) {
Map discoverers = context.getBeansOfType(EntityLinks.class);
- assertThat(discoverers.values(), Matchers. hasItem(instanceOf(DelegatingEntityLinks.class)));
+ assertThat(discoverers.values(), Matchers.hasItem(instanceOf(DelegatingEntityLinks.class)));
}
private static void assertRelProvidersSetUp(ApplicationContext context) {
Map discoverers = context.getBeansOfType(RelProvider.class);
- assertThat(discoverers.values(), Matchers. hasItem(instanceOf(DelegatingRelProvider.class)));
+ assertThat(discoverers.values(), Matchers.hasItem(instanceOf(DelegatingRelProvider.class)));
}
@SuppressWarnings({ "unchecked" })
@@ -171,11 +168,7 @@ public class EnableHypermediaSupportIntegrationTest {
RequestMappingHandlerAdapter rmha = context.getBean(RequestMappingHandlerAdapter.class);
assertThat(rmha.getMessageConverters(),
- Matchers.> hasItems(instanceOf(MappingJackson2HttpMessageConverter.class)));
-
- AnnotationMethodHandlerAdapter amha = context.getBean(AnnotationMethodHandlerAdapter.class);
- assertThat(Arrays.asList(amha.getMessageConverters()),
- Matchers.> hasItems(instanceOf(MappingJackson2HttpMessageConverter.class)));
+ Matchers.>hasItems(instanceOf(MappingJackson2HttpMessageConverter.class)));
}
/**
@@ -215,13 +208,6 @@ public class EnableHypermediaSupportIntegrationTest {
return adapter;
}
- @Bean
- public AnnotationMethodHandlerAdapter amha() {
- AnnotationMethodHandlerAdapter adapter = new AnnotationMethodHandlerAdapter();
- numberOfMessageConvertersLegacy = adapter.getMessageConverters().length;
- return adapter;
- }
-
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();