Giter Site home page Giter Site logo

jv-spring-rest's Introduction

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
    • Get 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

jv-spring-rest's People

Contributors

max-pochepets avatar sofasmile avatar resci avatar kseniiamakarova avatar boroda4436 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.