Skip to content

Instantly share code, notes, and snippets.

@yyYank
Created July 25, 2016 15:33
Show Gist options
  • Select an option

  • Save yyYank/ed819222e0ae1037ff26b57ee53490d6 to your computer and use it in GitHub Desktop.

Select an option

Save yyYank/ed819222e0ae1037ff26b57ee53490d6 to your computer and use it in GitHub Desktop.
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