250x250
Notice
Recent Posts
Recent Comments
Link
목록redirect (1)
Chanho_Park
[JAVA] Controller에서 Redirect 객체 넘기기
Controller에서 많은 변수들을 받아와 그것들을 다시 다음 Controller에 넘기고 싶을 때가 있다. 지금까지 return redirect+"?whatColumn="+searchvo.getWhatColumn()+"&keyword="+searchvo.getKeyword()+"&pageNumber="+searchvo.getPageNumber(); 이런 식으로 return 할 때 모든 변수를 붙히곤 했다. 코드도 깔끔하지 못할 뿐더러 보기에도 너무 힘들다. [해결방법] redirect 시 데이타를 전달할 수 있는 방법 RedirectAttributes 클래스를 사용하여 전달할 수 있다. RedirectAttributes 클래스는 Spring 3.1 버전에 추가되었다고 한다. redirect시 Redi..
Spring
2022. 11. 13. 17:53