add tests for GreetingController

This commit is contained in:
Denis Savosin
2024-09-25 11:24:30 +07:00
parent 6cfc4382d4
commit 208b2a604b
3 changed files with 47 additions and 7 deletions

View File

@@ -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()
}