This post will walk you through the steps of building a full stack TodoMVC web app and REST API service with Spring Boot, JPA/Hibernate, MySQL, FreeMarker, VueJS and Docker.
What you'll build
What you'll need
- Docker CE 18+
Define JPA Entity, Repository and Service
Define REST API and Controller
FreeMarker/HTML View Template
Run the application
Prepare Dockerfile for Java/Spring Boot application
Start your application and infrastructure via Docker Compose. Make sure your local Docker is running and your bash console is at the springboot-examples project root directory. JPA/Hibernate will construct MySQL database and table schema.
docker-compose -f docker-compose-fullstack.yaml up --renew-anon-volumes todomvc-mysql-vuejs
localhost:8080 to enjoy the web app.
And that's it! Thanks for joining and have a happy coding. You can find the full source code as below