package com.ssm.controller;

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

@Controller
@RequestMapping("tingchequyu")
public class TingchequyuController {

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

}
