搜索

PythonReactSEOPDF
GitHub Skill

database-integration

Database integration patterns for Java services using jOOQ and Flyway. Covers code generation, read/write splitting, migration guidelines, and version compatibility. Use when setting up or maintaining PostgreSQL integration.

bitsoex☆ 35 仓库 Stars30 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Database Integration

Database integration patterns for Java services using jOOQ and Flyway.

When to use this skill

  • Setting up jOOQ code generation
  • Creating Flyway migrations
  • Configuring read/write database splitting
  • Resolving jOOQ version conflicts
  • Reviewing SQL migration safety

Skill Contents

Sections
Available Resources

📚 references/ - Detailed documentation


Quick Start

1. Add Dependencies
# gradle/libs.versions.toml
[versions]
postgresql = "42.7.8"
testcontainers = "1.21.4"
jooq = "3.19.28"  # Spring Boot 3.5.x BOM version
flyway = "11.7.2"

[libraries]
jooq = { module = "org.jooq:jooq", version.ref = "jooq" }
jooq-codegen = { module = "org.jooq:jooq-codegen", version.ref = "jooq" }
jooq-meta = { module = "org.jooq:jooq-meta", version.ref = "jooq" }

[plugins]
flyway = { id = "org.flywaydb.flyway", version.ref = "flyway" }
jooq = { id = "nu.studer.jooq", version = "9.0" }
2. Apply jOOQ Configuration
// build.gradle
plugins {
    alias(libs.plugins.flyway)
    alias(libs.plugins.jooq)
}

apply from: "${project.rootDir}/gradle/jooq-config.gradle"

dependencies {
    implementation libs.jooq
    jooqGenerator libs.testcontainers.postgres,
            libs.postgres,
            libs.flyway.database.postgresql
}
3. Generate Code
./gradlew generateJooq

Version Compatibility

Java 21 (Gradle 8.x)
Component Version
jOOQ 3.19.28
jOOQ Plugin 9.0
Flyway 11.7.2
PostgreSQL Driver 42.7.8
Java 25 (Gradle 9.x)
Component Version
jOOQ 3.20.10
jOOQ Plugin 10.1.1
Flyway 11.19.0
PostgreSQL Driver 42.7.8

References

Reference Description
references/jooq.md jOOQ setup, code generation, read/write splitting
references/flyway.md Migration guidelines, locking, best practices

Related Rules

  • .cursor/rules/java-jooq.mdc - Full jOOQ reference
  • .cursor/rules/java-flyway-migrations.mdc - Flyway guidelines

Related Skills

Skill Purpose
gradle-standards Gradle configuration
java-testing Testing database code

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-28
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!