Skip to content

Commit 99de256

Browse files
snicollwilkinsona
authored andcommitted
Create spring-boot-jooq module
1 parent 23a9486 commit 99de256

File tree

35 files changed

+80
-46
lines changed

35 files changed

+80
-46
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ include "spring-boot-project:spring-boot-jackson"
6363
include "spring-boot-project:spring-boot-jdbc"
6464
include "spring-boot-project:spring-boot-jetty"
6565
include "spring-boot-project:spring-boot-jms"
66+
include "spring-boot-project:spring-boot-jooq"
6667
include "spring-boot-project:spring-boot-jpa"
6768
include "spring-boot-project:spring-boot-jsonb"
6869
include "spring-boot-project:spring-boot-kafka"
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# Environment Post Processors
22
org.springframework.boot.env.EnvironmentPostProcessor=\
33
org.springframework.boot.reactor.ReactorEnvironmentPostProcessor
4-
5-
# Depends On Database Initialization Detectors
6-
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
7-
org.springframework.boot.jooq.JooqDependsOnDatabaseInitializationDetector

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ org.springframework.boot.autoconfigure.http.MessageConverterBackgroundPreinitial
44

55
# Failure Analyzers
66
org.springframework.boot.diagnostics.FailureAnalyzer=\
7-
org.springframework.boot.autoconfigure.data.redis.RedisUrlSyntaxFailureAnalyzer,\
8-
org.springframework.boot.autoconfigure.jooq.JaxbNotAvailableExceptionFailureAnalyzer,\
9-
org.springframework.boot.autoconfigure.jooq.NoDslContextBeanFailureAnalyzer
7+
org.springframework.boot.autoconfigure.data.redis.RedisUrlSyntaxFailureAnalyzer
108

119
# Template Availability Providers
1210
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfigurati
4949
org.springframework.boot.autoconfigure.http.client.HttpClientAutoConfiguration
5050
org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration
5151
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration
52-
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
5352
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
5453
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration
5554
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,7 @@ bom {
20092009
"spring-boot-jdbc",
20102010
"spring-boot-jetty",
20112011
"spring-boot-jms",
2012+
"spring-boot-jooq",
20122013
"spring-boot-jpa",
20132014
"spring-boot-jsonb",
20142015
"spring-boot-kafka",

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ dependencies {
7171
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "autoConfigurationMetadata"))
7272
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata"))
7373
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jms", configuration: "autoConfigurationMetadata"))
74+
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jooq", configuration: "autoConfigurationMetadata"))
7475
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jpa", configuration: "autoConfigurationMetadata"))
7576
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jsonb", configuration: "autoConfigurationMetadata"))
7677
autoConfiguration(project(path: ":spring-boot-project:spring-boot-kafka", configuration: "autoConfigurationMetadata"))
@@ -105,6 +106,7 @@ dependencies {
105106
configurationProperties(project(path: ":spring-boot-project:spring-boot-integration", configuration: "configurationPropertiesMetadata"))
106107
configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata"))
107108
configurationProperties(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "configurationPropertiesMetadata"))
109+
configurationProperties(project(path: ":spring-boot-project:spring-boot-jooq", configuration: "configurationPropertiesMetadata"))
108110
configurationProperties(project(path: ":spring-boot-project:spring-boot-jpa", configuration: "configurationPropertiesMetadata"))
109111
configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata"))
110112
configurationProperties(project(path: ":spring-boot-project:spring-boot-jms", configuration: "configurationPropertiesMetadata"))

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-access.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,4 +403,4 @@ include-code::ElasticsearchEntityManagerFactoryDependsOnPostProcessor[]
403403
If you need to use jOOQ with multiple data sources, you should create your own javadoc:org.jooq.DSLContext[] for each one.
404404
See {code-spring-boot-autoconfigure-src}/jooq/JooqAutoConfiguration.java[`JooqAutoConfiguration`] for more details.
405405

406-
TIP: In particular, javadoc:org.springframework.boot.autoconfigure.jooq.ExceptionTranslatorExecuteListener[] and javadoc:org.springframework.boot.autoconfigure.jooq.SpringTransactionProvider[] can be reused to provide similar features to what the auto-configuration does with a single javadoc:javax.sql.DataSource[].
406+
TIP: In particular, javadoc:org.springframework.boot.jooq.autoconfigure.ExceptionTranslatorExecuteListener[] and javadoc:org.springframework.boot.jooq.autoconfigure.SpringTransactionProvider[] can be reused to provide similar features to what the auto-configuration does with a single javadoc:javax.sql.DataSource[].

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ NOTE: Spring Boot can only auto-configure dialects supported by the open source
457457
[[data.sql.jooq.customizing]]
458458
=== Customizing jOOQ
459459

460-
More advanced customizations can be achieved by defining your own javadoc:org.springframework.boot.autoconfigure.jooq.DefaultConfigurationCustomizer[] bean that will be invoked prior to creating the javadoc:org.jooq.Configuration[] javadoc:org.springframework.context.annotation.Bean[format=annotation].
460+
More advanced customizations can be achieved by defining your own javadoc:org.springframework.boot.jooq.autoconfigure.DefaultConfigurationCustomizer[] bean that will be invoked prior to creating the javadoc:org.jooq.Configuration[] javadoc:org.springframework.context.annotation.Bean[format=annotation].
461461
This takes precedence to anything that is applied by the auto-configuration.
462462

463463
You can also create your own javadoc:org.jooq.Configuration[] javadoc:org.springframework.context.annotation.Bean[format=annotation] if you want to take complete control of the jOOQ configuration.

spring-boot-project/spring-boot-flyway/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ dependencies {
1818
optional("org.flywaydb:flyway-database-postgresql")
1919
optional("org.flywaydb:flyway-sqlserver")
2020

21+
testImplementation(project(":spring-boot-project:spring-boot-jooq"))
2122
testImplementation(project(":spring-boot-project:spring-boot-test"))
2223
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
2324
testImplementation("jakarta.persistence:jakarta.persistence-api")
2425
testImplementation("org.hibernate.orm:hibernate-core")
2526
testImplementation("org.hsqldb:hsqldb")
26-
testImplementation("org.jooq:jooq") {
27-
exclude group: "javax.xml.bind", module: "jaxb-api"
28-
}
2927
testImplementation("org.postgresql:postgresql")
3028
testImplementation("org.springframework:spring-orm")
3129

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot jOOQ"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-jdbc"))
13+
api(project(":spring-boot-project:spring-boot-tx"))
14+
api("org.jooq:jooq")
15+
16+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
17+
optional(project(":spring-boot-project:spring-boot-r2dbc"))
18+
optional("jakarta.xml.bind:jakarta.xml.bind-api")
19+
20+
testImplementation(project(":spring-boot-project:spring-boot-test"))
21+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
22+
23+
testRuntimeOnly("ch.qos.logback:logback-classic")
24+
testRuntimeOnly("com.h2database:h2")
25+
testRuntimeOnly("com.zaxxer:HikariCP")
26+
testRuntimeOnly("io.r2dbc:r2dbc-h2")
27+
testRuntimeOnly("org.glassfish.jaxb:jaxb-runtime")
28+
testRuntimeOnly("org.hsqldb:hsqldb")
29+
}

0 commit comments

Comments
 (0)