Consistent use of SCOPE_PROTOTYPE and SCOPE_SINGLETON constants

Closes gh-19905
This commit is contained in:
Sam Brannen
2019-11-24 13:49:43 +01:00
parent 7bed4f36da
commit 59e250c93c
23 changed files with 138 additions and 126 deletions

View File

@@ -20,6 +20,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.TargetSource;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.tests.sample.beans.SerializablePerson;
@@ -47,7 +48,7 @@ public class PrototypeBasedTargetSourceTests {
MutablePropertyValues pvs = new MutablePropertyValues();
RootBeanDefinition bd = new RootBeanDefinition(SerializablePerson.class);
bd.setPropertyValues(pvs);
bd.setScope(RootBeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
bf.registerBeanDefinition("ts", tsBd);