From 84aaa063b4e6a154d4197db1429d6139b48bceae Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 19 Jun 2015 13:19:07 +0200 Subject: [PATCH] DATAREST-585 - Improvements in SpelAwareProxyProjectionFactory setup. We now forward the ApplicationContext as ResourceLoader into the SpelAwareProxyProjectionFactory to make sure we use the correct class loader in a Spring Boot Dev Tools environment. --- .../data/rest/webmvc/config/RepositoryRestMvcConfiguration.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java index 7d5edf372..9e95e2303 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java @@ -658,6 +658,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon SpelAwareProxyProjectionFactory projectionFactory = new SpelAwareProxyProjectionFactory(); projectionFactory.setBeanFactory(applicationContext); + projectionFactory.setResourceLoader(applicationContext); PersistentEntityResourceAssemblerArgumentResolver peraResolver = new PersistentEntityResourceAssemblerArgumentResolver( repositories(), entityLinks(), config().projectionConfiguration(), projectionFactory, resourceMappings());