01 | package com.aaa.controller; |
02 |
03 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
04 | import org.springframework.web.bind.ServletRequestDataBinder; |
05 | import org.springframework.web.bind.annotation.InitBinder; |
06 |
07 | import java.text.SimpleDateFormat; |
08 | import java.util.Date; |
09 |
10 | public class BaseController { |
11 | @InitBinder |
12 | public void initBinder(ServletRequestDataBinder binder) { |
13 | SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss" ); |
14 | binder.registerCustomEditor(Date. class , new CustomDateEditor(sdf, true )); |
15 | } |
16 | } |


康日澜 LV10
前天
d3834632 LV2
7月14日
短巷拥猫 LV12
6月18日
潜心小白来到 LV3
6月10日
2225906816
5月26日
暂无贡献等级
zxdfdcfffddssd
5月21日
暂无贡献等级
123456789x LV1
5月19日
zhaopb LV8
5月17日
TaoTaot
4月7日
暂无贡献等级
小宋敲代码
3月25日
暂无贡献等级