Allow hibernate.version as synonym in dependency management

pull/276/head
Dave Syer 11 years ago
parent 01550fcec6
commit 8d05cd1fb6

@ -21,6 +21,7 @@ import java.util.List;
import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
@ -64,6 +65,7 @@ public abstract class AutoConfigurationPackages {
beanDefinition.setBeanClass(BasePackage.class); beanDefinition.setBeanClass(BasePackage.class);
beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0, beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0,
packageName); packageName);
beanDefinition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE);
registry.registerBeanDefinition(BEAN, beanDefinition); registry.registerBeanDefinition(BEAN, beanDefinition);
} }

@ -17,7 +17,8 @@
<groovy.version>2.2.1</groovy.version> <groovy.version>2.2.1</groovy.version>
<h2.version>1.3.175</h2.version> <h2.version>1.3.175</h2.version>
<hamcrest.version>1.3</hamcrest.version> <hamcrest.version>1.3</hamcrest.version>
<hibernate-entitymanager.version>4.3.0.Final</hibernate-entitymanager.version> <hibernate.version>4.3.0.Final</hibernate.version>
<hibernate-entitymanager.version>${hibernate.version}</hibernate-entitymanager.version>
<hibernate-jpa-api.version>1.0.1.Final</hibernate-jpa-api.version> <hibernate-jpa-api.version>1.0.1.Final</hibernate-jpa-api.version>
<hibernate-validator.version>5.0.2.Final</hibernate-validator.version> <hibernate-validator.version>5.0.2.Final</hibernate-validator.version>
<httpclient.version>4.3.2</httpclient.version> <httpclient.version>4.3.2</httpclient.version>

@ -23,6 +23,7 @@ import java.util.Set;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
@ -52,6 +53,7 @@ class EntityScanRegistrar implements ImportBeanDefinitionRegistrar {
beanDefinition.setBeanClass(EntityScanBeanPostProcessor.class); beanDefinition.setBeanClass(EntityScanBeanPostProcessor.class);
beanDefinition.getConstructorArgumentValues().addGenericArgumentValue( beanDefinition.getConstructorArgumentValues().addGenericArgumentValue(
getPackagesToScan(importingClassMetadata)); getPackagesToScan(importingClassMetadata));
beanDefinition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE);
registry.registerBeanDefinition(BEAN_NAME, beanDefinition); registry.registerBeanDefinition(BEAN_NAME, beanDefinition);
} }
} }

Loading…
Cancel
Save