Delete or put methods in thymeleaf

后端 未结 5 912
情歌与酒
情歌与酒 2021-02-05 15:52

I would like to call @RequestMapping(value = \"\", method = RequestMethod.DELETE) in spring from thymeleaf form.

Is there any possibility to call delete or

5条回答
  •  爱一瞬间的悲伤
    2021-02-05 16:38

    When we use th:method="PUT", thymeleaf creates hidden input as in the screenshot below. Then HiddenHttpMethodFilter converts posted method parameters into HTTP methods.

    HiddenHttpMethodFilter disabled by default in Spring Boot 2.2.

    You can enable this by adding spring.mvc.hiddenmethod.filter.enabled=true to your application.properties file.

提交回复
热议问题