mybatis在.xml中写sql语句是的注意事项
用--这个注释 一条SQL语句时候这条SQL语句也会执行,到时候就会报一些莫名其妙的错误
例如
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=‘Second_PageHelper’, mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId=‘null’, jdbcTypeName=‘null’, expression=‘null’}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

这个是<sql>这个标签中写了俩sql语句的原因
————————————————
版权声明:本文为CSDN博主「fzc3088954783」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/fzc3088954783/article/details/105770138

相关文章:

  • 2021-12-20
  • 2021-12-15
  • 2021-11-12
  • 2021-08-13
  • 2021-12-02
  • 2021-09-07
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-24
  • 2021-12-17
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案