错误[1]
java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.sunlands.advertise.delivertool.dao.DeliverToolKeywordDao.updateQiHuKeyword
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:776) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:748) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:578) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:315) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parseStatement(MapperAnnotationBuilder.java:300) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:121) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:66) ~[mybatis-3.2.3.jar:3.2.3]
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:651) ~[mybatis-3.2.3.jar:3.2.3]
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:97) ~[mybatis-spring-1.2.1.jar:1.2.1]
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) [spring-tx-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) [spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) [spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) [spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
分析:使用mybatis注解实现的DAO方法,不支持方法的重载,即方法名必须唯一。
错误[2]
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sunlands.landpage.page.dao.LandpagePageDao.getPageListTotalCount
分析:可能是由于在SQL中使用了 < > & 等特殊字符引起的
解决方法:使用< > &来表示这些特殊字符。
Mybatis错误
最新推荐文章于 2024-10-24 17:36:06 发布