package com.ssm.controller;

import com.ssm.entity.ItemCategory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("itemCategory")
public class ItemCategoryController {

	//对象方式接收数据，ModelAndView对象响应数据
	@RequestMapping("add")
	public ModelAndView test(ItemCategory itemCategory){
		//创建ModelAndView对象的同时设置了view的信息
		ModelAndView mv=new ModelAndView("showItemCategory");
		//将这个对象category保存到ModelAndView对象中
		mv.addObject("itemCategoryInfo", itemCategory);
		return mv;
	}

}
