File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
framework-docs/modules/ROOT/pages/core/beans/java
spring-context/src/main/java/org/springframework/context/annotation Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ The preceding `AppConfig` class is equivalent to the following Spring `<beans/>`
59
59
****
60
60
When `@Bean` methods are declared within classes that are not annotated with
61
61
`@Configuration`, they are referred to as being processed in a "`lite`" mode. Bean methods
62
- declared in a `@Component` or even in a plain old class are considered to be "`lite`",
62
+ declared on a bean that is not annotated with `@Configuration` are considered to be "`lite`",
63
63
with a different primary purpose of the containing class and a `@Bean` method
64
64
being a sort of bonus there. For example, service components may expose management views
65
65
to the container through an additional `@Bean` method on each applicable component class.
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2021 the original author or authors.
2
+ * Copyright 2002-2023 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.
135
135
* <h3>{@code @Bean} <em>Lite</em> Mode</h3>
136
136
*
137
137
* <p>{@code @Bean} methods may also be declared within classes that are <em>not</em>
138
- * annotated with {@code @Configuration}. For example, bean methods may be declared
139
- * in a {@code @Component} class or even in a <em>plain old class</em>. In such cases,
140
- * a {@code @Bean} method will get processed in a so-called <em>'lite'</em> mode.
138
+ * annotated with {@code @Configuration}. If a bean methods is declared on a bean
139
+ * that is <em>not</em> annotated with {@code @Configuration} it is processed in a
140
+ * so-called <em>'lite'</em> mode.
141
141
*
142
142
* <p>Bean methods in <em>lite</em> mode will be treated as plain <em>factory
143
143
* methods</em> by the container (similar to {@code factory-method} declarations
You can’t perform that action at this time.
0 commit comments