Initial Commit
This commit is contained in:
commit
75a73ad16a
11 changed files with 459 additions and 0 deletions
19
src/main/kotlin/com/example/demo/DemoApplication.kt
Normal file
19
src/main/kotlin/com/example/demo/DemoApplication.kt
Normal file
|
@ -0,0 +1,19 @@
|
|||
package com.example.demo
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
|
||||
|
||||
@SpringBootApplication
|
||||
class DemoApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<DemoApplication>(*args)
|
||||
}
|
||||
|
||||
@GetMapping("/hello")
|
||||
fun hello(@RequestParam(value = "name", defaultValue = "World") name: String?): String {
|
||||
return String.format("Hello %s!", name)
|
||||
}
|
1
src/main/resources/application.properties
Normal file
1
src/main/resources/application.properties
Normal file
|
@ -0,0 +1 @@
|
|||
|
13
src/test/kotlin/com/example/demo/DemoApplicationTests.kt
Normal file
13
src/test/kotlin/com/example/demo/DemoApplicationTests.kt
Normal file
|
@ -0,0 +1,13 @@
|
|||
package com.example.demo
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue