From 6831e18cdedb932cd742f4360baf0f5957b10196 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 18 Jun 2015 17:53:01 +0200 Subject: [PATCH] DATAREST-583 - RepositoryRestMvcConfiguration now forwards Environment and ResourceLoader to AnnotatedTypeScanner. --- .../rest/webmvc/config/RepositoryRestMvcConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 a5cf9197d..7d5edf372 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 @@ -699,7 +699,11 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon packagesToScan.add(domainType.getPackage().getName()); } - return new AnnotatedTypeScanner(Projection.class).findTypes(packagesToScan); + AnnotatedTypeScanner scanner = new AnnotatedTypeScanner(Projection.class); + scanner.setEnvironment(applicationContext.getEnvironment()); + scanner.setResourceLoader(applicationContext); + + return scanner.findTypes(packagesToScan); } //