|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2009 the original author or authors. |
| 2 | + * Copyright 2002-2011 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
22 | 22 | import java.lang.annotation.RetentionPolicy;
|
23 | 23 | import java.lang.annotation.Target;
|
24 | 24 |
|
25 |
| -import org.springframework.beans.factory.config.BeanDefinition; |
| 25 | +import org.springframework.beans.factory.config.ConfigurableBeanFactory; |
26 | 26 | import org.springframework.stereotype.Component;
|
27 | 27 |
|
28 | 28 | /**
|
|
35 | 35 | * the instance returned from the method.
|
36 | 36 | *
|
37 | 37 | * <p>In this context, scope means the lifecycle of an instance, such as
|
38 |
| - * {@code singleton}, {@code prototype}, and so forth. |
39 |
| - * |
| 38 | + * {@code singleton}, {@code prototype}, and so forth. Scopes provided out of the box in |
| 39 | + * Spring may be referred to using the {@code SCOPE_*} constants available in |
| 40 | + * via {@link ConfigurableBeanFactory} and {@code WebApplicationContext} interfaces. |
| 41 | + * |
| 42 | + * <p>To register additional custom scopes, see |
| 43 | + * {@link org.springframework.beans.factory.config.CustomScopeConfigurer CustomScopeConfigurer}. |
| 44 | + * |
40 | 45 | * @author Mark Fisher
|
41 | 46 | * @author Chris Beams
|
42 | 47 | * @since 2.5
|
|
50 | 55 |
|
51 | 56 | /**
|
52 | 57 | * Specifies the scope to use for the annotated component/bean.
|
53 |
| - * @return the specified scope |
| 58 | + * @see ConfigurableBeanFactory#SCOPE_SINGLETON |
| 59 | + * @see ConfigurableBeanFactory#SCOPE_PROTOTYPE |
| 60 | + * @see org.springframework.web.context.WebApplicationContext#SCOPE_REQUEST |
| 61 | + * @see org.springframework.web.context.WebApplicationContext#SCOPE_SESSION |
54 | 62 | */
|
55 |
| - String value() default BeanDefinition.SCOPE_SINGLETON; |
| 63 | + String value() default ConfigurableBeanFactory.SCOPE_SINGLETON; |
56 | 64 |
|
57 | 65 | /**
|
58 | 66 | * Specifies whether a component should be configured as a scoped proxy
|
|
0 commit comments