The sample App implements type safe SQL by JOOQ & DB version control by Flyway
Setup
-
DB(PostgreSQL)
$ docker compose up -d
-
Migration
$ ./gradlew flywayMigrate
-
Build DSL
$ ./gradlew generateJooq
-
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
-
Start web app
$ ./gradlew bootRun
-
Request
$ curl http://localhost:8080 # id's value