遇到这种错,我也很无奈。@Mapper注解也写了,但是,springboot就是不能把类放入容器内。

只能用@MapperScan()

用法:

@MapperScan(bsePackages=“xxx.xxx.xxx”)

eg:


@MapperScan(basePackages = "com.zut.xxp.niuke.dao")
//@ComponentScan(basePackages = {"com.zut.xxp.niuke.dao"})@SpringBootApplication
public class aNiukeApplication {public static void main(String[] args) {SpringApplication.run(NiukeApplication.class, args);}}

Consider defining a bean of type ‘com.zut.xxp.niuke.dao.DiscussDao‘ in your configuration.相关推荐

  1. Consider defining a bean of type ‘com.muses.taoshop.item.service.IItemService‘ in your configuration

    启动springboot项目遇到一个问题: 错误:Description: Field iItemService in com.muses.taoshop.web.controller.portal. ...

  2. springboot 启动项目报Consider defining a bean of type 'com.mooc.house.biz.service.XXX' in your config

    报错: Error starting ApplicationContext. To display the auto-configuration report re-run your applicat ...

  3. Consider defining a bean of type 'com.xxx.service.impl.xxxImpl' in your configuration

    面向接口编程,把Service层定义为接口,然后用另外一个类去实现这个接口,使用spring boot启动时报错 项目结构: controller层注入如下 @Autowired private Us ...

  4. SpringBoot Feign接口调用启动类异常Consider defining a bean of type ‘xxx‘ in your configuration.

    问题描述: Description:Field iDeptFeign in cn.ffcs.ints.modules.questionnaire.controller.QuestionnaireCon ...

  5. Consider revisiting the entries above or defining a bean of type 'org.springframework.data.redis……'

    Consider revisiting the entries above or defining a bean of type 'org.springframework.data.redis.con ...

  6. springboot 工程启动报错之Consider defining a bean of type ‘XXX’ in your configuration.

    一.前言: 使用springboot自动注入的方式搭建好了工程,结果启动的时候报错了!!!,错误如下图: Description:Field userEntityMapper in com.xxx.x ...

  7. Consider defining a bean of type ‘java.lang.String‘ in your configuration

    Consider defining a bean of type 'java.lang.String' in your configuration 总结了网上的几种解决方案: 1.多余的@autowi ...

  8. Consider defining a bean of type ‘com.xg.stupro.service.StudentService‘ in your configuration.

    1.运行sprring boot项目时,出现这个错误:Consider defining a bean of type 'com.xg.stupro.service.StudentService' i ...

  9. Spring Boot:Consider defining a bean of type ‘*.*.*‘ in your configuration解决方案

    Spring Boot:Consider defining a bean of type '*.*.*' in your configuration解决方案 参考文章: (1)Spring Boot: ...

最新文章

  1. 使用PHP导入Excel和导出数据为Excel文件
  2. 面向 CPython GIL 的多线程编程要点
  3. 使用锁实现多线程共用一个数据源
  4. RocketMQ的Producer详解之分布式事务消息(代码实现以及过程分析)
  5. 解决root用户登录Ubuntu12.04 LTS图形界面
  6. Eclipse设置Courier New字体
  7. 3005-基于二叉链表的二叉树最大宽度的计算(附思路,注释,可能错误分析)
  8. 基础编程题目集 6-11 求自定类型元素序列的中位数 (25 分)
  9. python程序30行_Python30行代码实现对pdf文字内容的提取
  10. 微信开发者工具构建npm
  11. iOS 友盟分享(微信)
  12. 港科夜闻丨香港科大团队最新研究:双色发射AIEgen用于无标记特异性识别dsDNA和SNPs检测...
  13. 微信小程序赞赏功能,非微信赞赏功能
  14. cv::Mat转换为QImage错误
  15. 设计师都在用的素材网站,真的纯免费,还能商用
  16. html5手机端页面缩放问题的解决
  17. 吃了老边饺子,感觉比大清花好吃,呵呵
  18. 铨顺宏RFID:物联网对普通人有什么影响,RFID发挥了什么作用
  19. 基于PEview分析PE文件(4-3)
  20. 5G和边缘计算如何赋能安防行业

热门文章

  1. 知乎发现页面抓取(只改User-Agent爬虫)
  2. sourceTree 变基
  3. 【c++】模板类继承模板类
  4. 如何在Word文档中同时为中文和西文分别设置不同字体
  5. 计算机教学中扩词扩句的应用,扩词练习题
  6. Delphi RAD Studio 10.4.2 Sydney的新增与改进介绍(上)
  7. Dapp开发利器--Truffle三剑客之Ganache
  8. kafka 中参数:session.timeout.ms 和 heartbeat.interval.ms的区别
  9. 创造与魔法java语言_《创造与魔法》食谱大全
  10. 基于开源产品的sftp Cluster 集群方案