Skip to content

Commit

Permalink
Polish "Use ExecutorProvider bean if available when auto-configuring …
Browse files Browse the repository at this point in the history
…jOOQ"

Closes gh-14471
  • Loading branch information
wilkinsona committed Sep 17, 2018
1 parent 620419f commit a1d1a73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.jooq.impl.DefaultConfiguration;
import org.jooq.impl.DefaultDSLContext;
import org.jooq.impl.DefaultExecuteListenerProvider;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

package org.springframework.boot.autoconfigure.jooq;

import javax.sql.DataSource;
import java.util.concurrent.Executor;

import javax.sql.DataSource;

import org.jooq.DSLContext;
import org.jooq.ExecuteListener;
import org.jooq.ExecuteListenerProvider;
Expand Down Expand Up @@ -143,7 +144,8 @@ public void customProvidersArePickedUp() {
TxManagerConfiguration.class, TestRecordMapperProvider.class,
TestRecordUnmapperProvider.class, TestRecordListenerProvider.class,
TestExecuteListenerProvider.class, TestVisitListenerProvider.class,
TestTransactionListenerProvider.class, TestExecutorProvider.class).run((context) -> {
TestTransactionListenerProvider.class, TestExecutorProvider.class)
.run((context) -> {
DSLContext dsl = context.getBean(DSLContext.class);
assertThat(dsl.configuration().recordMapperProvider().getClass())
.isEqualTo(TestRecordMapperProvider.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3966,6 +3966,7 @@ which is used when the jOOQ `Configuration` is created. You can define beans for
following jOOQ Types:

* `ConnectionProvider`
* `ExecutorProvider`
* `TransactionProvider`
* `RecordMapperProvider`
* `RecordUnmapperProvider`
Expand Down

0 comments on commit a1d1a73

Please sign in to comment.