This is a spring app that provides basic CRUD APIs for Todos with user creation and authentication APIs. Routes for the todo APIs are secured via JWT and must be supplied in the Authentication request header.
- User
- Create API - unsecured
- Authentication API - unsecured
- Todo CRUD Secured API for current logged in user
- Secured APIs routes via JWT
- H2 Database persistent to file
# Ensure docker has been installed
docker run -p 8080:8080 --name spring-todo-docker -t kevfan11/spring-todo-docker
or
git clone {repo}
cd spring-todo
./gradlew bootRun
Application would be then served on http://localhost:8080
./gradlew test jacocoTestReport
This would run the tests and generate a test code coverage report to build/reports/jacoco/test/html/index.html
./gradlew build docker
This would build a local docker image with the repository name kevfan11/spring-todo-docker
API.md for available APIs.
- Should use external database such MySql instead of H2 file
- Todo APIs can be expanded for showing history of Todo
- Allow sharing of Todo between users
- Spring Security for a REST API
- Retrieve User Information in Spring Security
- Encrypt User Password with Spring Security
- Spring Boot with Docker
Kevin Fan (KevFan)
16th June 2019