为了账号安全,请及时绑定邮箱和手机立即绑定

mybatis 自定义typehandler

mybatis 自定义typehandler

大LOVE辉 2017-03-04 15:48:07
自定义typehandler   继承自typehandler的里面的四个方法是做什么用的 ?怎么使用来达到自定义参数类型的目的?
查看完整描述

1 回答

?
HansonQ

TA贡献223条经验 获得超56个赞

自定义的类型处理器是用来完成数据库类型和java类型转换的。四个方法就是处理这个转换的。

查看完整回答
反对 回复 2017-03-04
  • 大LOVE辉
    大LOVE辉
    public List<String> getNullableResult(ResultSet resultSet, String s) throws SQLException { String[] split = resultSet.getString(s).split(","); return Arrays.asList(split); } public List<String> getNullableResult(ResultSet resultSet, int i) throws SQLException { String[] split = resultSet.getString(i).split(","); return Arrays.asList(split); } 这两个是里面的方法,他接受参数和返回的参数具体怎么理解呢
  • HansonQ
    HansonQ
    这是自己实现的么 ?
  • 1 回答
  • 0 关注
  • 1172 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信