Problem Description:
Org.springframework.jdbc.UncategorizedSQLException:Error setting null for parameter #1 with jdbctype other. Try setting a different jdbctype for this parameter or a different jdbctypefornull the configuration property. Cause:java.sql.SQLException: Invalid column type: 1111
Problem Analysis:
This problem occurs because when we write SQL in an XML file, we do not specify a parameter type, and when we pass a value of NULL type, the program cannot automatically match according to the type of the entry parameter, only match to the other, if this parameter is required, it will run out of error because of type inconsistency.
Workaround:
Add type, such as Jdbctype=varchar, jdbctype=numeric ..., modify the entry code: #{param,jdbctype= specific type}, not #{param}
Suggestions:
It is best to display the specified parameter types and develop a good coding habit to avoid unnecessary anomalies.
"Error Note" MyBatis SQLException: Invalid column type: 1111