[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, "코스타아이유", "오리"));
	}

반응형