请选择 进入手机版 | 继续访问电脑版

华夏ERP官网

 找回密码
 立即注册
搜索
查看: 142|回复: 1

运行时错误

[复制链接]

2

主题

0

好友

16

积分

新手上路

Rank: 1

发表于 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)


回复

使用道具 举报

33

主题

0

好友

380

积分

管理员

Rank: 9Rank: 9Rank: 9

发表于 2020-8-2 16:55:27 |显示全部楼层
报sqlSessionFactory错误,说明是数据库连不上
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

QQ|QQ群:732152262|Archiver|手机版|华夏ERP官网

GMT+8, 2020-10-30 04:04 , Processed in 1.092002 second(s), 19 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部