This project demonstrates the implementation of security using Spring Boot 3.0 and JSON Web Tokens (JWT). It includes the following features:
- User registration and login with JWT authentication
- Password encryption using BCrypt
- Customized access denied handling
To get started with this project, you will need to have the following installed on your local machine:
- JDK 17+
- Docker
- docker compose
To build and run the project, follow these steps:
- Clone the repository:
git clone https://github.com/lemuel-sousa/good-api.git
- Navigate to the project directory:
cd good-api
- Database
- Up postgres service with docker compose:
cd docker
afterdocker-compose up -d
- Or add database "good_api" to postgres
- Up postgres service with docker compose:
- Build the project:
./gradlew clean bootjar
- Run the project:
java -jar app/build/libs/app.jar
-> The application will be available at http://localhost:8000.