This is a small project to manage movies.
mvn install
Or
mvn package
mvn spring-boot:run
Run application by using Angular-cli and go to http://localhost:4200
ng serve
Click here to read more.
- Lombok;
- Jackson-databind;
- HATEOAS (not used yet).
- Movie Controller
- Get all movies
HashSet<MovieDTO> findAll()
; - Find movie by UUID
MovieDTO findOne(String uuid)
; - Add movie
MovieDTO save(MovieFlatDto movieDto)
; - Update movie
MovieDTO update(MovieFlatDto movieDto)
; - Delete movie
void delete(String uuid)
.
- Get all movies
- Director Controller
- Get all directors
HashSet<DirectorDto> findAll()
; - Find director by UUID
DirectorDto findOne(String uuid)
; - Find movies for by full name of director
DirectorDto findMovies(String fullName)
.
- Get all directors
- Type Controller
- Get all types
HashSet<TypeDto> findAll()
; - Find type by UUID
TypeDto findOne(String uuid)
; - Find movies for by label of type
TypeDto findMovies(String label)
.
- Get all types
Class MovieFlatDto is used to be coherent with stored data in JSON file.
The JSON file is located at ~/ext/data/movies.json
datasource.json.location=/data/movies.json
datasource.json.fullPath=ext/data/movies.json
This is the main class used to interact with JSON file and implementing the following methods:
- Read the JSON file
HashSet<MovieFlatDto> read()
; - Append
void write(HashSet<MovieFlatDto> movies)
.