The project was generated from https://start.spring.io/
How to
-
build and run the project with Gradle
-
call
localhost:8080/api/userson the browser, the page will redirect to login form -
use username and password below to access the api username:
userpassword:userX -
to call the API via
curlorPostman, please use Basic Auth with the same user & pass
---- Build & Run on docker ----
-
go to directory that contains 'Dockerfile' then build a docker container using command below
docker build -t triplesic/springboot-kotlin-boilerplate . -
create new container instant using command below
run on ubuntu cloud host
docker run -d --net="host" -p 8080:8080 -v <YOUR_CONFIG_PATH>:/config --name springboot-kotlin-01 triplesic/springboot-kotlin-boilerplate
run on mac localhost
docker run -d -p 8080:8080 -v <YOUR_CONFIG_PATH>:/config --name springboot-kotlin-01 triplesic/springboot-kotlin-boilerplate
- please change "<YOUR_CONFIG_PATH>" to the real application.properties path
-- remark -- when you call other 'localhost' api(s) via docker on Mac you have change 'localhost' to 'docker.for.mac.localhost'
such as MySql url jdbc:mysql://localhost/factory you have to change to jdbc:mysql://docker.for.mac.localhost/factory