Spring Applications

Exercise: Book Entity

The objective of this exercise is to implement a book entity and a repository with CRUD operations.
  1. Create and start a PostgreSQL database bookstore.
  2. Implement a Book class and add JPA annotations to make it an entity class that conforms to the given SQL schema.
  3. Implement a BookRepository class that creates an entity manager and implements CRUD operations for the Book entity.
  4. In the persistence.xml configuration file define the persistence unit bookstore which maps the Book entity to the bookstore database.
  5. Run the BookPersistenceIT integration test.