JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

Caused by: java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1).

发布时间 2023-03-25 23:39:06作者: 枫叶艾辰
一、问题背景

在xml配置中自定义了sql语句

二、报错截图如下

三、我的项目配置如下

四、分析问题
五、问题原因

在xml中自定义sql语句时,里面不能有注释过得sql

六、解决方式

https://thinkingcao.blog.csdn.net/article/details/103815995

    本栏目推荐文章
  • 数据库中number(m,n)
  • Java中BigDecimal类、String类和Number类
  • android编译kanzi 问题 (1) Caused by: java.io.FileNotFoundException: Error: Could not find or access Kanzi's Android libraries directory: C:\XXXXXXX
  • mybatis解决nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping:
  • CF1870F Lazy Numbers 题解
  • select row_number() over(partition by column1 order by column2 desc
  • jpa报错 Caused by: javax.persistence.TransactionRequiredException: Executing an update/delete query
  • 解决RabbitMQ Caused by: org.springframework.amqp.AmqpIOException: java.io.IOException
  • antdv1.7.8 a-input-number限制正整数和0
  • 升级到 .net 8 后使用 ef core 查询遇到错误:Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near '$'. 附近的语法不正确
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们