Added support to the SpringContextBootstrappingInitializer class for component scanning given a set of base packages to scan. Refactored LazyWiringDeclarableSupport to implement the DisposableBean interface in order for any extending bean component to unregister itself from the SpringContextBootstrappingInitializer to stop receiving ApplicationContext event notifications when destroyed. Fully tested the application component scanning and configuration using Annotations and JavaConfig-based configuration, uplifting some of the application components (UserDao, UserService, etc) from the integration test and adding a UserApplicationConfiguration @Configuration component in order to test this functionlity properly.

This commit is contained in:
John Blum
2014-02-07 18:25:31 -08:00
parent ba84061b48
commit f6ccc09c23
14 changed files with 434 additions and 67 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!DOCTYPE cache PUBLIC "-//GemStone Systems, Inc.//GemFire Declarative Caching 7.0//EN"
"http://www.gemstone.com/dtd/cache7_0.dtd">
<cache>
<region name="Users" refid="REPLICATE">
<region-attributes initial-capacity="101" load-factor="0.85">
<key-constraint>java.lang.String</key-constraint>
<value-constraint>org.springframework.data.gemfire.repository.sample.User</value-constraint>
<cache-loader>
<class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerIntegrationTest$UserDataStoreCacheLoader</class-name>
</cache-loader>
</region-attributes>
</region>
<initializer>
<class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer</class-name>
<parameter name="basePackages">
<string>
org.springframework.data.gemfire.support.sample
</string>
</parameter>
</initializer>
</cache>