App to manage menu, orders and customers for a restaurant.
My first app using spring boot 3 and gradle.
I will use docker and docker-compose.
- Clone the repository
git clone yersonargote/restaurant && cd restaurant- Load env variables
source .envNote: The environment variables needed are in docker-compose.yml and application.yml.
- Build app
DOCKER_BUILDKIT=1 docker build -t yersonargote/restaurant . - Run app
docker-compose upShutdown the app do docker-compose down
Register user
POST request localhost:8080/api/v1/auth/register
Body request example:
{
"username": "test",
"password": "test"
}Login
POST request localhost:8080/api/v1/auth/login
Body request example:
{
"username": "test",
"password": "test"
}- Register user
- Login
- Oauth2 with GitHub
- Logout
- Redirect to page when login
- Create entities
- Relationships between entities
- Create repositories
- Create services
- Create controllers
- Native images with spring boot and gradle
Install plugin.
plugins {
id 'org.graalvm.buildtools.native' version '0.9.14'
}./gradlew nativeCompile- To run the app using only console
./gradlew bootRun- To compile a native image in a container
./gradlew bootBuildImage --imageName=yersonargote/restaurante- To compile app
./gradlew nativeCompile- To have AOT optimized app
./gradlew bootJarSpring Security, demystified by Daniel Garnier Moiroux