๋ชฉ์ฐจ
spring RedirectAttribute
Model ํ์
๊ณผ ๋๋ถ์ด์ ์คํ๋ง MVC๊ฐ ์๋์ผ๋ก ์ ๋ฌํด ์ฃผ๋ ํ์
์ค์๋ RedirectAttribute ํ์
์ด ์กด์ฌํจ
RedirectAttribute๋ ์กฐ๊ธ ํน๋ณํ๊ฒ๋ ์ผํ์ฑ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํ๋ ์ฉ๋๋ก ์ฌ์ฉ๋จ
RedirectAttribute๋ ๊ธฐ์กด์ Servlet์์ response.sendRedirect()๋ฅผ ์ฌ์ฉํ ๋์ ๋์ผํ ์ฉ๋๋ก ์ฌ์ฉ๋จ
์๋ ์ด๋ฏธ์ง์ฒ๋ผ RedirectAttribute๋ Model๊ณผ ๊ฐ์ด parameter๋ก ์ ์ธํด์ ์ฌ์ฉํ๊ณ addFlashAttribute(์ด๋ฆ, ๊ฐ) ๋ฉ์๋๋ฅผ ์ด์ฉํด์ ํ๋ฉด์ ํ๋ฒ๋ง ์ฌ์ฉํ๊ณ ๋ค์์๋ ์ฌ์ฉํ์ง ์๋ ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํ๊ธฐ ์ํด์ ์ฌ์ฉ๋จ

์ถ์ฒ: ์ฝ๋๋ก ๋ฐฐ์ฐ๋ ์คํ๋ง ์น ํ๋ก์ ํธ(๊ฐ์ ํ)

'IT > development' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [Spring]springframework Controller (0) | 2022.11.27 |
|---|---|
| [thyemeleaf] get query string parameter (0) | 2022.11.27 |
| [Spring]pom.xml์์ dependency ์ค์ ํด ์คฌ๋๋ฐ ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๋ค์ด์ด ์๋๋ ๊ฒฝ์ฐ (0) | 2022.11.26 |
| [Spring]์คํ๋ง ํ๋ก์ ํธ ์ดํด๋ฆฝ์ค์์ ํ๋ก์ ํธ๋ช ๋ณ๊ฒฝ ์ tomcat ์๋ฌ (0) | 2022.11.26 |
| [ExtJS]Ext JS (0) | 2022.11.26 |
๋๊ธ