This application is a solution to a full stack implementation exercise. The goal of this exercise is to implement a simple web application that allows users to take notes, tag them, and filter them. This is just the backend, and features a simple CRUD REST API built with Spring Boot and Spring Data JPA. It uses a MySQL database which is set up using Docker.
- Docker installed on your machine
- Java 8 or higher
- Maven
- Postman (for testing the API endpoints)
-
Download or clone the source code from GitHub to a local machine.
-
Navigate to the project directory in your terminal.
-
Build the Docker image for the MySQL database:
docker build -t mysql_notes_db .
- Run the Docker container:
docker run -d --name mysql_notes_container -p 3306:3306 mysql_notes_db
- Start the Docker container:
docker start mysql_notes_container
- Install the project dependencies and build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
The application should now be running at http://localhost:50000.
A Postman collection is provided for testing the API endpoints. You can import this collection into your Postman application. If you're not familiar with how to do this, please refer to the Postman documentation.
The database schema is defined in the schema.sql
file. This script is automatically executed when the Docker container is started, setting up the database and populating it with some initial data.