首页 > 编程语言 > 详细

java web页面的input框输入时间显示400错误

时间:2018-06-01 00:48:35      阅读:532      评论:0      收藏:0      [点我收藏+]

在controller层初始化initBinder。

@InitBinder

public void initBinder(WebDataBinder binder) {

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

dateFormat.setLenient(false);

binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));

}

java web页面的input框输入时间显示400错误

原文:https://www.cnblogs.com/y1995/p/9119759.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!