//Emp为实体
@RequestMapping(value="/*.do" ,method=RequestMethod.GET)
public void controller(Emp testEmp,HttpServletRequest request,HttpServletResponse response) throws Exception{
}
//数据类型绑定
@InitBinder
public void initBinder(WebRequestDataBinder binder){
binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"),false));
}
SpringMVC注释使用entity实体传输
最新推荐文章于 2021-10-07 16:40:13 发布