好像新的mybatis要求mapper中对于允许为空的字段,必须注明jdbcType,例如:
#{projectName,jdbcType=VARCHAR} ,
否则在增加、修改数据时会出现错误:
### Error updating database. Cause: org.apache.ibatis.type.TypeException: Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 无效的列类型: 1111
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### Cause: org.apache.ibatis.type.TypeException: Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 无效的列类型: 1111
mybatis 新增修改,参数要加jdbcType
最新推荐文章于 2024-02-25 19:21:55 发布