From f4ff2e63ff1d6680592df4d4bf2781011ecf5ad3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 11 Jan 2024 13:45:20 +0000 Subject: [PATCH] Document that failure analyzers should use constructor injection Closes gh-39099 --- .../spring-boot-docs/src/docs/asciidoc/howto/application.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc index 638864778836..12220eda9229 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc @@ -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.