Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.