mybatis
又是喝白开水
这个作者很懒,什么都没留下…
展开
-
SpringBoot中mybatis配置mybatis.configuration.map-underscore-to-camel-case=true自动转换驼峰标识没有生效
SpringBoot中mybatis配置mybatis.configuration.map-underscore-to-camel-case=true自动转换驼峰标识没有生效查找原来是项目中使用了多数据源导致配置没有生效解决方法:http://yayihouse.com/yayishuwu/chapter/2338...原创 2019-12-14 22:42:33 · 4396 阅读 · 1 评论 -
invalid comparison: java.sql.Timestamp and java.lang.String
修改前"<if test='startTime !=null &amp;&amp; startTime !=\"\" '> and time >= #{startTime} </if>"异常代码### Error querying database. Cause: java.lang.IllegalArgumentException:...原创 2018-06-15 10:57:01 · 1098 阅读 · 0 评论 -
Cause: com.microsoft.sqlserver.jdbc.SQLServerException: '@P0' 附近有语法错误。
myibatis中出现“@P0’ 附近有语法错误。”将#改为$,就可以了。语句编译后#{}是预处理状态转载 2018-11-12 18:16:06 · 4321 阅读 · 1 评论 -
sql中in的用法
做项目是遇到的问题:举例如下:delete from ResultPushMsg where id in (‘1’,‘2’);在sql查询器中可以正确执行,但在MyBatis中的使用,却报错 @Delete("delete from ResultPushMsg where id in #{successId} ") void deleteSuccessId(@Param("succes...转载 2019-03-09 18:12:51 · 7077 阅读 · 0 评论 -
mybatis注解方式返回自增的id
在@Mapper接口的方法上加上@Options(useGeneratedKeys=true, keyProperty=" id", keyColumn=" id") @Insert("INSERT INTO applyinfo (name,address,sex) VALUES (#{name},#{address},#{sex})") @Options(useGeneratedKeys=...原创 2019-04-30 18:28:00 · 2598 阅读 · 2 评论 -
解决 Could not find value method on SQL annotation. The content of elements must consist of well-form
springboot+mybatis报错Could not find value method on SQL annotation. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNum...原创 2019-07-02 15:19:10 · 7219 阅读 · 0 评论 -
Could not find value method on SQL annotation.Cause: org.xml.sax.SAXParseException;
报错内容:org.apache.ibatis.builder.BuilderException: Could not find value method on SQL annotation. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.s...原创 2019-08-23 18:30:42 · 1126 阅读 · 0 评论 -
SQLServerException: 传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。此 RPC 请求中提供了过多的参数。最多应为 2100
org.springframework.jdbc.UncategorizedSQLException: ### Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。此 RPC 请求中提供了过多的参数。最多应为 2100。...原创 2019-09-21 10:22:43 · 3182 阅读 · 1 评论