-
-
Save jwalgemoed/bbba155741ff4cc4a311dab18b840fd6 to your computer and use it in GitHub Desktop.
This file contains 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
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