반응형
Notice
Recent Posts
Recent Comments
Link
관리 메뉴

bro's coding

Spring.modelAndView 본문

[IT]/Spring

Spring.modelAndView

givemebro 2021. 6. 2. 16:31
반응형
	@RequestMapping("findCustomerById.do")
	public String findCustomerById(String id, HttpServletRequest request) {
		request.setAttribute("customerVO", new CustomerVO(id, "아이유", "오리"));
		return "customer-detail";
	}

	@RequestMapping("findCustomerById2.do")
	public ModelAndView findCustomerById2(String id) {
		return new ModelAndView("customer-detail", "customerVO", new CustomerVO(id, "코스타아이유", "오리"));
	}

반응형

'[IT] > Spring' 카테고리의 다른 글

REST  (0) 2021.06.30
Spring.Tiles Framework  (0) 2021.06.22
Spring 설정 @Configuration @Bean  (0) 2021.06.22
Spring.Junit(단위 테스트)  (0) 2021.06.07
spring.객체 안 객체 접근(view)  (0) 2021.06.02
Spring.MVC  (0) 2021.06.02
Spring.AOP적용 단계  (0) 2021.06.01
spring.web.xml 설정  (0) 2021.06.01
Comments