
MyBatis
文章平均质量分 77
FserSuN
这个作者很懒,什么都没留下…
展开
-
MyBatis异常 Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException:
Connector的jar已经导入,还是出现 Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: Cannot find class: com.mysql.jdbc.Driver 打开属性文件后发现多了一个空格原创 2016-04-13 13:23:52 · 15657 阅读 · 4 评论 -
MyBatis异常处理org.apache.ibatis.executor.ExecutorException
由于测试缘故,数据库被加入了很多测试数据。再次执行原来的查询出现了异常org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than原创 2016-08-14 14:42:37 · 28871 阅读 · 1 评论 -
MyBatis,MySql存储过程分页查询
前言一般我们使用MyBatis时进行分页主要通过使用PageHelper这个插件。但某些时候,在某些公司可能会遇到跨库查询并分页显示的场景,这时就无法在使用PageHelper了。如果待查询的MySql不同库在一台机器上那么可以通过 数据库名.表明 的形式来进行跨库查询,这是可以通过存储过程来完成查询。 编写存储过程 以学生信息查询为例,例如有两个库。 学生库student(学生信息表 stu_i原创 2017-04-23 19:49:01 · 4324 阅读 · 0 评论 -
MyBatis Cause: java.sql.SQLException: Operand should contain 1 column(s) 异常处理
用mybatis foreach出现异常Operand should contain 1 column(s) <select id="selectByCreditIdList" resultMap="BaseResultMap"> SELECT * FROM table WHERE id IN ( <foreach col原创 2017-03-26 19:49:02 · 21357 阅读 · 7 评论