DATACMNS-492 - RepositoryConfigurationDelegate now expects an Environment.
Added a constructor to RepositoryConfigurationDelegate that takes an additional Environment instance to make sure we can equip ClasspathScanningCandidateComponentProviders with Environments to make sure they only find components matching the environment.
Retain the old constructor by defaulting to the Environment the ResourceLoader potentially contains or even a StandardEnvironment in worse cases. This is primarily to not break existing clients. Those should be upgraded to use the new constructor, of course.
Needed to add an additional guard in BeanDefinitionRegistrarSupport as Spring 3.2.8 fails to invoke EnvironmentAware (filed SPR-11744 for that). This should be removed once we upgrade to Spring 3.2.9.
Related pull request: #80.
Related tickets: DATACMNS-493, DATACMNS-494, SPR-11744.
@ -62,7 +62,8 @@ public class RepositoryBeanDefinitionParser implements BeanDefinitionParser {
@@ -62,7 +62,8 @@ public class RepositoryBeanDefinitionParser implements BeanDefinitionParser {
@ -71,13 +73,34 @@ public abstract class RepositoryBeanDefinitionRegistrarSupport implements Import
@@ -71,13 +73,34 @@ public abstract class RepositoryBeanDefinitionRegistrarSupport implements Import
@ -42,10 +43,12 @@ public abstract class RepositoryConfigurationSourceSupport implements Repository
@@ -42,10 +43,12 @@ public abstract class RepositoryConfigurationSourceSupport implements Repository
@ -39,20 +43,37 @@ public class RepositoryBeanDefinitionRegistrarSupportIntegrationTests {
@@ -39,20 +43,37 @@ public class RepositoryBeanDefinitionRegistrarSupportIntegrationTests {