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.
This commit is contained in:
Oliver Gierke
2015-06-19 13:19:07 +02:00
parent e4cf6d9f23
commit 84aaa063b4

View File

@@ -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());