This is a fast-food application.
Spring(boot) takes care of everything on the back end | server side.
Before going further, please make sure you are processing the repositories in order as follow :
1. git clone https://github.com/Evengelius/spring_fastfood.git your_desired_name
2. // Change the Project SDK version to 14 | Intellij
File | Project Structure | Project Settings: Project | Project SDK : 14
3. // application.properties
#Database Connection
spring.datasource.url= jdbc:mysql://localhost:3306/fastfood?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
spring.datasource.username=yourUsername
spring.datasource.password=yourPassword
4. Test it | Postman.
CRUD - Create | Read | Update | Delete
CRUD operations on tables :
- Commande
- Burger
- Boisson
- Serveur
- This table manages the admin users.
You need to be logged in as an admin in order to access the admin panel and perform admin tasks : angular side.
- This table manages the admin users.
Exception handling
Errors on the server side are handled by various exceptions returning an HTTP status: 400 - 500 - 404.
Authentication management | Spring Security
Implementation of the JSON Web Token | JWT.
Data mapping management
Implementation of the Data Transfer Object or DTO, with MapStruct.
You need to be authenticated in order to use these endpoints.
Also, here the example stands for commands.
It can replaced by : drinks, burgers, or users.
Finally, in order to use these endpoints, you need to be authenticated.
GET
/api/commands
/api/commands/{id}
POST
/api/commands
PUT
/api/commands/{id}
DELETE
/api/commands/{id}
-----------------------------
Authentication | JWT
POST
/api/users/register
POST
/api/users/login
Once logged in, it generates a JWT, that you need to put in, Authorization | Type : Bearer Token, in order to access the page that requires an authentication.
Registration
Hibernate | Query
Login | JWT generated
Authenticated | Show Endpoint