![1fa240643837624707dfc3c9a18c740d.png](https://img-blog.csdnimg.cn/img_convert/1fa240643837624707dfc3c9a18c740d.png)
需求:
- 数据库表设计时将时间设计成bigint类型,要求在java中使用Date 类型接收
使用mybatis的类型转换功能,并注册到mybatis类型转换列表中;
第一步:定义自己的转换类
package
第二步:配置,使自己的类型转换器能和mybatis原生的类型转换器一样好使;
## mybatis集成配置,公共部分
mybatis:
type-handlers-package: com.show.mybatis.handle
type-handlers-package指定自己的类型转换类所在位置