欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

关于ModelAndView

程序员文章站 2022-07-03 12:35:01
...
import org.springframework.web.servlet.ModelAndView;

	@RequestMapping(value = "/goJxsjddPage")
	public ModelAndView goJxsjddPage() {
		ModelAndView mv = new ModelAndView();
		List<String> pcbhs = pcszDao.getPcbh();
		String ztbz = "";
		mv.addObject("ztbz", ztbz);
		mv.addObject("pcbhs", pcbhs);
		mv.setViewName("gcgl/jxsjdd");
		return mv;
	}

引包的时候注意应引入的是org.springframework.web.servlet下边的包,而不是
import org.springframework.web.portlet.ModelAndView;的包下的ModelAndView类;

相关标签: spring ModelAndView