๋ฐ์ํ ๋ฐ์ดํฐ๋๊น1 [Web] redirect์ ๋ฐ์ดํฐ ์ ๋ฌํ๋ ๋ฐฉ๋ฒ - RedirectAttributes ๊ฒฐ๋ก : RedirectAttributes ํด๋์ค๋ฅผ ์ฌ์ฉํ๋ฉด ๋๋ค! @Controller class TestController { @PostMapping("/buy") public String buy(@ModelAttribute("testForm") TestVo vo , HttpServletRequest request , RedirectAttributes redirectAttributes){ // ๊ฒฐ์ ์ฒ๋ฆฌ ๋ก์ง //์ฒซ๋ฒ์งธ ๋ฐฉ๋ฒ redirectAttributes.addAttribute("param", param); //๋๋ฒ์งธ ๋ฐฉ๋ฒ redirectAttributes.addFlashAttribute("param", param); return "redirect:/buy-result"; } } addAttrib.. 2022. 1. 7. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ