Browse Source

Polishing

pull/30534/merge
Sam Brannen 1 year ago
parent
commit
6c3a3dc7d9
  1. 2
      framework-docs/modules/ROOT/pages/testing/testcontext-framework/executing-sql.adoc
  2. 9
      spring-test/src/main/java/org/springframework/test/context/jdbc/Sql.java

2
framework-docs/modules/ROOT/pages/testing/testcontext-framework/executing-sql.adoc

@ -387,7 +387,7 @@ individual attributes in {api-spring-framework}/test/context/jdbc/Sql.html[`@Sql @@ -387,7 +387,7 @@ individual attributes in {api-spring-framework}/test/context/jdbc/Sql.html[`@Sql
{api-spring-framework}/test/context/jdbc/SqlConfig.html[`@SqlConfig`] for details.
[[testcontext-executing-sql-declaratively-tx]]
*Transaction management for `@Sql`*
==== Transaction management for `@Sql`
By default, the `SqlScriptsTestExecutionListener` infers the desired transaction
semantics for scripts configured by using `@Sql`. Specifically, SQL scripts are run

9
spring-test/src/main/java/org/springframework/test/context/jdbc/Sql.java

@ -55,13 +55,10 @@ import org.springframework.core.annotation.AliasFor; @@ -55,13 +55,10 @@ import org.springframework.core.annotation.AliasFor;
* annotation. Otherwise, {@link SqlGroup @SqlGroup} can be used as an explicit
* container for declaring multiple instances of {@code @Sql}.
*
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em> with attribute overrides.
*
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
* enclosing test class by default. See
* <p>This annotation will be inherited from an enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details.
* for details. This annotation may also be used as a <em>meta-annotation</em> to
* create custom <em>composed annotations</em> with attribute overrides.
*
* <p>Use of this annotation requires the {@code spring-jdbc} and {@code spring-tx}
* modules as well as their transitive dependencies to be present on the classpath.

Loading…
Cancel
Save