Created
December 10, 2016 16:20
-
-
Save t-kashima/aeb9686cf802bfcbe3c1486692dbfc3d to your computer and use it in GitHub Desktop.
Kotlin on Google App Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello | |
import java.util.Arrays | |
import org.springframework.boot.CommandLineRunner | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.context.ApplicationContext | |
import org.springframework.context.annotation.Bean | |
@SpringBootApplication | |
open class Application { | |
companion object { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
SpringApplication.run(Application::class.java, *args) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello | |
import org.springframework.web.bind.annotation.RequestMapping | |
import org.springframework.web.bind.annotation.RestController | |
@RestController | |
class HelloController { | |
@RequestMapping("/") | |
fun index(): String { | |
return "Greetings from Spring Boot!" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment