Giter Club home page Giter Club logo

daggerok / mysql-r2dbc-spring-boot-2.7.x Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 76 KB

R2DBC Liquibase Spring Boot starter. This repository demonstrates Spring Boot custom starter for R2DBC Liquibase MySQL support

Kotlin 100.00%
liquibase liquibase-changelog liquibase-maven-mysql migration migration-tool migrations r2dbc r2dbc-mysql liquibase-r2dbc r2dbc-liquibase testcontainers testcontainers-r2dbc testcontainers-junit-5 testcontainers-junit-jupiter testcontainers-mysql

mysql-r2dbc-spring-boot-2.7.x's Introduction

R2DBC Liquibase Spring Boot 2.7.x MySQL CI

R2DBC Liquibase Spring Boot starter. This repository demonstrates Spring Boot R2DBC MySQL support

Table of content

Steps

Simple databaseClient use: SELECT 1 query with local mysql in docker. Check v0-simple-database-client-select-with-mysql-in-docker tag for details

Database migration using simple schema.sql and data.sql init scripts. Check v1-database-migrations-using-SqlInitializationProperties tag for details

More advanced database migration using custom R2DBC Liquibase migration tool Spring Boot starter. Check v2-database-migrations-using-custom-r2dbc-liquibase-spring-boot-starter tag for details

Use TestContainers to simplify development workflow. Check v3-add-test-containers-support tag for details

Getting started

Test:

/mvnw

Run for integration test:

if [[ "" != `docker ps -aq` ]] ; then docker rm -f -v `docker ps -aq` ; fi

docker run -d --rm --name mysql --platform=linux/x86_64 \
  --health-cmd='mysqladmin ping -h 127.0.0.1 -u $MYSQL_USER --password=$MYSQL_PASSWORD || exit 1' \
  --health-start-period=1s --health-retries=1111 --health-interval=1s --health-timeout=5s \
  -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=database \
  -e MYSQL_USER=user -e MYSQL_PASSWORD=password \
  -p 3306:3306 \
  mysql:8.0.24

while [[ $(docker ps -n 1 -q -f health=healthy -f status=running | wc -l) -lt 1 ]] ; do sleep 3 ; echo -n '.' ; done ; sleep 15; echo 'MySQL is ready.'

./mvnw clean compile spring-boot:run

docker stop mysql

mysql-r2dbc-spring-boot-2.7.x's People

Contributors

daggerok avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.