Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.rx.mapper.SecurityMapper.insertMenu!selectKey
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:98)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 50 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.rx.mapper.SecurityMapper.insertMenu!selectKey
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:657)
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:629)
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:462)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:296)
at org.apache.ibatis.builder.xml.XMLStatementBuilder$SelectKeyHandler.handleNode(XMLStatementBuilder.java:221)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseSelectKey(XMLStatementBuilder.java:167)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:91)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parsePendingStatements(XMLMapperBuilder.java:171)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:95)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.loadXmlResource(MapperAnnotationBuilder.java:138)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:111)
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:60)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:532)
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:95)
... 53 more
这么写有问题吗?去掉selectKey运行tomcat不会报错....有谁知道的,可以说下吗?
http://www.cnblogs.com/yangchao/archive/2010/09/28/2044415.html
<selectKeyresultClass="long"keyProperty="id">
selectSEQ_USER_ID.nextvalasidfromdual
</selectKey>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。