public void ShopList(@RequestParam String productName,
@RequestParam int productPrice,
Model model){
ShopVO shopVO = new shopVO();
shopVO.setProductName(productName);
item.setProductPrice(productPrice);
model.addAttribute("shopVO", shopVO);
}
@ModelAttribute는 모델 객체를 지원하는 어노테이션이다
public void shopList(@ModelAttribute ShopVO shopVO, Model model){
model.addAttribute("shopVO", shopVO);
}
보다 간단하게 표현할 수 있다.