Online Movie Ticket Booking application which helps users to book desired movies and theaters with ease.
- General info
- Technologies
- [Sample Code](#sample code)
- Setup
- Features
- Status
- Contact
This project is an online movie ticket booking system in which users can book or cancel tickets. They can view movie and theatre details. The admin is able to add, delete and update movies and theatres.
- Technology: Java 1.8
- Database: MySQL
- Discovery Server: Eureka
- Framework: Spring Boot Application
- API gateway: Zuul server
- Registry: Eureka Server
-
To add a new Movie into the application: The API example is shown: @PostMapping(value="/add") public ResponseEntity addNewMovie(@RequestBody Movie movie) throws Exception{ try { String message= movieService.addNewMovie(movie); return new ResponseEntity(message,HttpStatus.ACCEPTED); }catch (Exception e) { String errorMessage=e.getLocalizedMessage(); return new ResponseEntity(errorMessage,HttpStatus.BAD_REQUEST); } }
-
The Service Implementation will be as follows: @Override public String addNewMovie(Movie movie) throws Exception { String message=movieDAO.addMovieToDB(movie); if(message!=null){ return message; } else throw new Exception("movie not added"); }
-
The DAO implementation will be as follows:
@Override public String addMovieToDB(Movie movie) { MovieEntity movieEntity= new MovieEntity(); movieEntity.setMovieName(movie.getMovieName()); movieEntity.setGenre(movie.getGenre()); movieEntity.setRating(movie.getRating()); movieRepository.save(movieEntity); return movieEntity.getMovieName()+" is added successfully"; }
List of features ready aare as follows:
- User can register with the application and can login with their registered emailid and password.
- Users can view various movies and theaters.Also they can book their tickets with desired number of seats and can cancel their booking.
- Admin can add/delete/update new movies, shows and theaters.
Project is in progress. The backend is completed.
Created by Aasish Sudarsanan(@aasish.sudarsanan).