Created
August 28, 2018 05:01
-
-
Save ankitthakur/1308a16a7c7e231f736b4b823974d94c to your computer and use it in GitHub Desktop.
Basic Springboot based kotlin RestController
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.thakur.dockerdemo.controller | |
import org.springframework.web.bind.annotation.RequestMapping | |
import org.springframework.web.bind.annotation.RestController | |
@RestController | |
@RequestMapping("/docker/api") | |
class DockerController { | |
@RequestMapping("/") | |
fun home(): String { | |
return "Welcome to Docker apis" | |
} | |
@RequestMapping("/hello") | |
fun helloWorld(): String { | |
return "Welcome to Docker apis, This is hello world in docker" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment