12-factor compliant Spring MVC Kotlin template. Features automatic request/response validation and interactive API doc
Spring 5 MVC template with Kotlin and OpenAPI 3.0. (Also Supports Swagger 2.0)
Features automatic request/response validation and interactive API doc
Features:
.env.template
to src/main/resources/.env
./gradlew build
./gradlew lintKotlin # see lint errors
./gradlew formatKotlin # attempt to automatically fix lint errors
./gradlew bootRun
./gradlew test
./gradlew jar
# Run the dist
java -jar ./build/libs/example-service-1.0.0.jar
Navigate to http://localhost:8080/api_explorer/index.html
curl -X POST "http://localhost:8080/users" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"me\":\"carmine\"}"
{
"error": " Object instance has properties which are not allowed by the schema: [\"me\"]",
"code": 400
}
Apache 2.0