Skip to content

Instantly share code, notes, and snippets.

@ankitthakur
Created August 28, 2018 05:01
Show Gist options
  • Save ankitthakur/1308a16a7c7e231f736b4b823974d94c to your computer and use it in GitHub Desktop.
Save ankitthakur/1308a16a7c7e231f736b4b823974d94c to your computer and use it in GitHub Desktop.
Basic Springboot based kotlin RestController
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