We are starting to work with Hibernate on the new project. We will implement it step by step.
The completed structure of the project is described below:

Your task is to implement the following steps:
- add required hibernate dependencies
- create a
hibernate.cfg.xmlfile - create
HibernateUtilclass - create
Moviemodel class - create
MovieDaointerface andMovieDaoImplclasspublic interface MovieDao { Movie add(Movie movie); Optional<Movie> get(Long id); }
- create
MovieServiceinterface andMovieServiceImplclasspublic interface MovieService { Movie add(Movie movie); Movie get(Long id); }
- create your custom unchecked DataProcessingException and throw it in the catch block on the DAO layer
- in the
mate/academy/Main.main()method create an instance of MovieService using injector and test all methods from MovieService - use annotations and the annotation injector located in the
libfolder - run tests with the command
mvn -DskipTests=false clean package.
!!! Important: you should have only the Movie model with dao and service layer. Don't create other models and don't push them to PR.