package Ġcom . k ru . kot boot . controller Ċ Ċ import ĠPROJECT _ PATH Ċ import Ġcom . k ru . kot boot . model . Project DTO Ċ import Ġcom . k ru . kot boot . service . Project Service Ċ import Ġorg . springframework . data . domain . Page Ċ import Ġorg . springframework . data . domain . Page able Ċ import Ġorg . springframework . data . web . Page able Default Ċ import Ġorg . springframework . http . HttpStatus Ċ import Ġorg . springframework . http . MediaType Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġjavax . validation . Valid ĊĊ Ċ @ RestController Ċ @ RequestMapping ( PROJECT _ PATH , ĊĠĠĠĠĠĠĠ Ġproduces Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ] Ġ) Ċ class ĠProject Controller ( private Ġval Ġproject Service : ĠProject Service ) Ġ{ ĊĊĠĠĠ Ġ@ GetMapping ĊĠĠĠ Ġ@ ResponseStatus ( HttpStatus . OK ) ĊĠĠĠ Ġfun Ġget Projects (@ Page able Default ( value Ġ= Ġ 5 0 ) Ġ Ġpage able : ĠPage able ): ĠPage < Project DTO > Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġproject Service . get Projects ( page able ) ĊĊĠĠĠ Ġ@ PostMapping ĊĠĠĠ Ġ@ ResponseStatus ( HttpStatus . CREATED ) ĊĠĠĠ Ġfun Ġcreate Project (@ Valid Ġ@ RequestBody Ġproject Dto : ĠProject DTO ): ĠProject DTO Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġproject Service . save ( project Dto ) Ċ }