This is an application for managing actors and movies. We can manipulate objects in following way:
- Display any objects (1 or all)
- Add objects to list (1 or all)
- Remove object from list (1)
- Update any objects existing in list
*src/main/java
* /pl.patronage.rszac
* /pl.patronage.rszac/Controller
* /pl.patronage.rszac/Dao
* /pl.patronage.rszac/Entity
* /pl.patronage.rszac/Service
*/src/test/java
* /pl.patronage.rszac.Dao
##Technologies used:
##Steps to run:
-
mvn clean package (in project folder)
- java -jar target/patronage-1-work-0.0.1-SNAPSHOT.jar
- mvn spring-boot:run (in project folder)
Project have been setup at http://localhost:8080
##Requests
###Actors
> GET
/actors
- return list of actorsResponse fields:
- id
- name
- surname
/actors/{id}
- return/find actor by idResponse fields:
- id
- name
- surname
> POST
/actors
- add new actor or actorsHeader:
Content-Type:application/json
Fields:
- id
- name
- surname
Response fields
- id
- name
- surname
> DELETE
/actors/{id}
- delete actor by id
> PUT
/actors/{id}
- update actor by idHeader:
Content-Type:application/json
Fields:
- name
- surname
###Movies
> GET
/movies
- return list of moviesResponse fields:
- id
- name
- actors
/movies/{id}
- return/find movie by idResponse fields:
- id
- name
- actors
/movies/{id}/addActor/{idA}
- add actor with idA to movie with id
> POST
/movies
- add new movieHeader:
Content-Type:application/json
Fields:
- id
- name
- actors
Response fields
- id
- name
- actors
/movies/addActors
- add list of actors to the movieHeader:
Content-Type:application/json
Fields:
- list of actors
- id of movie
> DELETE
/movies/{id}
- delete movie by id
/movies/{id}/remActor/{idA}
- remove actor with idA from movie with id
> PUT
/movies/{id}
- update movie by idHeader:
Content-Type:application/json
Fields:
- name
- actors
##TODO
- Display any objects (1 or all)
- Add objects to list (1 or all)
- Remove object from list (1)
- Update any objects existing in list
- Unit tests (JUnit)