简单记录下:
今天mybatis中遇到一个错误:
org.springframework.jdbc.UncategorizedSQLException:PreparedStatementCallback;uncategorizedSQLExceptionforSQL[INSERTINTOlaw_enforce_user(user_code,name,sex,birthday)VALUES(?,?,?,?)];SQLstate[99999];errorcode[17041];索引中丢失IN或OUT参数::4;nestedexceptionisjava.sql.SQLException:索引中丢失IN或OUT参数::4
这个原因是数据库中的字段类型与SQL语句中的类型不匹配造成的,后边的数字,代表第几个参数错误。找到对应参数配置或者SQL中这个参数的类型是否与数据库中匹配,更改后便解决了!