updated dependencies, cleanup request method
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user