From the course: Spring Boot 3 Essential Training

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Building a Spring Data repository

Building a Spring Data repository - Spring Boot Tutorial

From the course: Spring Boot 3 Essential Training

Building a Spring Data repository

- [Instructor] So we have a database, at least an embedded one. So now it's time to build our repository. So I want you to navigate back to the room web app, go to source main resources. Let's go into our application app properties file, and let's remove the last two lines that we added from the previous video. So we're going to leave the DDL auto command, but we don't need the other two. We're no longer going to need that console. If you want to keep it for your own uses, go ahead, but it's not really needed anymore. Once that is done, I want to open up the Java directory and off of the root package, I'm going to create a new Java package called Data dot Entity. Now, within the data entity, we are going to create a new Java class and we're going to call this room entity. Now we're going to annotate this. The first annotation that we are going to add is at entity. And then I like to add table. I don't always trust that hibernate is going to get the table name the way that I build it…

Contents