Created
November 17, 2017 09:35
-
-
Save sebastienblanc/159bf97a9ffc9b8d5ce5d5a9b6459b6e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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