Error message: exceeds the specified length of the Database data table setting
Nested exception is org.apache.ibatis.type.TypeException:Could no set parameters for mapping:parametermapping{ Property= ' apply_id ', mode=in, Javatype=class java.lang.Object, Jdbctype=bigint, numericscale=null, resultmapid= ' null ', jdbctypename= ' null ', expression= ' null '}. Cause:org.apache.ibatis.type.TypeException:Error setting non null for parameter #2 with Jdbctype BIGINT. Try setting a different jdbctype for this parameter or a different the configuration property. Cause:org.apache.ibatis.type.TypeException:Error setting non null for parameter #2 with Jdbctype BIGINT. Try setting a different jdbctype for this parameter or a different the configuration property. Cause:java.sql.SQLException:Parameter index out of range (2 > number of parameters, which is 1
The solution on the Internet is probably as follows:
This is because the number of placeholders is not equal to the number of parameters set, check the SQL you wrote and the parameters passed.
What happens to a particular write like statement:
When writing a like statement, the use of the resulting;
Write in MyBatis is supposed to be like '%${name} % ' instead of '%#{name} % '
Note:${name} is not enclosed in single quotes, and #{name} is a single quote
If it is not: it may be the reason for the comment-this is my pit, the main idea is also displayed so that no error, Pit Dad! A long memory!
Because the comment adds the wrong position!!
Idea_mybatis_sqlexception:parameter index out of range pit