maven class not found no qualifying bean of type
来源:互联网 发布:腾讯视频网络设置在哪 编辑:程序博客网 时间:2024/06/05 16:09
class not found
这种情况说明你的部署位置下面找不到这个指定的类文件。
no qualifying bean of type
含义是,找不到指定类型类的对象
这两个问题是经常出现的问题,第一个报错信息意思就是,在你项目部署的位置,找不到指定类型的 class 文件。那么你部署在哪里就去哪里找:比如你部署在 tomcat 下,那么选择 tomcat 下面的项目名字->右键->Browse Deploy Location ,这个时候你就可以找到你项目的部署具体位置了,如下图:
进入项目目录下的 WEB-INF 文件夹,如果你的报错class是第三方jar包,或者是其他模块,那么你就去 lib目录下查看,你引用的jar包是不是存在,100%的情况是不存在的。如果你报错的class是你当前项目的文件,那么你就去 classes 目录下找,看看那个class 是不是存在,也是不存在的。
至于为什么不存在,这个问题原因有很多,归根结底是因为编译过程中出现了某些问题,导致这些jar包,class 无法正常编译,因此也就无法正常的拷贝到需要使用它们的地方,所以会报上面的错误。
有时候不是很好界定,有的是编译不通过,有的是 jdk 版本不合适,总之很难用一个原因解释所有情况,我个人遇到过 jdk 版本不合适,文件本身出现问题(mybatis生成的mapper、class、entity出现问题,重新生成之后解决问题)。
第二个问题,这个错误的意思是,class 文件我是有了,但是无法根据指定的类型,找到它匹配的对象。这种情况一般是我们的对象设置名称不对应导致的,比如我们设置对象名称是userService,但是引用的地方用的是 userService1,如果你确认你的名字没有问题的话,那么恭喜你,你可能也是出现了跟我一样的问题,你把有问题的文件删除调,重新生成一遍再试试。
- maven class not found no qualifying bean of type
- No qualifying bean of type
- No qualifying bean of type [..] found for dependency
- No qualifying bean of type [] found for deperidency :
- no qualifying bean of type found for dependen
- @Autowired - No qualifying bean of type found for dependency
- 解决“No qualifying bean of type found for dependency”办法
- no qualifying bean of type [...] is define
- springmvc No qualifying bean of type
- NoSuchBeanDefinitionException: No qualifying bean of type
- NoSuchBeanDefinitionException:No qualifying bean of type 解决方法
- No qualifying bean of type [] is defined
- No qualifying bean of type(xxxxxx)
- No qualifying bean of type is defined: expected single matching bean but found 2
- No qualifying bean of type [com.zc.service.IFancyService] found for dependency
- No qualifying bean of type [XXX.XXX] found for dependency 解决方法
- 出现No qualifying bean of type [com.*.*.dao.InfoDao] found for :错误!
- 错误:No qualifying bean of type [cn.itcast.service.CustomerService] found for dependency: expected at
- 堆排序
- Python标准模块——pickle
- 2017 bctf boj writeup
- Mysql 索引的理解,总结与优化注意事项
- 连接数据库失败:Access denied for user 'root'@'(ip地址)' (using password: YES)
- maven class not found no qualifying bean of type
- JQuery的获得属性
- Android 中的dm-verity原理分析
- 第二次上机作业letterCounting&lettercoutingWithFile&&EOJ 2844
- LeetCode 476. Number Complement
- pwn工具箱之fastbin attack
- python操作Excel读写之使用xlrd
- ELK+Filebeat搭建实时日志分析平台
- PowerShell实现IE Web自动化