Skip to content

Commit f21e150

Browse files
committed
DATAREST-840 - HalHandlerInstantiator now gets BeanFactory forwarded.
We now forward the AutowireCapableBeanFactory contained in the ApplicationContext to the HalHandlerInstantiator to make sure Jackson components can use dependency injection to access Spring managed beans. Upgraded to Spring HATEOAS 0.21 snapshots to see the changes necessary in HalHandlerInstantiator. Related ticket: spring-projects/spring-hateoas#460.
1 parent f2f9564 commit f21e150

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ public ObjectMapper halObjectMapper() {
503503
RelProvider defaultedRelProvider = this.relProvider != null ? this.relProvider : new EvoInflectorRelProvider();
504504

505505
HalHandlerInstantiator instantiator = new HalHandlerInstantiator(defaultedRelProvider, curieProvider,
506-
resourceDescriptionMessageSourceAccessor());
506+
resourceDescriptionMessageSourceAccessor(), applicationContext.getAutowireCapableBeanFactory());
507507

508508
ObjectMapper mapper = basicObjectMapper();
509509
mapper.registerModule(persistentEntityJackson2Module());

0 commit comments

Comments
 (0)