-
RedirectAttributeSpring 2023. 3. 30. 14:33
- 지난번에 memModify 의 리턴에 파라미터를 주기 위해 다음과 같은 형태로 작성했다.
RedirectAttribute 메소드를 이용할 수 있다.
: 화면에 한번만 전달되는 파라미터를 처리하는 용도
내부적으로 HttpSession 객체에 담아서 한번만 사용되고 폐기
- 다음과 같이, addAttribute( 파라미터명 , 파라미터값 ) 을 주면,
- 자동으로 redirect한 URL에 파라미터가 붙는다.
'Spring' 카테고리의 다른 글
회원가입, 로그인, 게시판 백엔드 실습( login 화면 ) (0) 2023.04.04 회원가입, 로그인, 게시판 백엔드 실습( main 화면 ) (0) 2023.03.31 List : Detail , Modify, Delete (0) 2023.03.30 ArrayList / Mapper 사용예제 (0) 2023.03.29 프로젝트의 구조 (0) 2023.03.29