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

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…

Contents