This demo-project is a web-based application designed as a cinema service model.
The application offers features such as user authentication, registration, and CRUD operations.
The service is constructed using Hibernate and Spring frameworks, adhering to fundamental REST and SOLID principles.
- Log in / authentication / authorization
- Add / get / get all movies
- Add / get / get all cinema halls
- Add / get / find available movie sessions
- Add a session / find by user / register & delete a shopping cart
- Complete order / get a history of orders
├───java │ └───cinema │ ├───config ---- Application configuration classes │ ├───controller ---- User request processing controllers │ ├───dao ---- The dao layer facilitates data management operations │ ├───dto ---- Database data transfer classes │ │ ├───request │ │ └───response │ ├───exception ---- Custom exception │ │ └───data processing │ ├───lib ---- Custom annotations │ │ ├───fields value match │ │ └───valid email │ ├───model ---- Project models │ │ ├───cinema hall │ │ ├───movie │ │ ├───movie session │ │ ├───order │ │ ├───role │ │ ├───shopping card │ │ ├───ticket │ │ └───user │ ├───service ---- The service layer encapsulates the business logic │ └───util ---- Date pattern manager └───resources
- JDK 17
- MAVEN 4.0.0
- MYSQL 8.0.32
- SPRING 5.3.20
- SPRING SECURITY 5.6.10
- HIBERNATE 5.6.14
- JAVA SERVLETS 4.0.1
- JACKSON CORE 2.14.1
- TOMCAT 9.0.50
- Java 17 or later
- Apache Tomcat 9 (version 9.0.50 is recommended)
- MySQL 8 or later
- Spring 5 or later
- Hibernate 5 or later
-
Clone this repository.
-
Open the project in your IDE and build it.
-
Open the db.properties file (/src/main/resources/db.properties) and change the information about database connection.
-
Configure Tomcat.
-
Launch and use.
- Register at Postman.
- You can test next role access to specific resources for
ADMIN
and forUSER
.
POST: /register - all
GET: /cinema-halls - user/admin
POST: /cinema-halls - admin
GET: /movies - user/admin
POST: /movies - admin
GET: /movie-sessions/available - user/admin
POST: /movie-sessions - admin
PUT: /movie-sessions/{id} - admin
DELETE: /movie-sessions/{id} - admin
GET: /orders - user
POST: /orders/complete - user
PUT: /shopping-carts/movie-sessions - user
GET: /shopping-carts/by-user - user
GET: /users/by-email - admin
...