From the course: Creating a Book Search Engine from Scratch Using Java and GitHub Copilot

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Developing business logic functions

Developing business logic functions

- [Instructor] I'm back in VS Code now, and the first thing I will do is open pom.xml. And we need to add the dependency for Spring Boot Data JPA, which I've done right now. And I will make sure that all the code compiles correctly. And as I hit run, everything is working fine. Now I will go back to the src, main, this is the package com.h2, and I'm going to create two directories. The first one is to hold the entity. The second one is to hold the repository. And we'll work with the two at the moment. So I will create a new file called Book.java, and this is where we are going to map to entity books. And I'm going to call it entity, so it added the import automatically. And the second is we need to add it to the Table. And it's taking the name Book, but we know that table name is books, so I'm going to take that. Now we know that there were a lot of fields in the book, so I'm going to copy and paste to save time. And I'm going to fix certain imports. But the idea is that our bookID is…

Contents