今天在用mybatis的时候发的一个大坑,nested exception is org.apache.ibatis.type.TypeException: Could not set paramet

就是这个错误
nested exception is org.apache.ibatis.type.TypeException: Could not set paramet(这个项目用的Oracle数据库)
如图:
在这里插入图片描述
解决:
在使用mybatis时,sql语句中,字符串中添加参数不能使用预编译的#,而要使用 $,否则就会报这个错误
在这里插入图片描述
将 # 改为 $ 之后即可解决!

猜你喜欢

转载自blog.csdn.net/WziH_CSDN/article/details/109386013