Skip to content

Commit 8cf70fe

Browse files
authored
Improve documentation for @Autowired/@value in @configuration classes
Closes gh-24585
1 parent 7e402ba commit 8cf70fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/docs/asciidoc/core/core-beans.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8876,8 +8876,9 @@ parameter-based injection, as in the preceding example.
88768876
88778877
Also, be particularly careful with `BeanPostProcessor` and `BeanFactoryPostProcessor` definitions
88788878
through `@Bean`. Those should usually be declared as `static @Bean` methods, not triggering the
8879-
instantiation of their containing configuration class. Otherwise, `@Autowired` and `@Value` do not
8880-
work on the configuration class itself, since it is being created as a bean instance too early.
8879+
instantiation of their containing configuration class. Otherwise, `@Autowired` and `@Value` may not
8880+
work on the configuration class itself, since it is possible to create it as a bean instance earlier than
8881+
{api-spring-framework}/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html[`AutowiredAnnotationBeanPostProcessor`].
88818882
====
88828883

88838884
The following example shows how one bean can be autowired to another bean:

0 commit comments

Comments
 (0)