Wrong namespace. Expected 'cn.itheima.dao.CustomerMapping' 错误
我今天在写一个ssm项目的时候,本来写得好好的可以运行,结果今天下午我在写修改功能的时候,遇到一个bug,给大家看一下如图:
就是这个错误,我找了一个下午了,后来在一名博友的文章上面找到了答案,解决如下:
1.遇到错误,先来翻译这句话,Wrong namespace. Expected 'cn.itheima.dao.CustomerMapping' ,这句话的意思是,错误的名称空间,预计可能在cn.itheima.dao.CustomerMapping的错误。
2.接下来肯定是去找这个名称空间了呗,既然是名称空间,那肯定是在.xml的文件里面,所以我就去找CustomerMapping.xml,里面的<mapper namespace="cn.itheima.dao.CustomerMapping"></mapper>
3.错误果然在这里,原因是我在namespace=“”的时候,后面多了一个空格,是的,你没看错,是空格,结果就这个空格白白浪费了我一个下午的时间,在这里提醒广大猿友,写代码时用心不要多敲了一个空格,要绝对专注,不要因为一个小小的小错误导致整个程序不能运行,不仅浪费时间也浪费发布的日期。
4.接下来运行,没报错了:截图:
并且能成功运行:
Wrong namespace. Expected 'cn.itheima.dao.CustomerMapping' 错误相关推荐
- No qualifying bean of type ‘com.itheima.dao.BookDao1‘ available: expected single matching bean 问题解决
写代码的时候出现了如下错误,错误原因如下: Mybatis装载了com.itheima.dao包下的所有bean,自然也包括BookDao1,而spring又装载了 com.itheima.dao ...
- org.hibernate.TypeMismatchException: Provided id of the wrong type for class cn.itheima.domain.Custo
错误: org.hibernate.TypeMismatchException: Provided id of the wrong type for class cn.itheima.domain.C ...
- Mybatis 报错 The error may involve cn.changemax.dao.FilmInfoDAO.batchUpdate-Inline
一.错误主题: 2020-02-07 22:37:43.596 ERROR 12612 --- [ scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHand ...
- 微信根据Media_id下载录音报错readfile(): Peer certificate CN=`mp.weixin.qq.com‘ did not match expected CN=`file
今天遇到一个问题,微信jssdk开发获取用户录音,后台根据media_id下载用户录音突然出错,之前一直好好的,错误如下 <br /> <b>Warning</b> ...
- 成功解决python中出现的IndentationError: expected an indented block的错误
成功解决python中出现的IndentationError: expected an indented block的错误 目录 解决问题 解决思路 解决方法 解决问题 当在python中出现这个错误 ...
- 文章标题 execution(* cn.sxt.dao.impl.*.*(..))解释
首先说这是在配置事物管理中出现的通配符: <-----------------> execution(* cn.sxt.dao.impl..(..)) 第一个* 表示任何返回值: 第二个* ...
- Expected required, optional, or repeated.错误解决方法
Expected "required", "optional", or "repeated".错误解决方法 编译Protobuf 库,出现如 ...
- BindingException: Mapper method ‘com.itheima.dao.BookDao.update‘ has an un unsupported return
最近在做SSM框架整合时,遇到这样的问题,由于是跟着B站完整的过流程,但是也遇到了个各种小问题,跟着报错路径,挨个调试,终于调通了,这个问题是最后调试成功前的最后一个问题,其他的忘记记录了. 一直在查 ...
- SyntaxError: expected expression, got ‘<‘异常错误
SyntaxError: expected expression, got '<'异常错误 参考文章: (1)SyntaxError: expected expression, got '< ...
最新文章
- 万粉博主推荐,微信小程序 +Flask 后端调用 AnimeGanV2
- 如何使用工具包 (NLTK) 开发NLP 项目?(附教程)
- JS基础篇--HTML DOM classList 属性
- SQL Server游标的使用【转】
- 代码审计-四叶草杯线下awd比赛源码web2
- 走出去广东谋定国际丰收节贸易会-林裕豪:从玉农业抓手
- 5.intent_activity
- JAVA引用和垃圾回收
- 了解ADF生命周期中的ADF绑定
- VMware 报错:“另一个程序已锁定文件的一部分,进程无法访问”---Linux运维工作笔记051
- SecureCRT连接阿里云ECS服务器,经常掉线的解决方案
- 小白Linux入门之:CentOS基础命令
- Flash小游戏星空大战SpaceBattleGame 源代码
- MySQL 高级SQL语句
- 哈夫曼编码C++实现
- 新手微商代理怎么推广产品 微商大咖分享方法值得借鉴
- 01背包与完全背包详解
- 计算机主板维修试卷,计算机主板维修试卷.doc
- ios 图片加载内存尺寸_iOS内存分析上-图片加载内存分析
- Linux 内核clk 硬件相关层
热门文章
- 执行若依(ruoyi)项目
- java关于ServletConfig FilterConfig什么用
- python中函数的定义_Python函数是什么_如何定义和调用函数?
- Vue中watch、computed、updated三者的区别以及使用方法
- matlab自带的音乐,MATLAB乐器(如何用matlab演奏音乐)
- GitBook运行报错 - Error: ENOENT: no such file or directory, stat
- 如何理解电商的B2B模式与B2C模式
- UVa 1616 - Caravan Robbers
- Darknet框架解读
- 富文本编辑器Ueditor实战(二)-图片上传