MyBatis 插入空值時,須要指定JdbcType
mybatis insert空值報空值異常,可是在pl/sql不會提示錯誤,主要緣由是mybatis沒法進行轉換 sql
還有在向oracle插入數據時,mybatis3報Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters,是因爲參數出現了null值,對於Mybatis,若是進行操做的時候,沒有指定jdbcType類型的參數,mybatis默認jdbcType.OTHER致使,給參數加上jdbcType可解決(注意大小寫) mybatis