DATAREST-651 - Upgraded to Spring HATEOAS 0.19.
Upgraded to snapshots of Spring HATEOAS to use the now extended constructor of HalHandlerInstantiator to be able to render title attributes for links.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<spring.hateoas>0.18.0.RELEASE</spring.hateoas>
|
||||
<spring.hateoas>0.19.0.BUILD-SNAPSHOT</spring.hateoas>
|
||||
<springplugin>1.2.0.RELEASE</springplugin>
|
||||
<evoinflector>1.2.1</evoinflector>
|
||||
</properties>
|
||||
|
||||
@@ -477,7 +477,8 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon
|
||||
|
||||
RelProvider defaultedRelProvider = this.relProvider != null ? this.relProvider : new EvoInflectorRelProvider();
|
||||
|
||||
HalHandlerInstantiator instantiator = new HalHandlerInstantiator(defaultedRelProvider, curieProvider);
|
||||
HalHandlerInstantiator instantiator = new HalHandlerInstantiator(defaultedRelProvider, curieProvider,
|
||||
resourceDescriptionMessageSourceAccessor());
|
||||
|
||||
ObjectMapper mapper = basicObjectMapper();
|
||||
mapper.registerModule(persistentEntityJackson2Module());
|
||||
|
||||
@@ -58,7 +58,7 @@ import com.jayway.jsonpath.JsonPath;
|
||||
@ContextConfiguration(classes = { MongoDbRepositoryConfig.class, TestConfiguration.class })
|
||||
public class PersistentEntityToJsonSchemaConverterUnitTests {
|
||||
|
||||
@Autowired MessageSourceAccessor accessor;
|
||||
@Autowired @Qualifier("resourceDescriptionMessageSourceAccessor") MessageSourceAccessor accessor;
|
||||
@Autowired RepositoryResourceMappings mappings;
|
||||
@Autowired RepositoryRestConfiguration configuration;
|
||||
@Autowired PersistentEntities entities;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ProjectionJacksonIntegrationTests {
|
||||
|
||||
this.mapper = new ObjectMapper();
|
||||
this.mapper.registerModule(new Jackson2HalModule());
|
||||
this.mapper.setHandlerInstantiator(new HalHandlerInstantiator(new EvoInflectorRelProvider(), null));
|
||||
this.mapper.setHandlerInstantiator(new HalHandlerInstantiator(new EvoInflectorRelProvider(), null, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,8 @@ public class ProjectionJacksonIntegrationTests {
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.registerModule(new Jackson2HalModule());
|
||||
mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(new EvoInflectorRelProvider(), null));
|
||||
mapper.setHandlerInstantiator(
|
||||
new Jackson2HalModule.HalHandlerInstantiator(new EvoInflectorRelProvider(), null, null));
|
||||
|
||||
Customer customer = new Customer();
|
||||
customer.firstname = "Dave";
|
||||
|
||||
@@ -109,8 +109,8 @@ public class RepositoryTestsConfig {
|
||||
mock(PagingAndSortingTemplateVariables.class),
|
||||
OrderAwarePluginRegistry.<Class<?>, BackendIdConverter> create(Arrays.asList(DefaultIdConverter.INSTANCE)));
|
||||
|
||||
return new PersistentEntityJackson2Module(mappings, persistentEntities(), config(), new UriToEntityConverter(
|
||||
persistentEntities(), defaultConversionService()), entityLinks);
|
||||
return new PersistentEntityJackson2Module(mappings, persistentEntities(), config(),
|
||||
new UriToEntityConverter(persistentEntities(), defaultConversionService()), entityLinks);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -121,7 +121,7 @@ public class RepositoryTestsConfig {
|
||||
|
||||
mapper.registerModule(new Jackson2HalModule());
|
||||
mapper.registerModule(persistentEntityModule());
|
||||
mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(relProvider, null));
|
||||
mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(relProvider, null, null));
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.setSerializationInclusion(Include.NON_EMPTY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user