Merge branch '3.1.x'
Closes gh-37830
This commit is contained in:
@@ -594,7 +594,7 @@ If that is not what you want, you can disable transaction management for a test
|
||||
|
||||
include::code:MyTransactionalTests[]
|
||||
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`.
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`.
|
||||
(See "<<features#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa>>".)
|
||||
|
||||
|
||||
@@ -612,7 +612,7 @@ By default, Data JDBC tests are transactional and roll back at the end of each t
|
||||
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
|
||||
If that is not what you want, you can disable transaction management for a test or for the whole test class as <<features#features.testing.spring-boot-applications.autoconfigured-jdbc,shown in the JDBC example>>.
|
||||
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`.
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`.
|
||||
(See "<<features#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa>>".)
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ If you prefer your test to run against a real database, you can use the `@AutoCo
|
||||
[[features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc]]
|
||||
==== Auto-configured Data R2DBC Tests
|
||||
`@DataR2dbcTest` is similar to `@DataJdbcTest` but is for tests that use Spring Data R2DBC repositories.
|
||||
By default, it configures an in-memory embedded database, a `R2dbcEntityTemplate`, and Spring Data R2DBC repositories.
|
||||
By default, it configures an in-memory embedded database, an `R2dbcEntityTemplate`, and Spring Data R2DBC repositories.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataR2dbcTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
@@ -628,7 +628,7 @@ TIP: A list of the auto-configurations that are enabled by `@DataR2dbcTest` can
|
||||
|
||||
By default, Data R2DBC tests are not transactional.
|
||||
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`.
|
||||
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`.
|
||||
(See "<<features#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa>>".)
|
||||
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ Most standard media types are supported out-of-the-box, but you can also define
|
||||
As of Spring Framework 5.3, Spring MVC supports two strategies for matching request paths to controllers.
|
||||
By default, Spring Boot uses the `PathPatternParser` strategy.
|
||||
`PathPatternParser` is an https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc[optimized implementation] but comes with some restrictions compared to the `AntPathMatcher` strategy.
|
||||
`PathPatternParser` restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants].
|
||||
`PathPatternParser` restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path pattern variants].
|
||||
It is also incompatible with configuring the `DispatcherServlet` with a path prefix (configprop:spring.mvc.servlet.path[]).
|
||||
|
||||
The strategy can be configured using the configprop:spring.mvc.pathmatch.matching-strategy[] configuration property, as shown in the following example:
|
||||
|
||||
Reference in New Issue
Block a user