mirror of
https://github.com/Dannecron/spring-boot-demo.git
synced 2025-12-26 00:32:34 +03:00
add tests for GreetingController
This commit is contained in:
@@ -2,6 +2,7 @@ package com.example.demo.controllers
|
||||
|
||||
import com.example.demo.provider.html.renderProductTable
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.ResponseBody
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@@ -11,7 +12,8 @@ class GreetingController {
|
||||
return "Hello World!"
|
||||
}
|
||||
|
||||
@GetMapping("/example/html")
|
||||
@GetMapping(value = ["/example/html"], produces = ["text/html"])
|
||||
@ResponseBody
|
||||
fun exampleHtml(): String {
|
||||
return renderProductTable()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user