Created
July 25, 2016 15:33
-
-
Save yyYank/ed819222e0ae1037ff26b57ee53490d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import org.springframework.web.bind.annotation.RequestMapping | |
| import org.springframework.web.bind.annotation.RestController | |
| import org.springframework.boot.SpringApplication | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration | |
| import org.springframework.context.annotation.ComponentScan | |
| import org.springframework.context.annotation.Configuration | |
| @RestController | |
| class HelloRestController { | |
| @RequestMapping("/") | |
| fun home() = "hello" | |
| } | |
| @Configuration | |
| @EnableAutoConfiguration | |
| @ComponentScan | |
| open class Application { | |
| companion object { | |
| @JvmStatic fun main(args: Array<String>) { | |
| SpringApplication.run(Application::class.java, *args) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment