异常开始于spring+springmvc+mybatis 注解配置,启动tomcat服务器出现No qualifying bean of type [com.***.service] found for dependency的异常,令人疑惑的是这个包里根本没有我需要用到的类,里面是接口。我用到的是它的实现类,在[com.***.service.impl]包下

更疑惑的是早上启动时还不会报这个问题,下午在我启动另一个项目后再此启动这个项目就出现了。

网上说是 <context:component-scan > 包没配好,于是我把报异常的包也加进去,变成

<context:component-scan base-package="com.**.service.impl,com.**.service" resource-pattern="**/*.class"> </context:component-scan>

再次启动就好了。。。

更疑惑的是 我又把包从<context:component-scan > 中给删除了,然后没有报异常。

最大的问题是控制台显示的异常和实际上可能遇到的问题不同。。。。

我猜是myeclipse缓存的问题。。

关于No qualifying bean of type [XXX.XXX] found for dependency 的一次记录的更多相关文章

  1. spring注入时报错::No qualifying bean of type 'xxx.xxMapper'

    做一个小项目,因为有 baseService,所以偷懒就没有写单独的每个xxService接口,直接写的xxServiceImpl,结果在service实现类中注入Mapper的时候,用的 @Auto ...

  2. maven多模块启动required a bean of type com.xxx.xxx.service that could not be found.

    Description: Field testService in com.xxx.xxx.api.controller.TestController required a bean of type ...

  3. Spring mvc 报错:No qualifying bean of type [java.lang.String] found for dependency:

    具体错误: No qualifying bean of type [java.lang.String] found for dependency: expected at least 1 bean w ...

  4. No qualifying bean of type [com.shyy.web.service.TreeMapper] found for dependency

    异常信息: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sp ...

  5. Spring Task Scheduler - No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined

    1. Overview In this article, we are discussing the Springorg.springframework.beans.factory.NoSuchBea ...

  6. 【Spring】手动获取spring容器对象时,报no qualifying bean of type is defined

    手动获取容器对象时,报no qualifying bean of type is defined, 经过调查,发现手动获取的时候,该类所在的包必须经过spring容器初始化. 1.SpringConf ...

  7. Spring4.14 事务异常 NoUniqueBeanDefinitionException: No qualifying bean of type [....PlatformTransactionManager]

    环境为Spring + Spring mvc + mybatis:其中Spring版本为4.1.4 spring配置文件: <?xml version="1.0" encod ...

  8. 添加事务后 org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type available

    今天遇到了一个奇怪的问题   在没添加事务之前  所有的代码都是好的 , 当我添加了事务之后, 代码报错 org.springframework.beans.factory.NoSuchBeanDef ...

  9. springmvc注入类 NoUniqueBeanDefinitionException: No qualifying bean of type [] is defined: expected single错误

    在springmvc中注入服务时用@Service 当有两个实现类时都标明@Service后则会出现异常: nested exception is org.springframework.beans. ...

随机推荐

  1. python 使用pip安装使用国内镜像加速下载安装包的方法

    清华大学提供开源镜像站:https://mirrors.tuna.tsinghua.edu.cn/help/pypi/ pypi 镜像每 5 分钟同步一次. pip install 包的名字 == 版 ...

  2. 一次奇妙的http请求之旅

    TCP/IP不是一个协议,而是一个协议族的统称.里面包括IP协议.IMCP协议.TCP协议. 这里有几个需要注意的知识点: 互联网地址:也就是IP地址,一般为网络号+子网号+主机号 域名系统:通俗的来 ...

  3. python实现linux下文件遍历

    import os def getAllFile(*names): if len(names) == 0: return "" else: allList = [] for nam ...

  4. centos7下安装nginx

    1.yum install epel-release(安装epel(Extra Packages for Enterprise Linux)) 2.yum repolist(确保epel添加到yum的 ...

  5. 计算机图形学----基于3D图形开发技术 (韩正贤 著)

    第1章 游戏模型 第2章 顶点处理机制 第3章 光栅化操作 第4章 片元处理和输出合并 第5章 光照和着色 第6章 参数曲线和表面 第7章 着色器模型 第8章 图像纹理 第9章 凹凸贴图 第10章 高 ...

  6. 创建一个dynamics 365 CRM online plugin (十) - Isolation mode or trust mode

    Isolation Mode 也被称作为Plugin Trust CRM里面有两种plugin trust / isolation mode 1. Full Trust 只在OP系统中可使用,没有限制 ...

  7. day02 格式化字符串

    字符格式化2019-04-01 方法一 通过f + {} 格式化字符串 name = input("Name: ")age = input("Age:")sco ...

  8. springmvc的dispatchservlet初始化

    初始化做的事情,处理下controller的映射关系 https://blog.csdn.net/qq_38410730/article/details/79426673

  9. ELK实践-Kibana定制化扩展

    纵观任何一家大数据平台的技术架构,总少不了ElasticSearch:ES作为溶合了后端存储.快速检索.OLAP分析等功能的一套开源组件,更绝的是提供了一套集数据采集与前端展现为一体的框架(即ELK) ...

  10. 使用Pandas将多个数据表合一

    使用Pandas将多个数据表合一 将多张数据表合为一张表,便于统计分析,进行这一操作的前提为这多张数据表互相之间有关联信息,或者有相同的列. import pandas as pd unames = ...