Skip to content

Instantly share code, notes, and snippets.

@t-kashima
Created December 10, 2016 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-kashima/aeb9686cf802bfcbe3c1486692dbfc3d to your computer and use it in GitHub Desktop.
Save t-kashima/aeb9686cf802bfcbe3c1486692dbfc3d to your computer and use it in GitHub Desktop.
Kotlin on Google App Engine
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)
}
}
}
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