This is an example for using JWT (JSON Web Token) and Mysql with Spring Security and Spring Boot 2.7.5.
- Install Docker
- Run
docker compose up
* Java 11
* Maven 3
* Mysql 8.0.26
1- Install Mysql
2- CREATE DATABASE tasks_app;
3- Change mysql user and password from application.properties
4- start the application with the Spring Boot maven plugin (mvn spring-boot:run).
Use postman to test the api
SignUp: POST /api/1.0/users | { username, email, password }
LogIn: POST /api/1.0/auth | { email, password }
FindAllUsers: GET /api/1.0/users
FindUserById: GET /api/1.0/users/{id}
DeleteUser: DELETE /api/1.0/users/{id}
UpdateUSer: PUT /api/1.0/users/{id} | { username, email, password }