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,700 courses taught by industry experts.
A hello world controller
From the course: Build Spring Boot Apps with the Kotlin Programming Language
A hello world controller
- [Instructor] I think just to check everything's working we should create a Hello world HTML file and a controller to point to it. So let's do that. So under Resources and then Templates, we'll create a new HTML file. And let's call this one helloworld .html. And we get the outline of an HTML file here. All I'm going to do is in the body, print out the words Hello world. Nothing else, that will do absolutely fine. And then let's set up a controller to display this file. So under kotlin and then our package, which is com.virtualpairprogrammers.theater I'm going to be creating other controllers so I'm going to put this in a new package which we'll call Control. So I'm working on the package here choosing New Package and Control is the name of the package. And then within our control package let's create our controller. So we'll do this as a Kotlin File/Class and we're going to be making this the main controller for our application. So I think we'll call this MainController. And well to…
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)
-
-
-
-