找回密码
 注册【用户名必须为中文字符】

QQ登录

只需一步,快速开始

运行时错误

haixia 回复:1 | 查看:2604 | 发表于 2020-7-24 17:43:35 |阅读模式 |复制链接
你好, 我运行你的项目时为什么会报以下错误 ,要如何解决
                        3.0.7.1
2020/07/24-17:42:39 ERROR [main] org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountMapper' defined in file [G:\haileWorkSpace\SpringWorkSpace\JSH_ERP\target\classes\com\jsh\erp\datasource\mappers\AccountMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [G:\haileWorkSpace\SpringWorkSpace\JSH_ERP\target\classes\mapper_xml\DepotHeadMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [G:\haileWorkSpace\SpringWorkSpace\JSH_ERP\target\classes\mapper_xml\DepotHeadMapper.xml]'. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234)
        at com.jsh.erp.ErpApplication.main(ErpApplication.java:22)


回复

使用道具 举报

发表于 2020-8-2 16:55:27
报sqlSessionFactory错误,说明是数据库连不上
回复 支持 反对

使用道具 举报

本版积分规则

联系我们

对话产生契机,讨论收获惊喜, 只为成就无限创举

江苏省南通市通州区太湖路88号

欢迎来这里一起喝喝茶,
聊聊你的想法

15806283912
(9:00AM-6:00PM)

一切从沟通开始

洽谈合作
752718920@qq.com

工作日12小时内回复

微信号
shenhua861584

欢迎每一个对事业怀
有疯狂激情的人

登录 发布 快速回复 返回顶部 返回列表