Add sample route

And before upgrade to v1.4 of kotlin
This commit is contained in:
Sambo Chea 2020-08-21 09:35:31 +07:00
parent 28be046dd6
commit fddec51712
3 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,10 @@ package com.cubetiqs.demo.axon
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@SpringBootApplication
class AxonApplication
@ -9,3 +13,12 @@ class AxonApplication
fun main(args: Array<String>) {
runApplication<AxonApplication>(*args)
}
@RestController
@RequestMapping
class DefaultController {
@GetMapping
fun index(): ResponseEntity<Any> {
return ResponseEntity.ok("ok")
}
}

View File

@ -1 +0,0 @@

View File

@ -0,0 +1,2 @@
server:
port: 8182