The sample App implements type safe SQL by JOOQ & DB version control by Flyway

Setup

  1. DB(PostgreSQL)

    $ docker compose up -d
  2. Migration

    $ ./gradlew flywayMigrate
  3. Build DSL

    $ ./gradlew generateJooq
  4. Insert record

    $ docker-compose run --rm postgres psql -h sample-postgres -U postgres
    INSERT INTO app_user (id) VALUES (uuid_in(md5(random()::text)::cstring));

Run App

  1. Start web app

    $ ./gradlew bootRun
  2. Request

    $ curl http://localhost:8080
    # id's value

GitHub

View Github