Skip to content

Latest commit

 

History

History
89 lines (56 loc) · 1.9 KB

README.md

File metadata and controls

89 lines (56 loc) · 1.9 KB

kotlin-spring-jooq-flyway

CircleCI

MIT License

Sample project with Kotlin, Spring Boot, JOOQ, Flyway, etc ...

Dependencies

  • Java 8
  • Docker
  • Docker Compose

How to run

Develop with local JDK and MySQL on container

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 with JDK on container and MySQL on container

Develop

$ docker-compose up -d

Build

$ ./bin/build_on_docker.sh

How to call Web API

$ 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}'

About the tools used in this repository

Flyway

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?

SpringFox

If you start with Profile local, you can get Swagger documentation at the following endpoints.

OWASP Dependency Check

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.

Tevern

Automated API testing tool.