A simple web-application that supports authentication, registration and basic features of the ticket
reservation service, based on Hibernate and Spring frameworks using REST common principles.
- register and log in as a user/administrator;
- find movies and cinema halls
- find available movie sessions
- create shopping cart
- add tickets to shopping cart
- view shopping cart
- make an order
- view order history
- create and find movies and cinema halls
- create and find available movie sessions
- find user by email
The project has a Three-Tier Architecture:
- Presentation layer (Controllers) - accepts requests from clients and sends results back to them.
- Application logic layer (Service), provide logic to operate on the data sent to and from the DAO and the client.
- Data access layer (DAO), represents a bridge between the database and the application.
- Entities represent columns in the database;
- DTOs represent communication between Presentation and Service layers;
- DTO mappers convert DTOs to entities and vice versa
- BCryptPasswordEncoder is used for password encryption
- Hibernate annotations are used for field validation
- Custom annotations are used for email and password validation
- Jackson API is responsible for converting objects to JSON
- Config package contains classes allow to configure Spring and Hibernate
- Security package contains class, allows to create UserDetails which store user information;
- Clone the repo;
- Install MySQL;
- Create new schema in database;
- Add you DB properties to db.properties file;
- Configure Apache Tomcat version 9.0.50 Artifact:
war-exploded artifact
, Application context:"/"
; - Create connection to DB using Database option (Intellij Idea Ultimate).
- If you haven't Database option, create ConnectionUtil class and connect to DB manually: Connection Util;
- Done. Now just run it.
- You can log in both as USER or ADMIN:
ADMIN: username: [email protected], password: admin123
USER: username: [email protected], password: user123
- Use Postman to send some http requests;