From 604b9069b135a584eda42df11f834f2f9096786f Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 23 Sep 2013 17:06:13 +0200 Subject: [PATCH] #58 - Upgraded Spring Data JPA dependencies to Babbage release train. Adapted to changes in the API in Spring Data Commons which requires to pass in the current Environment into the AnnotationRepositoryConfigurationSource. --- ...bstractRepositoryConfigurationSourceSupport.java | 13 +++++++++++-- spring-boot-dependencies/pom.xml | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java index 17d77b0d71..0f67ea2eca 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java @@ -29,7 +29,9 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.boot.autoconfigure.AutoConfigurationUtils; +import org.springframework.context.EnvironmentAware; import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; +import org.springframework.core.env.Environment; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.ResourceLoader; import org.springframework.core.type.AnnotationMetadata; @@ -46,9 +48,10 @@ import org.springframework.data.repository.config.RepositoryConfigurationExtensi * * @author Phillip Webb * @author Dave Syer + * @author Oliver Gierke */ public abstract class AbstractRepositoryConfigurationSourceSupport implements - BeanFactoryAware, ImportBeanDefinitionRegistrar, BeanClassLoaderAware { + BeanFactoryAware, ImportBeanDefinitionRegistrar, BeanClassLoaderAware, EnvironmentAware { private static Log logger = LogFactory .getLog(AbstractRepositoryConfigurationSourceSupport.class); @@ -56,6 +59,8 @@ public abstract class AbstractRepositoryConfigurationSourceSupport implements private ClassLoader beanClassLoader; private BeanFactory beanFactory; + + private Environment environment; @Override public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, @@ -90,7 +95,7 @@ public abstract class AbstractRepositoryConfigurationSourceSupport implements StandardAnnotationMetadata metadata = new StandardAnnotationMetadata( getConfiguration(), true); AnnotationRepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource( - metadata, getAnnotation()) { + metadata, getAnnotation(), environment) { @Override public java.lang.Iterable getBasePackages() { @@ -136,4 +141,8 @@ public abstract class AbstractRepositoryConfigurationSourceSupport implements this.beanFactory = beanFactory; } + @Override + public void setEnvironment(Environment environment) { + this.environment = environment; + } } diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index 482c0e7ddb..055617e518 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -37,8 +37,8 @@ 2.2.4.RELEASE 1.0.0.M1 2.2.0.RELEASE - 1.3.2.RELEASE - 1.2.3.RELEASE + 1.4.1.RELEASE + 1.3.1.RELEASE 2.0.16 2.0.0 1.1.1