Skip to content

Commit d4e19f8

Browse files
committed
Auto-configure jOOQ after transaction auto-configuration
jOOQ auto-configuration will make use of a PlatformTransactionManager bean if available. This commit ensures that jOOQ is auto-configured after transaction auto-configuration, thereby ensuring that any auto-configuration PlatformTransactionManager bean can be consumed. Closes gh-11052
1 parent 1fc3750 commit d4e19f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jooq/JooqAutoConfiguration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@
3838
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3939
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
4040
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
41+
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
4142
import org.springframework.boot.context.properties.EnableConfigurationProperties;
4243
import org.springframework.context.annotation.Bean;
4344
import org.springframework.context.annotation.Configuration;
@@ -53,7 +54,8 @@
5354
@Configuration
5455
@ConditionalOnClass(DSLContext.class)
5556
@ConditionalOnBean(DataSource.class)
56-
@AutoConfigureAfter(DataSourceAutoConfiguration.class)
57+
@AutoConfigureAfter({ DataSourceAutoConfiguration.class,
58+
TransactionAutoConfiguration.class })
5759
public class JooqAutoConfiguration {
5860

5961
@Bean

0 commit comments

Comments
 (0)