|
|
|
|
@ -38,6 +38,7 @@ import org.jooq.TransactionListenerProvider;
@@ -38,6 +38,7 @@ import org.jooq.TransactionListenerProvider;
|
|
|
|
|
import org.jooq.TransactionalRunnable; |
|
|
|
|
import org.jooq.VisitListener; |
|
|
|
|
import org.jooq.VisitListenerProvider; |
|
|
|
|
import org.jooq.impl.DefaultExecuteListenerProvider; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigurations; |
|
|
|
|
@ -45,6 +46,7 @@ import org.springframework.boot.jdbc.DataSourceBuilder;
@@ -45,6 +46,7 @@ import org.springframework.boot.jdbc.DataSourceBuilder;
|
|
|
|
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner; |
|
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
import org.springframework.core.annotation.Order; |
|
|
|
|
import org.springframework.dao.DataIntegrityViolationException; |
|
|
|
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
|
|
|
|
import org.springframework.transaction.PlatformTransactionManager; |
|
|
|
|
@ -150,8 +152,13 @@ public class JooqAutoConfigurationTests {
@@ -150,8 +152,13 @@ public class JooqAutoConfigurationTests {
|
|
|
|
|
.isEqualTo(TestExecutorProvider.class); |
|
|
|
|
assertThat(dsl.configuration().recordListenerProviders().length) |
|
|
|
|
.isEqualTo(1); |
|
|
|
|
assertThat(dsl.configuration().executeListenerProviders().length) |
|
|
|
|
.isEqualTo(2); |
|
|
|
|
ExecuteListenerProvider[] executeListenerProviders = dsl |
|
|
|
|
.configuration().executeListenerProviders(); |
|
|
|
|
assertThat(executeListenerProviders.length).isEqualTo(2); |
|
|
|
|
assertThat(executeListenerProviders[0]) |
|
|
|
|
.isInstanceOf(DefaultExecuteListenerProvider.class); |
|
|
|
|
assertThat(executeListenerProviders[1]) |
|
|
|
|
.isInstanceOf(TestExecuteListenerProvider.class); |
|
|
|
|
assertThat(dsl.configuration().visitListenerProviders().length) |
|
|
|
|
.isEqualTo(1); |
|
|
|
|
assertThat(dsl.configuration().transactionListenerProviders().length) |
|
|
|
|
@ -260,6 +267,7 @@ public class JooqAutoConfigurationTests {
@@ -260,6 +267,7 @@ public class JooqAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Order(100) |
|
|
|
|
protected static class TestExecuteListenerProvider |
|
|
|
|
implements ExecuteListenerProvider { |
|
|
|
|
|
|
|
|
|
|