mybatis
文章平均质量分 82
我是一颗螺丝钉
做梦都想进大厂!
展开
-
异常 java.lang.IllegalArgumentException: Mapped Statements collection already contains value for 解决
异常信息:org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:437) - Scanned package: 'com.***.entity' for aliasesorg.mybatis.spring.SqlSessionFactoryBean.buildSql...原创 2018-07-03 17:33:17 · 14641 阅读 · 6 评论 -
spring boot mybatis 使用注解的方式访问 带返回结果集和输出参数的存储过程
需要使用到两个注解:org.apache.ibatis.annotations.Optionsorg.apache.ibatis.annotations.Selectmapper 写法:使用的注解和查询一样,但是要指定statementType为CALLABLE 这里一定得记得。service 解析:map 里面直接获取对应的返回列即可;如果想返回相应的对象,直接将List<Map<S...原创 2018-07-04 09:40:50 · 5061 阅读 · 0 评论 -
spring boot + mybatis + sharding jdbc 实现微服务分库分表
我这里采用的是mybatis的全注解实现,主要是没写过配置mapper.xmlspring boot 使用的 1.5.10 https://spring.io/projects/spring-boot 官网spring cloud 使用的 Edgware.SR2 构建 https://spring.io/projects/spring-cloud 官网,这里注意下,spring...原创 2018-11-06 21:28:09 · 1370 阅读 · 0 评论 -
异常com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo...原创 2019-04-18 12:01:59 · 400 阅读 · 0 评论