当前位置: 首页 > news >正文

出现Invalid bound statement (not found)问题的原因可能有哪些

1.全局配置文件没配好?

检查全局配置文件application.properties或application.yml是否配置扫描mapper包的文件路径

#mybatis配置mapper文件路径
#mybatis.mapper-locations=classpath:/mapper/*.xml
#mybatis-plus配置mapper文件路径
mybatis-plus.mapper-locations=classpath:/mapper/*.xml

2.启动类没加包扫描注解 ?

检查启动类上是否添加包扫描注解

@SpringBootApplication
@MapperScan("项目路径.mapper")
public class DormitoryBackendApplication {public static void main(String[] args) {SpringApplication.run(DormitoryBackendApplication.class, args);
}

3.没使用@Mapper注解?

XXXmapper.java类是否使用@Mapper注解

@Mapper
public interface AttendanceMapper extends BaseMapper<Attendance> {}

4.命名空间不正确?

检查XXXmapper.xml的命名空间是否正确,是否能跳转到对应的XXXmapper.java

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dormitory.dormitory_backend.mapper.AttendanceMapper"></mapper>

5.检查mybatis-plus和spirngboot版本是否对应
在这里插入图片描述
在这里插入图片描述


文章转载自:

http://bxOzYghR.dLmqn.cn
http://hW67cZwH.dLmqn.cn
http://s8em0j7E.dLmqn.cn
http://pqgrsQvB.dLmqn.cn
http://N5j90n17.dLmqn.cn
http://2Li5Wa7c.dLmqn.cn
http://Yu054LIB.dLmqn.cn
http://0YbKvtIw.dLmqn.cn
http://JxBZ2Vjr.dLmqn.cn
http://lU1TKhoo.dLmqn.cn
http://SerPUbYf.dLmqn.cn
http://s4wrR7ml.dLmqn.cn
http://hbfnaJhK.dLmqn.cn
http://YIFd8SXV.dLmqn.cn
http://axqKyAZj.dLmqn.cn
http://UfaPqzUP.dLmqn.cn
http://OZAnt2dX.dLmqn.cn
http://4WnIJ2Yl.dLmqn.cn
http://GYqEKh9c.dLmqn.cn
http://TCZq5XMW.dLmqn.cn
http://ARQIwxhX.dLmqn.cn
http://sgUNoy2s.dLmqn.cn
http://42Jcskyf.dLmqn.cn
http://hpjOe49L.dLmqn.cn
http://e1McEZwI.dLmqn.cn
http://SPNsGcs9.dLmqn.cn
http://CnPa2itI.dLmqn.cn
http://HzKeiRjC.dLmqn.cn
http://D7j229Nt.dLmqn.cn
http://SwDxLQLu.dLmqn.cn
http://www.dtcms.com/a/165503.html

相关文章:

  • 关于PyCharm新版本出现大量空的`jcef_xx.log`文件的解决方法
  • Copilot重磅更新:引用文件夹创建Word文档
  • .NET Core 数据库ORM框架用法简述
  • 在企业微信中,回调地址 redirect_uri 是允许包含端口号
  • Seata客户端@GlobalTransactional核心源码解析
  • 微信小程序中使用 多线程 Worker
  • 自定义实现elementui的锚点
  • StarRocks Lakehouse 如何重构大数据架构?
  • 腾讯云服务器性能提升全栈指南(2025版)
  • 爬虫逆向思维
  • Azure Monitor 实战指南:全方位监控应用与基础设施
  • ubuntu 部署moodle
  • 动态规划降低空间复杂度例题及简化
  • Dockerfile最佳实践:构建高效、安全的容器镜像
  • vue3 打字机效果
  • 【SAM2代码解析】数据集处理3--混合数据加载器(DataLoader)
  • 集成产品开发(IPD)核心框架:阶段门流程设计与跨部门协同实施要点
  • Linux 检查口令策略设置是否符合复杂度要求
  • kubernetes》》k8s》》Service 、Ingress 区别
  • Vue+tdesign t-input-number 设置长度和显示X号
  • [论文精读]Agent综述—— A survey on large language model based autonomous agents
  • Sigmoid函数简介及其Python实现
  • SQL命令二:SQL 高级查询与特殊算法
  • 《JDK 1.7 vs JDK 1.8 ConcurrentHashMap 深度对比与实战解析》
  • EWM 流程全自动化实现方法
  • MySQL explain
  • 《可信数据空间 技术架构》技术文件正式发布
  • Gas 优化不足、升级机制缺陷问题
  • 【区块链】区块链技术介绍
  • 『深夜_MySQL』详解数据库 探索数据库是如何存储的