Skip to content

Commit f4ff2e6

Browse files
committed
Document that failure analyzers should use constructor injection
Closes gh-39099
1 parent c1495bc commit f4ff2e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The following example registers `ProjectConstraintViolationFailureAnalyzer`:
2323
com.example.ProjectConstraintViolationFailureAnalyzer
2424
----
2525

26-
NOTE: If you need access to the `BeanFactory` or the `Environment`, your `FailureAnalyzer` can implement `BeanFactoryAware` or `EnvironmentAware` respectively.
26+
NOTE: If you need access to the `BeanFactory` or the `Environment`, declare them as constructor arguments in your `FailureAnalyzer` implementation.
2727

2828

2929

0 commit comments

Comments
 (0)