From the course: Build Spring Boot Apps with the Kotlin Programming Language

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Solution walk-through

Solution walk-through

- [Instructor] Okay, so I hope you did that. I'll go and do it now. So in the domain package, we're creating a new class which we're calling performance. This is going to be a data class. We have two variables which are going to be an ID which is a long and a title which is a string. We need to make this an entity class and we need to give the ID the required annotations which are @Id and @GeneratedValue. Okay, we'll just import the various types here, so entity, ID, generated value, and generation type. And that should be all we need for our performance class. Now we'll create the JPA interface and we've got a file where we're going to be put all of our interfaces as they'll all pretty much be these one-liners. So it's a new interface which we're going to call performance repository. It's going to extend JPA repository and it's going to contain a object of type performance and the ID is a long. We'll list import performance and that should do it. And in fact it looks like my…

Contents