Skip to content

Volodymyr-Mykychak/jv-spring-rest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring REST

Let's start to tune our Hibernate project with Spring.

Create controllers:

  • CinemaHallController
    • Add cinema hall - POST: /cinema-halls
    • Get all cinema halls - GET: /cinema-halls
  • MovieController
    • Add a movie - POST: /movies
    • Get all movies - GET: /movies
  • MovieSessionController
    • Add movie session - POST: /movie-sessions
    • Find all available movie sessions - GET: /movie-sessions/available?movieId=1&date=29.02.2020
    • Update movie session - PUT /movie-sessions/{id}
    • Remove movie session - DELETE /movie-sessions/{id}
  • Expecting to see the DTO objects for request and response in the controllers
  • If some DAO or service methods are absent - implement them.

Hints:

  1. Do not pass Entity as a @RequestBody. Use DTO projection instead.
  2. When you need to take LocalDate variable as input you may use this approach: @RequestParam @DateTimeFormat(pattern = "dd.MM.yyyy") LocalDate date.
  3. Feel free to pass movieId and cinemaHallId in MovieSessionRequestDto.
  4. Implement mappers for each entity. Mark your mappers as @Component.

You can check yourself using this checklist

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%