From e8f8559a2e1c5fa5c559f887756cdc085c90f26b Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 17 May 2012 00:47:07 +0200 Subject: [PATCH] Improve documentation of @Bean 'lite' mode Removed misleading mention of "configuration classes" in the "@Bean Lite Mode" section. Issue: SPR-9401 --- .../context/annotation/Bean.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java index 06f74784cf..a2fd1e4de7 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java @@ -103,16 +103,15 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition; *

{@code @Bean} methods may also be declared within classes that are not * annotated with {@code @Configuration}. For example, bean methods may be declared * in a {@code @Component} class or even in a plain old class. In such cases, - * a {@code @Bean} method will get processed in a configuration class 'lite' - * mode. + * a {@code @Bean} method will get processed in a so-called 'lite' mode. * - *

In contrast to bean methods in {@code @Configuration} classes as described - * above, bean methods in lite mode will be called as plain factory - * methods from the container (similar to {@code factory-method} declarations - * in XML) but with prototype semantics. The containing class remains - * unmodified in this case, and there are no unusual constraints for factory methods; - * however, scoping semantics are not respected as described above for - * 'inter-bean method invocations in this mode. For example: + *

In contrast to the semantics for bean methods in {@code @Configuration} classes + * as described above, bean methods in lite mode will be called as plain + * factory methods from the container (similar to {@code factory-method} + * declarations in XML) but with prototype semantics. The containing + * class remains unmodified in this case, and there are no unusual constraints for + * factory methods; however, scoping semantics are not respected as described + * above for 'inter-bean method' invocations in this mode. For example: * *

  * @Component