Skip to content

Instantly share code, notes, and snippets.

@sebastienblanc
Created November 17, 2017 09:35
Show Gist options
  • Save sebastienblanc/159bf97a9ffc9b8d5ce5d5a9b6459b6e to your computer and use it in GitHub Desktop.
Save sebastienblanc/159bf97a9ffc9b8d5ce5d5a9b6459b6e to your computer and use it in GitHub Desktop.
package com.example.productrest
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
@SpringBootApplication
open class ProductRestApplication
@RestController
internal class MyProductController {
@GetMapping("/products")
fun getproducts()= listOf("Windows phone", "blackberry")
}
fun main(args: Array<String>) {
SpringApplication.run(ProductRestApplication::class.java, *args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment