mybatis异常
数据类型jdbcType问题
Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.Integer
at java.lang.Enum.valueOf(Enum.java:238)
at org.apache.ibatis.type.JdbcType.valueOf(JdbcType.java:25)
at org.apache.ibatis.builder.BaseBuilder.resolveJdbcType(BaseBuilder.java:64)
... 85 more
错误写法:
#{state,jdbcType=Integer}
正确写法:
#{state,jdbcType=INTEGER}
mapper文件中有相同的id出现
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.xxx.dao.mybatis.AppVersionMapper.saveAppVersion
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:782)
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:754)
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:578)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:288)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:107)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:135)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118)
... 73 more