๐ก HTTP form์์๋ get, post๋ง ์ง์ํ๋ค!
1) application.properties์ ์๋์ ์ค์ ๊ฐ ์ถ๊ฐ
spring.mvc.hiddenmethod.filter.enabled=true
2) html์ ์๋ ์ฝ๋ ์ถ๊ฐ
<input type="hidden" name="_method" value="PUT">
์์
<form role="form" method="post" enctype="multipart/form-data" th:action="@{/boards/{id}(id=${boardFormDto.id})}" th:object="${boardFormDto}">
<input type="hidden" name="_method" value="PUT">
'Web & Android > SpringBoot' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[SpringBoot] Google ์ด๋ฉ์ผ ์ธ์ฆ (0) | 2023.09.12 |
---|---|
[SpringBoot] Lombok (1) | 2023.08.18 |
[SpringBoot] Thymeleaf - ๋ ์ง ๋ณํ (0) | 2023.08.17 |
[SpringBoot] WAS์ WS (0) | 2023.08.15 |
[SpringBoot] Design Pattern (0) | 2023.08.14 |