搜索下面的错误信息得到解决方法

Unsatisfied dependency expressed through field 'userMapper'

项目结构如下

解决办法
在启动类中加入注解
里面填写的是mapper 的路径

@ComponentScan(basePackages={"com.example.demo.mapper"})

启动项目的问题已经解决,但是现在是404,没有找到文件

还是需要在启动类中包含进来controller的文件

@ComponentScan(basePackages={"com.example.demo.mapper","com.example.demo.controller"})

参考博客
SpringBoot 出现Whitelabel Error Page 解决办法

然后遇到的问题是:分页列表又是404

解决方法
注意pagehelper的版本

之前使用3.7.5,运行不报错误就是404,改成4.1.6之后开始报出html的语法错误,修改之后成功运行

<dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper</artifactId><version>4.1.6</version></dependency>

SpringBoot报错Unsatisfied dependency expressed through field userMapper和Whitelabel Error Page解决方案相关推荐

  1. mybatis报错Unsatisfied dependency expressed through field ‘baseMapper‘解决方案

    mybatis报错Unsatisfied dependency expressed through field 'baseMapper'解决方案 问题背景 解决方案一 解决方案二 Lyric: 管他管 ...

  2. 报错Unsatisfied dependency expressed through field ‘baseMapper‘解决

    项目使用SpringBoot + MyBatis Plus 项目使用MyBatis Plus的代码生成器自动生成pojo实体类.dao层.service层.controller层代码,在运行启动类时一 ...

  3. IDEA报错: ‘Unsatisfied dependency expressed through field ‘userDOMapper‘

    在进行Mybatis自动生成器的实验中出错,搞了半天才弄明白,在这里跟大家分享一下. 项目报错如下: D:\Java\jdk-8u241\bin\java.exe "-javaagent:D ...

  4. 关于SpringCloud报错Unsatisfied dependency expressed through field ‘propertySourceLocators的解决之一

    这里写目录标题 1. 问题简述 2. 报错显示 3. 问题说明 1. 问题简述 今天给大家看一下,关于SpringCloud报错,Unsatisfied dependency expressed th ...

  5. 报错 Unsatisfied dependency expressed through field ‘cruisePlanMapper‘ 解决方案

    错误信息 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ...

  6. springBoot 启动之后报错Unsatisfied dependency expressed through field ‘baseMapper’

    springBoot 启动之后报错Unsatisfied dependency expressed through field 'baseMapper' 框架:springboot+mybatispl ...

  7. 运行时报错Unsatisfied dependency expressed through field

    框架:springboot 技术:mybatis-plus 运行时报错Unsatisfied dependency expressed through field 解决办法或者原因 一,缺少@Mapp ...

  8. Unsatisfied dependency expressed through field ‘userMapper‘问题解决

    SSM框架练手,mapper层@Autowire创建bean怎么也不成功,报错:org.springframework.beans.factory.UnsatisfiedDependencyExcep ...

  9. Unsatisfied dependency expressed through field 'baseMapper'

    今天项目 springboot 1.* 升级到 2.0.4,以至于将 Mybatis-Plus 升级,springBoot 启动之后报错Unsatisfied dependency expressed ...

最新文章

  1. php7 数组与字符串,第7天 PHP字符串、数组
  2. mysql server-存储引擎
  3. c# 时间戳的精度(Datetime.now 与 Stopwatch)
  4. 南邮计算机专硕考研专业课,南京邮电大学(专业学位)计算机技术研究生考试科目和考研参考书目...
  5. phalapi-进阶篇3(自动加载和拦截器)
  6. Win10桌面上:[ 我的电脑 ] 图标不见了
  7. soapUI简介、安装使用教程、接口(性能)测试
  8. 华为路由器OSPF+RIP+静态路由配置实例
  9. VB text控件如何实现换行
  10. lenovo服务器换系统重装系统_电脑怎么重装系统lenovo
  11. Java 反射到底慢在哪?
  12. Windows清理C盘空间
  13. 网页放大缩小引起布局混乱_放大可能会引起关注
  14. flutter 自定义TabBar +自定义Indicator
  15. 银行卡支付之连连支付
  16. ABeam Insight (德硕)| Smart Conference ——让你的生意跨越语言障碍
  17. 配置MyBatis Plus 的乐观锁功能
  18. DELL R510服务器RAID配置,Dell服务器硬RAID配置
  19. APS生产排产软件的供应商
  20. 高性能零售IT系统的建设03-监控体系化的重要不亚于开发的投入

热门文章

  1. 数据库常用的基本操作
  2. 使用XSLT制作HTML邮件模板并发送
  3. WebService(1)名词了解
  4. 【数理知识】矩阵束 Matrix Pencil
  5. 1.13 总结-深度学习第三课《结构化机器学习项目》-Stanford吴恩达教授
  6. goahead content-length为0时的问题
  7. PIC单片机 电容式触摸检测
  8. 【CIC滤波器】基于MATLAB/FPGA的数字CIC滤波器的设计
  9. 陆基制导系统地面站布设策略
  10. android反编译的方法