I am reading this tutorial now.
The tutorial say
Start the web application by running the main function of BlogApplication.kt, and go to http://localhost:8080/ , you should see a sober web page with a "Blog" headline.
How to start the web application with Spring Boot and Kotlin?
I wrote BlogApplication.kt
as below according to the tutorial
package com.example.blog
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class BlogApplication
fun main(args: Array<String>) {
runApplication<BlogApplication>(*args)
}
I use Gradle
.
Two options:
main
function and choose "Run"./gradlew bootRun
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.