Skip to content

Commit

Permalink
Fix registration of ScopedProxyBeanRegistrationAotProcessor
Browse files Browse the repository at this point in the history
Closes gh-28561
  • Loading branch information
snicoll committed Jun 3, 2022
1 parent 0a7a53a commit 176ea5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
@@ -1,2 +1,2 @@
org.springframework.beans.factory.aot.registration.BeanRegistrationAotProcessor=\
org.springframework.beans.factory.aot.BeanRegistrationAotProcessor=\
org.springframework.aop.scope.ScopedProxyBeanRegistrationAotProcessor
Expand Up @@ -34,8 +34,10 @@
import org.springframework.aot.test.generator.compile.Compiled;
import org.springframework.aot.test.generator.compile.TestCompiler;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.aot.AotFactoriesLoader;
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution;
import org.springframework.beans.factory.aot.BeanFactoryInitializationCode;
import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor;
import org.springframework.beans.factory.aot.TestBeanRegistrationsAotProcessor;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
Expand Down Expand Up @@ -77,6 +79,12 @@ void setup() {
this.beanFactoryInitializationCode = new MockBeanFactoryInitializationCode();
}

@Test
void scopedProxyBeanRegistrationAotProcessorIsRegistered() {
assertThat(new AotFactoriesLoader(this.beanFactory).load(BeanRegistrationAotProcessor.class))
.anyMatch(ScopedProxyBeanRegistrationAotProcessor.class::isInstance);
}

@Test
void getBeanRegistrationCodeGeneratorWhenNotScopedProxy() {
BeanDefinition beanDefinition = BeanDefinitionBuilder
Expand Down

0 comments on commit 176ea5e

Please sign in to comment.