博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
WebDataBinder
阅读量:7243 次
发布时间:2019-06-29

本文共 561 字,大约阅读时间需要 1 分钟。

hot3.png

static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");	@InitBinder	protected void initBinder(WebDataBinder binder) throws Exception {		// bind empty strings as null		binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));		binder.registerCustomEditor(Date.class, new CustomDateEditor(sdf, true));		binder.registerCustomEditor(Integer.TYPE, new CustomNumberEditor(Integer.class, true) {			public void setValue(Object o) {				super.setValue((o == null) ? 0 : o);			}		});	}

转载于:https://my.oschina.net/liyonglee/blog/370659

你可能感兴趣的文章
数论 + 公式 - HDU 4335 What is N?
查看>>
内核Linux系统调用的列表zz
查看>>
Android 蓝牙通信——AndroidBluetoothManager
查看>>
pyqt的setObjectName()/findChild()
查看>>
linux中iptables详解
查看>>
数据产品设计专题(2)- 数据产品设计方法论之框架体系
查看>>
搭建nagios+ncpa监控
查看>>
iReport4.5.1、Struts2.2.3生成Html文档时页面红叉叉的解决办法。
查看>>
计算机字符串的长度
查看>>
Mybatis最入门---动态查询(foreach)
查看>>
Exchange 2007 配置POP3
查看>>
vmware 中centos NAT(网络地址转换)安装与使用。
查看>>
产品设计体会(7018)人人都是产品经理
查看>>
Linux学习 -->解决Ubuntu系统上 No command 'crond' found
查看>>
如何使core dump生效之unlimit及gdb相关命令(C++)
查看>>
运维部奖励员工之大连游记
查看>>
基于OHCI的USB主机开发 —— OHCI(控制端口写数据)
查看>>
自学人工智能:1-3 接触scrapy框架
查看>>
prototype中Hash的测试
查看>>
能删除Windows下“本地安装源 (Msocache)”吗?
查看>>