idea上搭建SSM框架配置mysql时候出现问题

奎托斯 2019-02-22 01:21:49
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ayTestController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ayUserServiceImpl' defined in file [D:\ZL\ssm-project\ssm\target\ssm-project\WEB-INF\classes\com\ay\service\impl\AyUserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.ay.dao.AyUD' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name [/img]'ayUserServiceImpl' defined in file [D:\ZL\ssm-project\ssm\target\ssm-project\WEB-INF\classes\com\ay\service\impl\AyUserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.ay.dao.AyUD' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}


...全文
469 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_39416961 2019-03-01
  • 打赏
  • 举报
回复
把@respository改成@Mybatis试试
奎托斯 2019-02-26
  • 打赏
  • 举报
回复
问题解决了原因是我web.xml配置的spring-mybatias.xml不对,所以一直找不到里面配的ben,一开始以为mybatias.xml,后来注解web.xml里的spring-mybatias.xml发现报一样的错
我爱Bug 2019-02-25
  • 打赏
  • 举报
回复
我手机端看的,图放不大,你这个问题是一个很基本的错误,明天抽空帮你看看几分钟的事
我爱Bug 2019-02-25
  • 打赏
  • 举报
回复
配置文件有问题。把配置文件截图出来看映射
执丶笔 2019-02-25
  • 打赏
  • 举报
回复
可以先把mybatis文件内容注视,在测试,我上次就是这个问题导致的
执丶笔 2019-02-25
  • 打赏
  • 举报
回复
问题可能在mybatis配置文件中
alunSemiconductor 2019-02-25
  • 打赏
  • 举报
回复
虽然还是报错,但是内容不一样啊,controller层的扫描路径你怎么配置的呢?
奎托斯 2019-02-23
  • 打赏
  • 举报
回复
奎托斯 2019-02-23
  • 打赏
  • 举报
回复
奎托斯 2019-02-23
  • 打赏
  • 举报
回复
还是报错,疯了,好几天了都没解决
  • 打赏
  • 举报
回复
mybatis 的包扫描路径不对。
alunSemiconductor 2019-02-22
  • 打赏
  • 举报
回复
basepackage貌似配的不是你的包路径
奎托斯 2019-02-22
  • 打赏
  • 举报
回复
实在搞不懂,不值到@Resource为什么报错,老是说没有注入BEAN,但是xml里也是按照教程配的,注解了@Resource跑tomcat就没问题,求大佬帮帮忙

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧