Cinema service is a basic web application for online booking of cinema tickets.
In this pet-project, the client can register, log in, add movie-sessions
and movies, search for available sessions and buy tickets.
The project was created using the following technologies/principles:
Java 11, Spring Core, Spring Web, Spring Security, Hibernate, OOP, SOLID and REST
POST: /register
All roles:
GET:/cinema-halls - watch all cinema-halls
GET:/movie-sessions/available - watch all available movie sessions
GET:/movie-sessions / {id} - watch a certain movie session
GET:/logout - log out
Administration:
POST:/cinema-halls - add a new cinema-halls
POST:/movies - add a new movie
POST:/movie-sessions - add a movie session
PUT:/movie-sessions/{id} - update information about a movie session
DELETE:/movie-sessions/{id} - delete movie session
GET:/users/by-email - get a user by mail
User:
GET:/orders - get your orders
GET:/shopping-carts/by-user - get your shopping cart
POST:/orders/complete - complete the order
PUT: /shopping-carts/movie-sessions - add movie ticket to cart
- Java 11
- Hibernate
- Spring
- MySQL
- Apache Tomcat
To run this application please install:
Steps
- Fork this project and clone it.
- Create schema in your "MySQL Workbench"
- Add your personal info to db.properties to connect to your database.
- Add Tomcat 9.0.50 configuration.
- To sign in you can use default account: Admin: admin@gmail.com / 12345678 User: bob@gmail.com / 87654321
If you wanna connect this project to your database, just add all the necessary information in the:
src/main/resources
#MySQL properties
db.driver=YOUR_DRIVER
db.url=YOUR_DATABASE_URL
db.user=YOUR_USERNAME
db.password=YOUR_PASSWORD
#Hibernate properties
hibernate.show_sql=true
hibernate.hbm2ddl.auto=create
hibernate.dialect=org.hibernate.dialect.MySQL8Dialect