This is a simple REST service with authentication for ticket booking.
You can register and login. While authenticated you can use several user services. Also, there are specific controllers to manage data available only for admin.
User can complete order and add tickets to shopping cart. Admin can add new movies, movie sessions and cinema halls.
- Java 11
- Maven
- Hibernate
- Spring
- Spring Security
- Maven checkstyle plugin
- Lombok
-
Open the project in your IDE.
-
Add Java SDK 11 or above.
-
Configure Tomcat:
- add the artifact cinema-project:war;
- configure root URL to http://localhost:8080/
-
MySQL
- install MySQL server
- configure db.properties
- connect to MySQL server
- execute
CREATE SCHEMA `cinema` DEFAULT CHARACTER SET utf8"
-
Run the project.
-
For testing download Postman or analogue.
-
For authorization, you must add a new header, where Authorization is key and Basic email :password is value, where email:password must be encoded to Base64 format.
There are test data that you can use. There’s already registered USER and ADMIN:
email = "[email protected]", password = "1111"
email = "[email protected]", password = "2222"
You can change these test data in InjectDataController.