{"id":15002855,"url":"https://github.com/daggerok/liquibase-r2dbc-spring-boot-starter","last_synced_at":"2025-10-26T20:02:23.659Z","repository":{"id":36993352,"uuid":"499306445","full_name":"daggerok/liquibase-r2dbc-spring-boot-starter","owner":"daggerok","description":"This repository demonstrates how 2 implement Liquibase R2DBC Spring Boot starter. Stack: Liquibase R2DBC Spring Boot starter with next technology stack: Liquibase, R2DBC, Spring Boot, Kotlin, Junit Jupiter 5, MySQL, MariaDB, PostgreSQL, MS SQL Server, H2, r2dbc-pool, r2dbc-proxy, Test-containers, Maven, Bash","archived":false,"fork":false,"pushed_at":"2023-09-11T05:26:46.000Z","size":528,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T07:51:12.443Z","etag":null,"topics":["frontend-maven-plugin","github-actions","junit-jupiter","kotlin","liquibase","mariadb","maven","maven-gpg-plugin","maven-resources-plugin","mssql","mssqlserver","mysql","nexus-staging-maven-plugin","ossrh","r2dbc-pool","r2dbc-proxy","sonatype","spring-data-r2dbc","testcontainers","vuepress"],"latest_commit_sha":null,"homepage":"https://daggerok.github.io/liquibase-r2dbc-spring-boot-starter/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-02T22:17:32.000Z","updated_at":"2025-01-02T06:58:21.000Z","dependencies_parsed_at":"2024-10-12T07:20:48.802Z","dependency_job_id":null,"html_url":"https://github.com/daggerok/liquibase-r2dbc-spring-boot-starter","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fliquibase-r2dbc-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fliquibase-r2dbc-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fliquibase-r2dbc-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fliquibase-r2dbc-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/liquibase-r2dbc-spring-boot-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238950485,"owners_count":19557533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend-maven-plugin","github-actions","junit-jupiter","kotlin","liquibase","mariadb","maven","maven-gpg-plugin","maven-resources-plugin","mssql","mssqlserver","mysql","nexus-staging-maven-plugin","ossrh","r2dbc-pool","r2dbc-proxy","sonatype","spring-data-r2dbc","testcontainers","vuepress"],"created_at":"2024-09-24T18:53:15.834Z","updated_at":"2025-10-26T20:02:23.608Z","avatar_url":"https://github.com/daggerok.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Liquibase R2DBC spring-boot starter [![tests](https://github.com/daggerok/liquibase-r2dbc-spring-boot-starter/actions/workflows/tests.yml/badge.svg)](https://github.com/daggerok/liquibase-r2dbc-spring-boot-starter/actions/workflows/tests.yml) [![pages](https://github.com/daggerok/liquibase-r2dbc-spring-boot-starter/actions/workflows/pages.yaml/badge.svg)](https://daggerok.github.io/liquibase-r2dbc-spring-boot-starter/)\nThis repository demonstrates how 2 implement Liquibase R2DBC Spring Boot starter to be used in reactive projects with MySQL, MariaDB,\nPostgreSQL, MS SQL Server, r2dbc-pool, r2dbc-proxy or H2 database. It's not pure reactive liquibase implementation as you might think, we\nare simply transforming R2DBC URL into liquibase compatible in a little spring-boot starter to apply liquibase migrations update\nautomatically within application runner bean\n\n## Support\nJava 17, 18, 19, 20 with Spring Boot 3.x\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.daggerok/liquibase-r2dbc-spring-boot-starter.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.daggerok%22%20AND%20a:%22liquibase-r2dbc-spring-boot-starter%22)\n\n### Getting started\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.daggerok\u003c/groupId\u003e\n  \u003cartifactId\u003eliquibase-r2dbc-spring-boot-starter\u003c/artifactId\u003e\n  \u003cversion\u003e3.1.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor\n\n```kotlin\ndependency(\"io.github.daggerok:liquibase-r2dbc-spring-boot-starter:3.1.3\")\n```\n\nAnd then use regular Spring Boot + Liquibase setup:\n\n* Create necessary Liquibase migration `src/main/resources/liquibase/master-changelog.xml` file\n* In `application.yaml` file add necessary liquibase configuration:\n  ```yaml\n  spring:\n    r2dbc:\n      url: 'r2dbc:mysql://127.0.0.1:3306/database'\n      username: 'user'\n      password: 'password'\n    liquibase:\n      change-log: classpath*:/liquibase/changelog-master.xml\n  logging:\n    level:\n      io.netty.resolver.dns.DnsServerAddressStreamProviders: off\n  ```\n* In `pom.xml` add necessary dependencies related to database going to be used:\n  * MySQL:\n    ```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.mysql\u003c/groupId\u003e\n            \u003cartifactId\u003emysql-connector-j\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003edev.miku\u003c/groupId\u003e\n            \u003cartifactId\u003er2dbc-mysql\u003c/artifactId\u003e\n            \u003cversion\u003e0.8.2.RELEASE\u003c/version\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n    ```\n  * MariaDB:\n    ```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.mariadb.jdbc\u003c/groupId\u003e\n            \u003cartifactId\u003emariadb-java-client\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.mariadb\u003c/groupId\u003e\n            \u003cartifactId\u003er2dbc-mariadb\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.r2dbc\u003c/groupId\u003e\n            \u003cartifactId\u003er2dbc-pool\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n    ```\n  * PostgreSQL:\n    ```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.postgresql\u003c/groupId\u003e\n            \u003cartifactId\u003epostgresql\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.postgresql\u003c/groupId\u003e\n            \u003cartifactId\u003er2dbc-postgresql\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n    ```\n  * H2:\n    ```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.h2database\u003c/groupId\u003e\n            \u003cartifactId\u003eh2\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.r2dbc\u003c/groupId\u003e\n            \u003cartifactId\u003er2dbc-h2\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n    ```\n\nNOTE: If you want to use `*-SNAPSHOT` version, please make sure you have added snapshot maven repository like so\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003esonatype-nexus-snapshots\u003c/id\u003e\n        \u003cname\u003eSonatype OSS Snapshot Repository\u003c/name\u003e\n        \u003curl\u003ehttps://s01.oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n        \u003csnapshots\u003e\u003cenabled\u003etrue\u003c/enabled\u003e\u003c/snapshots\u003e\n        \u003creleases\u003e\u003cenabled\u003efalse\u003c/enabled\u003e\u003c/releases\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nor\n\n```kotlin\nrepositories {\n    maven {\n        url = uri(\"https://s01.oss.sonatype.org/content/repositories/snapshots\")\n    }\n}\n```\n\nSee: https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/daggerok/\n\nOtherwise, use only released version. See: https://repo1.maven.org/maven2/io/github/daggerok/liquibase-r2dbc-spring-boot-starter/\n\n### Technology Stack\n\n* Liquibase\n* R2DBC\n* Spring Boot 3.x\n* Kotlin\n* Junit Jupiter 5\n* H2 (file, mem)\n* MySQL\n* MariaDB\n* Postgresql\n* MS SQL Server\n* R2DBC (pool, proxy)\n* Testcontainers\n* Maven\n\n\u003c!--\n\n### TODO: Future plans\n\n#### TODO: Add more database support\n\nTODO: Implement HyperSQL (HSQL) database example\n\n#### TODO: Implement @WithLiquibaseR2DBC annotation\n\nTODO: Implement `@WithLiquibaseR2DBC` annotation and `WithLiquibaseR2dbcListener` so they can be used,\nfor example during testing to execute different liquibase migrations separatelly.\n\nClass-level annotation usage:\n\n```kotlin\npackage my.company\n\n/**\n * This `@WithLiquibaseR2DBC` annotation by default should ask `WithLiquibaseR2dbcListener`\n * to pick and execute class and methods related migrations if they are exists:\n *\n * - classpath:/my/company/UsersRepositoryTests.xml\n * - classpath:/my/company/UsersRepositoryTests.shouldTestUsers.xml\n * - classpath:/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n *\n * NOTE: migrations are related to class package, name and class method names\n *\n * ie next files:\n *\n * - src/main/kotlin/my/company/UsersRepositoryTests.xml\n * - src/main/resources/my/company/UsersRepositoryTests.xml\n * - src/test/kotlin/my/company/UsersRepositoryTests.xml\n * - src/test/resources/my/company/UsersRepositoryTests.xml\n *\n * - src/main/kotlin/my/company/UsersRepositoryTests.shouldTestUsers.xml\n * - src/main/resources/my/company/UsersRepositoryTests.shouldTestUsers.xml\n * - src/test/kotlin/my/company/UsersRepositoryTests.shouldTestUsers.xml\n * - src/test/resources/my/company/UsersRepositoryTests.shouldTestUsers.xml\n *\n * - src/main/kotlin/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n * - src/main/resources/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n * - src/test/kotlin/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n * - src/test/resources/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n *\n * Or in this case only specified migrations should be executed by `WithLiquibaseR2dbcListener`\n * before that test classes, for example these two:\n *\n * ```kotlin\n * @WithLiquibaseR2DBC(\"classpath:/users-test-liquibase.xml\", \"classpath:/user-messages-test-liquibase.xml\")\n * ```\n*/\n@SpringBootTest\n@WithLiquibaseR2DBC\nclass UsersRepositoryTests(@Autowired val userRepository: UserRepository) {\n\n    @Test\n    fun shouldTestUsers() {\n        // ...\n    }\n\n    @Test\n    fun shouldTestUserMessages() {\n        // ...\n    }\n}\n```\n\nMethod-level annotation usage:\n\n```kotlin\npackage my.company\n\n@SpringBootTest\nclass UsersRepositoryTests(@Autowired val userRepository: UserRepository) {\n\n    /**\n     * This `@WithLiquibaseR2DBC` annotation should ask `WithLiquibaseR2dbcListener`\n     * to appliy specified `classpath:/users-test-liquibase.xml` migration, ie:\n     *\n     * - src/main/kotlin/users-test-liquibase.xml\n     * - src/main/resources/users-test-liquibase.xml\n     * - src/test/kotlin/users-test-liquibase.xml\n     * - src/test/resources/users-test-liquibase.xml\n     */\n    @Test\n    @WithLiquibaseR2DBC(\"classpath:/users-test-liquibase.xml\")\n    fun `should test users`() {\n        // ...\n    }\n\n    /**\n     * In this case with `@WithLiquibaseR2DBC` annotation by default `WithLiquibaseR2dbcListener`\n     * should try to execute next migrations:\n     *\n     * - classpath:/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n     *\n     * ie, next files:\n     *\n     * - src/main/kotlin/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n     * - src/main/resources/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n     * - src/test/kotlin/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n     * - src/test/resources/my/company/UsersRepositoryTests.shouldTestUserMessages.xml\n     */\n    @Test\n    @WithLiquibaseR2DBC\n    fun shouldTestUserMessages() {\n        // ...\n    }\n}\n```\n\n--\u003e\n\n### Reference documentation\n\n* Checkout [documentation](https://daggerok.github.io/liquibase-r2dbc-spring-boot-starter/) for details\n* ALso check [developer guide for contributors](docs/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fliquibase-r2dbc-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fliquibase-r2dbc-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fliquibase-r2dbc-spring-boot-starter/lists"}