Sample project with Kotlin, Spring Boot, JOOQ, Flyway, etc ...
- Java 8
- Docker
- Docker Compose
Develop
$ docker-compose up -d mysql
$ ./bin/run_locally.sh develop
Unit testing
$ docker-compose up -d mysql
$ ./bin/run_locally.sh test
Build and run JAR
$ docker-compose up -d mysql
$ ./bin/run_locally.sh build
$ ./bin/run_locally.sh jar
Develop
$ docker-compose up -d
Build
$ ./bin/build_on_docker.sh
$ curl http://localhost:8080/health
$ curl http://localhost:8080/tasks
$ curl http://localhost:8080/tasks/1
$ curl http://localhost:8080/tasks -X POST -H "Content-Type: application/json" -d '{"name": "MyTask", "assigneeUserId": 1}'
Migration by Flyway will be executed when Spring Boot is started or when the . /gradlew flywayMigrate
command executed.
Even when migrations are executed in parallel, they are locked properly.
See: Can multiple nodes migrate in parallel?
If you start with Profile local, you can get Swagger documentation at the following endpoints.
- JSON document ... http://localhost:8080/v2/api-docs
- Swagger UI ... http://localhost:8080/swagger-ui.html
A vulnerability assessment of dependent libraries is performed at build time.
The build is configured to fail if a CVSS 7.0 or higher vulnerability is found.
Automated API testing tool.