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.
Adding services
From the course: Build Spring Boot Apps with the Kotlin Programming Language
Adding services
- [Instructor] Okay, so now we're ready to build the Model part of our application, and we've got this file here called Theater which contains the data class called Seats, and the class called Theater, that is generating the list of Seats with their various values and so on. So, I said that we'll make the data class the domain class for this application. So I think what we should do, is create a new package, which we'll call domain. And then I'm going to cut the data class Seat out of here and we'll create it as a new file in the domain class, in the domain package. Paste that in there. And yes, we'll need to import BigDecimal, that's fine. Now the Seat is going to be slightly different to the one that we created before. In that, we've now decided that our rows are going to be chars rather than integers, so we'll just change that to a char. Other than that, I think the rest of that looks absolutely fine. At the moment, these are all vals. Now we will need to think about whether this…
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)
Creating a project with the Spring Initializr4m 30s
-
(Locked)
A hello world controller3m 33s
-
(Locked)
Auto-restarting an application4m 18s
-
(Locked)
Overview of the case study1m 42s
-
(Locked)
Creating views and backing beans5m 15s
-
Connecting views to controller functions2m 10s
-
(Locked)
Adding services4m 13s
-
(Locked)
Posting to a controller5m 3s
-
(Locked)
Dependency injection6m 38s
-
(Locked)
Revisiting backing beans3m 32s
-
(Locked)
-
-
-
-