Merge branch '1.4.x' into 1.5.x
This commit is contained in:
@@ -24,9 +24,9 @@ can send us a {github-code}[pull request].
|
||||
|
||||
[[howto-failure-analyzer]]
|
||||
=== Create your own FailureAnalyzer
|
||||
{dc-spring-boot}/diagnostics/FailureAnalyzer.{dc-ext}[[`FailureAnalyzer`] is a great way
|
||||
{dc-spring-boot}/diagnostics/FailureAnalyzer.{dc-ext}[`FailureAnalyzer`] is a great way
|
||||
to intercept an exception on startup and turn it into a human-readable message, wrapped
|
||||
into a {dc-spring-boot}/diagnostics/FailureAnalysis.{dc-ext}[[`FailureAnalysis`]. Spring
|
||||
into a {dc-spring-boot}/diagnostics/FailureAnalysis.{dc-ext}[`FailureAnalysis`]. Spring
|
||||
Boot provides such analyzer for application context related exceptions, JSR-303
|
||||
validations and more. It is actually very easy to create your own.
|
||||
|
||||
@@ -34,7 +34,7 @@ validations and more. It is actually very easy to create your own.
|
||||
presence of a specified exception type in the exception to handle. You can extend from
|
||||
that so that your implementation gets a chance to handle the exception only when it is
|
||||
actually present. If for whatever reason you can't handle the exception, return `null`
|
||||
to let another implementation a chance to handle the exception.
|
||||
to give another implementation a chance to handle the exception.
|
||||
|
||||
`FailureAnalyzer` implementations are to be registered in a `META-INF/spring.factories`:
|
||||
the following registers `ProjectConstraintViolationFailureAnalyzer`:
|
||||
@@ -2614,7 +2614,7 @@ then be depended upon by your application and other projects.
|
||||
If you cannot rearrange your code as recommended above, Spring Boot's Maven and Gradle
|
||||
plugins must be configured to produce a separate artifact that is suitable for use as a
|
||||
dependency. The executable archive cannot be used as a dependency as the
|
||||
<<appendix-executable-jar-format.adoc#executable-jar-jar-file-structure,exectuable jar
|
||||
<<appendix-executable-jar-format.adoc#executable-jar-jar-file-structure,executable jar
|
||||
format>> packages application classes in `BOOT-INF/classes`. This means
|
||||
that they cannot be found when the executable jar is used as a dependency.
|
||||
|
||||
|
||||
@@ -5210,7 +5210,7 @@ Data JPA tests may also inject a
|
||||
bean which provides an alternative to the standard JPA `EntityManager` specifically
|
||||
designed for tests. If you want to use `TestEntityManager` outside of `@DataJpaTests` you
|
||||
can also use the `@AutoConfigureTestEntityManager` annotation. A `JdbcTemplate` is also
|
||||
available should you need that.
|
||||
available if you need that.
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user