Could not autowire. No beans of ‘VideoDao‘ type found.

简介: Could not autowire. No beans of ‘VideoDao‘ type found.

       今天在敲代码的时候,遇到了一个bug

1、先检查一下bean层和Dao层的类的名字是否相同,相同,没有解决

2、看一下xml配置文件的resultType的引导路径,是不是bean目录的,不是写成bean目录了,

修改一下,改成bean目录的路径,这里resultType必须指向bean目录,

3、这里可能是Dao出了问题

4、这里添加了@Repository,就变好了,参考文章:

Could not autowire.No beans of ‘XXXX‘type found的解决方法(详细解析其用法注解)-CSDN博客


相关文章
|
9月前
|
XML C# 数据格式
C#报错 The ‘xmins‘ attribute is not supported in this context
System.Xml.Schema.XmlSchemaException:“The ‘xmins’ attribute is not supported in this context.”异常的解决百度翻译:System.Xml.Schema.XmlSchemaException:“此上下文中不支持”xmins“属性。”这是在使用System.Data.DataSet的ReadXml读取x...
55 0
C#报错 The ‘xmins‘ attribute is not supported in this context
|
12月前
|
Java 数据库连接 mybatis
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
142 0
|
1天前
|
Java 数据库连接 Maven
Could not autowire. No beans of ‘ArticleMapper‘ type found. 要添加Mybatis的依赖
Could not autowire. No beans of ‘ArticleMapper‘ type found. 要添加Mybatis的依赖
|
2月前
No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency
No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency
80 0
|
9月前
|
Java 数据库连接 Redis
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
58 0
|
9月前
|
Java 编译器
解决NoSuchBeanDefinitionException: No qualifying bean of type ‘bean.User‘ available
解决NoSuchBeanDefinitionException: No qualifying bean of type ‘bean.User‘ available
|
9月前
|
Java Spring
BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans‘ defined in class
BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans‘ defined in class
118 0
|
NoSQL Java Redis
5. 成功解决:Could not autowire. No beans of 'RedisConnectionFactory' type found.
今天建了一个新项目,使用 Spring Boot 整合 Redis 时,IDEA 被提醒“Could not autowire. No beans of 'RedisConnectionFactory' type found. ”错误,意思是不能自动装配“RedisConnectionFactory”。
2332 1
|
11月前
|
Java Apache Spring
解决required a single bean, but 2 were found问题
背景:springboot整合shiro中自定义Realm时出现 错误描述 Parameter 0 of method getDefaultWebSecurityManager in cn.ken.springboot_shiro.config.ShiroConfig required a single bean, but 2 were foun
|
Java
springboot3 解决:Could not autowire. No beans of ‘JavaMailSender‘ type found
因为 spring-boot-starter-mail 默认使用某些包发生了变化,在 2.2.xx 版本前后不一,解决对应bug
320 0

热门文章

最新文章