项目构建正常,启动和Debug报以下错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-12-14 09:49:32.038 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.

Action:

Consider defining a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:56886', transport: 'socket'

Process finished with exit code 1

解决办法:

启动类上加上

@MapperScan({ "com.tianyan.bbc.dao"})

Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.的更多相关文章

  1. Java报错: A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookMapper' that could not be found.

    在学习Spring-boot-mybatis时,报错A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookM ...

  2. STS中不同包但相同类名引起的问题:A component required a bean of type 'javax.activation.DataSource' that could not be found

    1. 问题输出: APPLICATION FAILED TO START*************************** Description: A component required a ...

  3. springboot 启动报错Consider defining a bean of type 'com.example.springbootdruid.mapper.UserMapper' in your configurati

    一.问题 springboot项目启动时报错: Field userMapper in com.example.springbootdruid.service.impl.UserServiceImpl ...

  4. spring cloud gateway网关启动报错:No qualifying bean of type 'org.springframework.web.reactive.DispatcherHandler'

    网关配置好后启动报错如下: org.springframework.context.ApplicationContextException: Unable to start web server; n ...

  5. SpringBoot中service注入失败(A component required a bean of type 'XXService' that could not found)

    先写了JUnit,发现启动不了,注释掉有问题的service也不可以.可能是因为spring开始时会加载所有service吧. 按照网友们的说法,一般需要检查: 1.入口类有没有写MapperScan ...

  6. SpringBoot扫描不到类,注入失败A component required a bean of type 'XXService' that could...

    SpringBoot项目的Bean装配默认规则是根据Application类所在的包位置从上往下扫描! “Application类”是指SpringBoot项目入口类.这个类的位置很关键: 如果App ...

  7. 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

    运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...

  8. a commponent required a bean of type XXXXXX that could not be found-2022新项目

    一.问题由来 目前刚入职一家新公司不久,公司的新项目采用DDD驱动领域设计来进行开发,架构这一块使用的是阿里巴巴开源的最新框架COLA4.0的架构. 主要是这个框架里面的分层设计.主要分为四层:ada ...

  9. 【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration. 【Mapper类不能被找到】@Mapper 和@MapperScan注解的区别

    启动报错: 2018-05-16 17:22:58.161 ERROR 4080 --- Disconnected from the target VM, address: '127.0.0.1:50 ...

随机推荐

  1. Java前后端依赖

    有时候我们的一个类需要依赖另外一个类,这种就是依赖关系,创建对象的工作一般由spring容器来完成然后注入给调用者,这种就是依赖注入. 代码可参考1227210565朋友空间 DispatcherSe ...

  2. 双网卡绑定一个IP--bond

    双网卡绑定一个IP 步骤1:新建/etc/sysconfig/network-scripts/ifcfg-bond0文件 DEVICE=bond0 ONBOOT=yes BOOTPROTO=stati ...

  3. border边框属性

    边框属性: 边框宽度(border-width):thin.medium.thick.长度值 边框颜色(border-color):颜色.transparent(透明) 边框样式(border-sty ...

  4. JAVA IO流 InputStream流 Read方法

    read()首先我们来看这个没有参数的read方法,从(来源)输入流中(读取的内容)读取数据的下一个字节到(去处)java程序内部中,返回值为0到255的int类型的值,返回值为字符的ACSII值(如 ...

  5. Spring配置之标签的三两事

    今天看到项目的配置,看后就当是复习了.懵懵懂懂工作两年,感觉虽然自己一直在使用spring作为工具,但是也没有涉及到spring的方方面面,今天的研究从一次无意的自动补全开始,还是那句话,不爱研究的程 ...

  6. .net core+Spring Cloud学习之路 二

    前言: 原本计划这次写一下搭建eureka群集.但是发现上次写的只是服务的注册,忘了写服务的发现,所以这次先把服务发现补上去. 我们基于上篇文章,再新建两个.net core web api项目,分别 ...

  7. mysql 中文支持

    show variables like 'character%';  SHOW VARIABLES LIKE 'collation_%'; recommend to use utf8mb4 inste ...

  8. 0. General-purpose tools (通用工具 8个)

    http://en.wikipedia.org/wiki/Netcat这个简单的实用程序通过TCP或UDP网络连接读写数据. 它被设计为一个可靠的后端工具,可以直接或轻松地使用其他程序和脚本驱动. 同 ...

  9. ubuntu 主题和zsh终端

    ubuntu 主题和zsh终端 1) sudo apt-get install unity-tweak-tool  sudo add-apt-repository ppa:noobslab/theme ...

  10. QCAD 怎么把多余的线剪掉

    QCAD 怎么把多余的线剪掉 如下所示如果我在 AutoCAD 中我是使用 Trim 的功能,但是在 QCAD 似乎不可行. 然后现在以上而有个 Divide,感觉有用,相当于线打断,然后再删除,这个 ...