Skip to content

Commit 7674c55

Browse files
TheHoundscottfrederick
authored andcommitted
Align spring.flyway.execute-in-transaction property with Flyway default
See gh-35447
1 parent a2b32cd commit 7674c55

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public class FlywayProperties {
365365
/**
366366
* Whether Flyway should execute SQL within a transaction.
367367
*/
368-
private boolean executeInTransaction;
368+
private boolean executeInTransaction = true;
369369

370370
public boolean isEnabled() {
371371
return this.enabled;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void defaultValuesAreConsistent() {
9292
assertThat(properties.getPlaceholderSeparator()).isEqualTo(configuration.getPlaceholderSeparator());
9393
assertThat(properties.getScriptPlaceholderPrefix()).isEqualTo(configuration.getScriptPlaceholderPrefix());
9494
assertThat(properties.getScriptPlaceholderSuffix()).isEqualTo(configuration.getScriptPlaceholderSuffix());
95+
assertThat(properties.isExecuteInTransaction()).isEqualTo(configuration.isExecuteInTransaction());
9596
}
9697

9798
@Test

0 commit comments

Comments
 (0)