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
From the course: Build Spring Boot Apps with the Kotlin Programming Language
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Step 1: Explaining the challenge4m 9s
-
(Locked)
Solution walk-through2m 33s
-
(Locked)
Mappings between entities7m 33s
-
(Locked)
Upgrading the view11m 25s
-
(Locked)
Step 2: Explaining the challenge2m 26s
-
(Locked)
Solution walk-through9m 4s
-
(Locked)
Step 3: Explaining the challenge3m 21s
-
(Locked)
Solution walk-through4m 21s
-
(Locked)
-