diff --git a/framework-docs/modules/ROOT/pages/core/beans/java/basic-concepts.adoc b/framework-docs/modules/ROOT/pages/core/beans/java/basic-concepts.adoc index f90a2752b7e..80794f693e9 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/java/basic-concepts.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/java/basic-concepts.adoc @@ -59,7 +59,7 @@ The preceding `AppConfig` class is equivalent to the following Spring `` **** When `@Bean` methods are declared within classes that are not annotated with `@Configuration`, they are referred to as being processed in a "`lite`" mode. Bean methods -declared in a `@Component` or even in a plain old class are considered to be "`lite`", +declared on a bean that is not annotated with `@Configuration` are considered to be "`lite`", with a different primary purpose of the containing class and a `@Bean` method being a sort of bonus there. For example, service components may expose management views to the container through an additional `@Bean` method on each applicable component class. 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 14732b17833..ac92d710846 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -135,9 +135,9 @@ import org.springframework.core.annotation.AliasFor; *

{@code @Bean} Lite Mode

* *

{@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 so-called 'lite' mode. + * annotated with {@code @Configuration}. If a bean methods is declared on a bean + * that is not annotated with {@code @Configuration} it is processed in a + * so-called 'lite' mode. * *

Bean methods in lite mode will be treated as plain factory * methods by the container (similar to {@code factory-method} declarations