updated dependencies, cleanup request method

This commit is contained in:
2020-04-18 18:28:56 +02:00
parent 6e9b874df6
commit 7230f1145f
2 changed files with 4 additions and 27 deletions
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
@Controller
class JokeController {
@@ -12,7 +13,7 @@ class JokeController {
@Autowired
lateinit var jokeService: JokeService
@RequestMapping(value=["/", ""])
@RequestMapping(value=["/", ""], method = [RequestMethod.GET])
fun showJoke(model : Model) : String {
model.addAttribute("joke", jokeService.joke)
return "chucknorris"