Browse Source

Document that failure analyzers should use constructor injection

Closes gh-39099
pull/39107/head
Andy Wilkinson 2 years ago
parent
commit
f4ff2e63ff
  1. 2
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/application.adoc

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

@ -23,7 +23,7 @@ The following example registers `ProjectConstraintViolationFailureAnalyzer`: @@ -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.

Loading…
Cancel
Save