Springboot+Mybatis项目启动出现 Error creating bean with name 'adminController'

Springboot+Mybatis项目启动出现

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘adminController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cszjo.jobhunter.service.UserService com.cszjo.jobhunter.controller.AdminController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userServiceImpl’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cszjo.jobhunter.dao.UserDao com.cszjo.jobhunter.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDao’ defined in file [D:\test_git\graduation_design\JobHunter\target\classes\com\cszjo\jobhunter\dao\UserDao.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactoryKaTeX parse error: Undefined control sequence: \test at position 2106: …ned in file [D:\̲t̲e̲s̲t̲_git\graduation…AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
… 17 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userServiceImpl’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cszjo.jobhunter.dao.UserDao com.cszjo.jobhunter.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDao’ defined in file [D:\test_git\graduation_design\JobHunter\target\classes\com\cszjo\jobhunter\dao\UserDao.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory 1. g e t O b j e c t ( A b s t r a c t B e a n F a c t o r y . j a v a : 306 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 230 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 302 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 197 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . f i n d A u t o w i r e C a n d i d a t e s ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1192 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . d o R e s o l v e D e p e n d e n c y ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1116 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . r e s o l v e D e p e n d e n c y ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1014 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a n n o t a t i o n . A u t o w i r e d A n n o t a t i o n B e a n P o s t P r o c e s s o r 1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor 1.getObject(AbstractBeanFactory.java:306)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
… 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cszjo.jobhunter.dao.UserDao com.cszjo.jobhunter.service.impl.UserServiceImpl.userDao; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDao’ defined in file [D:\test_git\graduation_design\JobHunter\target\classes\com\cszjo\jobhunter\dao\UserDao.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
… 30 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDao’ defined in file [D:\test_git\graduation_design\JobHunter\target\classes\com\cszjo\jobhunter\dao\UserDao.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1307)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1199)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory 1. g e t O b j e c t ( A b s t r a c t B e a n F a c t o r y . j a v a : 306 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 230 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 302 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 197 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . f i n d A u t o w i r e C a n d i d a t e s ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1192 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . d o R e s o l v e D e p e n d e n c y ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1116 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . r e s o l v e D e p e n d e n c y ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 1014 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . a n n o t a t i o n . A u t o w i r e d A n n o t a t i o n B e a n P o s t P r o c e s s o r 1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor 1.getObject(AbstractBeanFactory.java:306)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
… 32 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactoryBean’ defined in class path resource [com/cszjo/jobhunter/config/MybatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactoryBean’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\test_git\graduation_design\JobHunter\target\classes\mapper\AnnotionMapper.xml]’; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactoryKaTeX parse error: Undefined control sequence: \test at position 1243: …urce: 'file [D:\̲t̲e̲s̲t̲_git\graduation… E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB a b d 06165. C G L I B abd06165.CGLIB abd06165.CGLIBsqlSessionFactoryBean 2 ( < g e n e r a t e d > ) a t c o m . c s z j o . j o b h u n t e r . c o n f i g . M y b a t i s C o n f i g 2(<generated>) at com.cszjo.jobhunter.config.MybatisConfig 2(<generated>)atcom.cszjo.jobhunter.config.MybatisConfig E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB a b d 06165 abd06165 abd06165 F a s t C l a s s B y S p r i n g C G L I B FastClassBySpringCGLIB FastClassBySpringCGLIB 6 c f 271 a . i n v o k e ( < g e n e r a t e d > ) a t o r g . s p r i n g f r a m e w o r k . c g l i b . p r o x y . M e t h o d P r o x y . i n v o k e S u p e r ( M e t h o d P r o x y . j a v a : 228 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s E n h a n c e r 6cf271a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer 6cf271a.invoke(<generated>)atorg.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)atorg.springframework.context.annotation.ConfigurationClassEnhancerBeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)
at com.cszjo.jobhunter.config.MybatisConfig E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIBabd06165.sqlSessionFactoryBean()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
… 56 common frames omitted
Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:113)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:88)
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:520)
… 69 common frames omitted
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.cszjo.jobhunter.dao.AnnotionDao.updateById
at org.apache.ibatis.session.Configuration S t r i c t M a p . p u t ( C o n f i g u r a t i o n . j a v a : 753 ) a t o r g . a p a c h e . i b a t i s . s e s s i o n . C o n f i g u r a t i o n StrictMap.put(Configuration.java:753) at org.apache.ibatis.session.Configuration StrictMap.put(Configuration.java:753)atorg.apache.ibatis.session.ConfigurationStrictMap.put(Configuration.java:725)
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:550)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:307)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:111)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:121)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:111)
… 71 common frames omitted
2020-04-04 13:37:15.293 [main] INFO o.s.b.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/charsets.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/deploy.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/access-bridge-64.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/cldrdata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/dnsns.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/jaccess.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/jfxrt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/localedata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/nashorn.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/sunec.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/sunjce_provider.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/sunmscapi.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/sunpkcs11.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/ext/zipfs.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/javaws.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/jce.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/jfr.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/jfxswt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/jsse.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/management-agent.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/plugin.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/resources.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/jre/lib/rt.jar, file:/D:/test_git/graduation_design/JobHunter/target/classes/, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-web/1.3.3.RELEASE/spring-boot-starter-web-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter/1.3.3.RELEASE/spring-boot-starter-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot/1.3.3.RELEASE/spring-boot-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-autoconfigure/1.3.3.RELEASE/spring-boot-autoconfigure-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-logging/1.3.3.RELEASE/spring-boot-starter-logging-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/ch/qos/logback/logback-classic/1.1.5/logback-classic-1.1.5.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/ch/qos/logback/logback-core/1.1.5/logback-core-1.1.5.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/slf4j/jul-to-slf4j/1.7.16/jul-to-slf4j-1.7.16.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/slf4j/log4j-over-slf4j/1.7.16/log4j-over-slf4j-1.7.16.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-tomcat/1.3.3.RELEASE/spring-boot-starter-tomcat-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/embed/tomcat-embed-core/8.0.32/tomcat-embed-core-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/embed/tomcat-embed-el/8.0.32/tomcat-embed-el-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.32/tomcat-embed-logging-juli-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.32/tomcat-embed-websocket-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-validation/1.3.3.RELEASE/spring-boot-starter-validation-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/fasterxml/classmate/1.1.0/classmate-1.1.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/fasterxml/jackson/core/jackson-databind/2.6.5/jackson-databind-2.6.5.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/fasterxml/jackson/core/jackson-annotations/2.6.5/jackson-annotations-2.6.5.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/fasterxml/jackson/core/jackson-core/2.6.5/jackson-core-2.6.5.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-web/4.2.5.RELEASE/spring-web-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-aop/4.2.5.RELEASE/spring-aop-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-webmvc/4.2.5.RELEASE/spring-webmvc-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-expression/4.2.5.RELEASE/spring-expression-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-freemarker/1.3.3.RELEASE/spring-boot-starter-freemarker-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/freemarker/freemarker/2.3.23/freemarker-2.3.23.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-context-support/4.2.5.RELEASE/spring-context-support-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-test/1.3.3.RELEASE/spring-boot-starter-test-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/junit/junit/4.12/junit-4.12.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/objenesis/objenesis/2.1/objenesis-2.1.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-core/4.2.5.RELEASE/spring-core-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-test/4.2.5.RELEASE/spring-test-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-jdbc/1.3.3.RELEASE/spring-boot-starter-jdbc-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/tomcat-jdbc/8.0.32/tomcat-jdbc-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/tomcat/tomcat-juli/8.0.32/tomcat-juli-8.0.32.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-jdbc/4.2.5.RELEASE/spring-jdbc-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-tx/4.2.5.RELEASE/spring-tx-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/boot/spring-boot-starter-redis/1.3.3.RELEASE/spring-boot-starter-redis-1.3.3.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/data/spring-data-redis/1.6.4.RELEASE/spring-data-redis-1.6.4.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/springframework/spring-oxm/4.2.5.RELEASE/spring-oxm-4.2.5.RELEASE.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/google/guava/guava/18.0/guava-18.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/mysql/mysql-connector-java/5.1.29/mysql-connector-java-5.1.29.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/mybatis/mybatis/3.2.1/mybatis-3.2.1.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/mybatis/mybatis-spring/1.3.0/mybatis-spring-1.3.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/alibaba/druid/1.0.18/druid-1.0.18.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/lib/jconsole.jar, file:/C:/Program%20Files/Java/jdk1.8.0_152/lib/tools.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/jsoup/jsoup/1.7.2/jsoup-1.7.2.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/com/alibaba/fastjson/1.2.24/fastjson-1.2.24.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/redis/clients/jedis/2.9.0/jedis-2.9.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/apache/commons/commons-pool2/2.4.2/commons-pool2-2.4.2.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar, file:/E:/Program%20Files/apache-maven-3.5.2/repo/org/projectlombok/lombok/1.16.18/lombok-1.16.18.jar, file:/E:/Program%20Files/IntelliJ%20IDEA%202018.2.3/lib/idea_rt.jar, file:/C:/Users/lenovo/.IntelliJIdea2018.2/system/captureAgent/debugger-agent.jar]
Disconnected from the target VM, address: ‘javadebug’, transport: ‘shared memory’

错误是:

 <update id="updateById" >
        UPDATE annotion SET  ban = 0 WHERE id = #{id};
    </update>


    <update id="updateById" parameterType="com.cszjo.jobhunter.model.Annotion" >
        update annotion
        <set >
            <if test="title != null" >
                title = #{title},
            </if>
            <if test="author != null" >
                author = #{author},
            </if>
            <if test="annotionBody != null" >
                annotionBody = #{annotionBody},
            </if>
            <if test="crateTime != null" >
                crateTime = #{crateTime},
            </if>
            <if test="booleanUse != null" >
                booleanUse = #{booleanUse},
            </if>
        </set>
        where id = #{id}
    </update>

刚刚加入的一个mybatis的<mapper 文件中

重复ID updateById

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值