Skip to content

Instantly share code, notes, and snippets.

@jwalgemoed
Created December 27, 2017 15:02
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 jwalgemoed/bbba155741ff4cc4a311dab18b840fd6 to your computer and use it in GitHub Desktop.
Save jwalgemoed/bbba155741ff4cc4a311dab18b840fd6 to your computer and use it in GitHub Desktop.
package nl.sourcelabs.dsl
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.web.bind.annotation.*
@SpringBootApplication
class DslDemoApplication
@RestController
class HelloWorldController {
@GetMapping("/api/hello/{name}")
fun sayHi(@PathVariable name: String): Greeting {
return Greeting("Hi, $name!")
}
}
data class Greeting(val message: String)
fun main(args: Array<String>) {
SpringApplication.run(DslDemoApplication::class.java, *args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment