Document that failure analyzers should use constructor injection

Closes gh-39099
This commit is contained in:
Andy Wilkinson 2024-01-11 13:45:20 +00:00
parent c1495bca33
commit f4ff2e63ff

View File

@ -23,7 +23,7 @@ The following example registers `ProjectConstraintViolationFailureAnalyzer`:
com.example.ProjectConstraintViolationFailureAnalyzer
----
NOTE: If you need access to the `BeanFactory` or the `Environment`, your `FailureAnalyzer` can implement `BeanFactoryAware` or `EnvironmentAware` respectively.
NOTE: If you need access to the `BeanFactory` or the `Environment`, declare them as constructor arguments in your `FailureAnalyzer` implementation.