- Java 1.8
- PostgreSQL/H2
- Gradle 5.2.1
# set environment in .env.local
source ./loadenv.sh
./gradlew :tw-wallet-webapp:bootRun
# Applie M1/M2 only for colima
colima start --runtime docker --vm-type=vz --vz-rosetta -m 4
make boot
install plugin "env file"
./gradlew clean
: cleanbuild
folder./gradlew build -x integTest
: build application./gradlew test
: run unit test./gradlew integTest
: run integration test./gradlew bootRun
: run application./gradlew flywayMigrate
: create table./gradlew flywayClean
: delete table./gradlew generateWalletJooqSchemaSource
: generate jooq
The default environment is test
.
flyway usage:
./gradlew -Penv=test flywayMigrate
or./gradlew flywayMigrate
: create table in h2 database in your home dir is likes~/tw_wallet.*
./gradlew -Penv=local flywayMigrate
: create table in postgre: create table in postgres
jooq usage:
./gradlew generateWalletJooqSchemaSource
: generate jooq source code for h2 database inbuild/genrated-sources/jooq/com/thoughtworks/wallet/gen
./gradlew -Penv=local generateWalletJooqSchemaSource
: generate jooq source code for postgres inbuild/genrated-sources/jooq/com/thoughtworks/wallet/gen
,env
can be local,dev,uat, etc.
- Install
PostgreSQL
at yourlocal
environment
docker pull postgres:12.2
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=tw-wallet-2020 -e POSTGRES_DB=tw_wallet -d postgres:12.2
./gradlew flywayMigrate
format: type: content eg: feat: add getUserInfo api type can be one of the following item:
- feat: new feature
- fix: fix the bug
- doc: about documentation
- style: just change the style
- refactor: refactor the code with no behavior changed
- chore: changes about utilization and tools, no business logic
- revert: revert the previous commit