首页>代码>ssm开发生产管理ERP系统>/src/main/java/com/megagao/production/ssm/controller/converter/CustomDateConverter.java
01 | package com.megagao.production.ssm.controller.converter; |
02 |
03 | import java.text.SimpleDateFormat; |
04 | import java.util.Date; |
05 |
06 | import org.springframework.core.convert.converter.Converter; |
07 |
08 | /** |
09 | * |
10 | * 自定义日期转换器 |
11 | */ |
12 | public class CustomDateConverter implements Converter<String, Date> { |
13 | @Override |
14 | public Date convert(String source) { |
15 | try { |
16 | //进行日期转换 |
17 | return new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" ).parse(source); |
18 | } catch (Exception e) { |
19 | e.printStackTrace(); |
20 | } |
21 | return null ; |
22 | } |
23 | } |

chutianyu LV4
7月22日
13188866605 LV12
4月18日
爱情的本质 LV16
2024年8月8日
泓鼎168 LV20
2024年6月18日
educationAAA LV11
2024年4月30日
weilaizhisheng LV21
2024年3月27日
pureshyness LV6
2024年2月14日
403401 LV2
2023年12月17日
guanrenan LV10
2023年11月28日
daguocai001 LV3
2023年11月4日

chutianyu LV4
7月22日
萌萌哒的泰迪熊 LV4
6月16日
xmjying LV13
6月11日
哪里的完整版 LV8
3月1日
xianyu091012 LV5
2024年12月26日
蛋蛋蛋蛋的糕糕
2024年12月17日
暂无贡献等级
别让自己无聊 LV13
2024年12月10日
微信网友_7269098639953920 LV2
2024年11月25日
shunlun8855 LV1
2024年10月29日
lz88888 LV12
2024年10月17日