Consistent use of SCOPE_PROTOTYPE and SCOPE_SINGLETON constants
Closes gh-19905
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
|
||||
package example.scannable_scoped;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@MyScope(BeanDefinition.SCOPE_PROTOTYPE)
|
||||
@MyScope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
public class CustomScopeAnnotationBean {
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ package example.scannable_scoped;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.ScopedProxyMode;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface MyScope {
|
||||
String value() default BeanDefinition.SCOPE_SINGLETON;
|
||||
String value() default ConfigurableBeanFactory.SCOPE_SINGLETON;
|
||||
ScopedProxyMode proxyMode() default ScopedProxyMode.DEFAULT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user