Refactor SecurityManagerProxy class.

Remove init(:Properties) method call from constructor.

Implement the o.s.beans.factory.BeanFactoryAware interface.

Override the locateBeanFactory() method.

Switch the test configuration to use the new @EnableSecurityManagerProxy annotation.
This commit is contained in:
John Blum
2019-05-03 19:14:11 -07:00
parent 4f7383f71b
commit fa421c6da4
2 changed files with 32 additions and 13 deletions

View File

@@ -25,10 +25,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.data.gemfire.config.annotation.EnableSecurity;
import org.springframework.data.gemfire.config.annotation.PeerCacheApplication;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
import org.springframework.geode.config.annotation.EnableSecurityManagerProxy;
import org.springframework.geode.core.util.ObjectUtils;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
@@ -77,8 +77,8 @@ public class SecurityManagerProxyIntegrationTests extends IntegrationTestsSuppor
}
@EnableGemFireMockObjects
@PeerCacheApplication(logLevel = GEMFIRE_LOG_LEVEL, useBeanFactoryLocator = true)
@EnableSecurity(securityManagerClassName = "org.springframework.geode.security.support.SecurityManagerProxy")
@EnableSecurityManagerProxy
@PeerCacheApplication(logLevel = GEMFIRE_LOG_LEVEL)
static class TestConfiguration {
@Bean