为了账号安全,请及时绑定邮箱和手机立即绑定

Spring boot 启动报错求救

Spring boot 启动报错求救

慕运维8079593 2019-04-09 13:14:51
启动报错 求解Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-01-18 16:46:27.462 ERROR 2312 --- [           main] o.s.boot.SpringApplication               : Application run failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiController': Unsatisfied dependency expressed through field 'apiService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiService': Unsatisfied dependency expressed through field 'companyMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyMapper' defined in file [F:\javaProjects\app-service\target\classes\com\mapath\bigreward\appservice\mapper\CompanyMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
查看完整描述

4 回答

?
慕侠2389804

TA贡献1719条经验 获得超6个赞

看看你的mapper文件是否写的有问题或者你贴出来


查看完整回答
反对 回复 2019-05-16
?
慕容708150

TA贡献1831条经验 获得超4个赞

看看你的CompanyMapper.xml,如果我没猜错,这里的返回写得有点问题


查看完整回答
反对 回复 2019-05-16
?
aluckdog

TA贡献1847条经验 获得超7个赞

Error creating bean with name 'companyMapper' defined in file [F:\javaProjects\app-service\target\classes\com\mapath\bigreward\appservice\mapper\CompanyMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

仔细阅读下这段报错信息。


查看完整回答
反对 回复 2019-05-16
  • 4 回答
  • 0 关注
  • 727 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信