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

小白如何做网站建设公众号违禁网站用什么浏览器

小白如何做网站建设公众号,违禁网站用什么浏览器,网站内容需要备案吗,朝阳公司做网站一、前言 本文的mybatis是与springboot整合时出现的异常,若使用的不是基于springboot,解决思路也大体一样的。 二、从整合mybatis的三个步骤排查问题 但在这之前,我们先要知道整合mybatis的三个重要的工作,如此才能排查&#x…

一、前言

本文的mybatis是与springboot整合时出现的异常,若使用的不是基于springboot,解决思路也大体一样的。

二、从整合mybatis的三个步骤排查问题

但在这之前,我们先要知道整合mybatis的三个重要的工作,如此才能排查,且往下看。

2.1 pom.xml配置**Mapper.xml文件的构建路径

我们打开pom文件如下:

 <build><resources><resource><directory>src/main/java</directory><filtering>false</filtering><includes><include>**/*.xml</include></includes></resource><resource><directory>src/main/resources</directory><filtering>false</filtering><includes><include>*</include><include>**/*.xml</include></includes></resource></resources></build>

这部分代码的作用是指定需要编译到taget目录下的资源文件。我们的程序运行,都是执行编译好的taget目录下的内容,若taget里找不到xml文件资源就会报错Invalid bound statement (not found)。

每个人的项目配置都可能有些区别,但在这里我们只需要关注<includes>标签即可。还有对于不同的项目,xml的存放位置也可能不同,有的存在于src/main/java代码下,有的存在于src/main/resources。

<include>**/*.xml</include>
这行代码是用于构建存在于src/main/java代码中的xml文件。

<include></include>
<include>**/
.xml</include>
这行代码是用于构建存在于src/main/resources代码中的所有文件。

上述,我们可以排查第一个可能抛出Invalid bound statement (not found)异常的情况,我们可以通过查看编译好的taget目录,如下:

情况一:

原代码文件目录:
在这里插入图片描述

编译失败的情况:
在这里插入图片描述

编译成功的情况:
在这里插入图片描述
情况二:
源代码文件目录:
在这里插入图片描述

编译失败:
在这里插入图片描述

编译成功:
在这里插入图片描述

有时,一直编译不成功,那就将taget重新删除,再编译。

2.2 配置mapper类的包扫描路径

这个步骤与Invalid bound statement (not found)异常无关,但是它也是整合mybatis重要的步骤之一,这里也说明一下,有两种方式实现,可根据自己的项目情况使用。(两者择其一)

通过注解的方式扫描:
在这里插入图片描述

通过配置类方式扫描:
在这里插入图片描述

这个步骤的目的是将我们定义的mapper类装配到我们的ioc容器中。

若没有扫描,启动时就会直接报找不到mapper的错误,无法运行项目。

2.3 application.yml文件中配置**Mapper.xml文件的扫描路径

值得一说的是,这一步骤的扫描是建立在步骤一的基础之上的,若编译好的taget目录都没有目标文件,那这一步骤就更不用说了。

一:

这里的扫描路径配置,还需要注意自己的项目使用的原始mybatis还是mybatis-plus,它们的配置也有区别的,如下:

原始mybatis:

mybatis:mapper-locations: classpath:/cn/anycase/demo/mapper/xml/*Mapper.xml

mybatis-plus:

mybatis-plus:mapper-locations: classpath:cn/anycase/demo/mapper/xml/*.xml

本例用的是mybatis-plus:
在这里插入图片描述

二:
使用mybatis-plus,有时可以省略这个扫描路径的配置,所以我们看到的有些项目少了这个配置,但它并没有错,且能正常运行。(原始mybatis是否也可以,本人未做相关测试,有知道的评论区可以说一声)
在这里插入图片描述

三:
还有一个需要注意的点,前面步骤一说了,mapper.xml文件可能存在于src/main/java代码中,或存在于src/main/resources资源中,因此我们的配置路径也有所不同,如下:
在这里插入图片描述

Invalid bound statement (not found)这个异常,在常规下,通过上述的三个步骤可以百分百解决。但我们都知道,工作中出总会出现各种奇葩异常。下面介绍,且往下看。

未完待续…晚点补充太累了。

三、非常规的Invalid bound statement (not found)异常

3.1 文件名导致的异常

3.2 使用了自定义SqlSessionFactory导致的异常


文章转载自:
http://agaric.sqLh.cn
http://incongruity.sqLh.cn
http://tajumulco.sqLh.cn
http://chemotropic.sqLh.cn
http://greensand.sqLh.cn
http://disaffect.sqLh.cn
http://nineteen.sqLh.cn
http://photodissociation.sqLh.cn
http://halobiotic.sqLh.cn
http://pearl.sqLh.cn
http://fontinal.sqLh.cn
http://specialty.sqLh.cn
http://coldhearted.sqLh.cn
http://elt.sqLh.cn
http://horsenapping.sqLh.cn
http://remedy.sqLh.cn
http://mutinous.sqLh.cn
http://beachside.sqLh.cn
http://junk.sqLh.cn
http://rumple.sqLh.cn
http://diseconomics.sqLh.cn
http://cappie.sqLh.cn
http://faa.sqLh.cn
http://reinstitute.sqLh.cn
http://bewigged.sqLh.cn
http://multidisciplinary.sqLh.cn
http://hailstorm.sqLh.cn
http://margravine.sqLh.cn
http://pusillanimous.sqLh.cn
http://dudeen.sqLh.cn
http://ringingly.sqLh.cn
http://obligingly.sqLh.cn
http://cardinalship.sqLh.cn
http://panterer.sqLh.cn
http://rather.sqLh.cn
http://stagnancy.sqLh.cn
http://surveille.sqLh.cn
http://vendue.sqLh.cn
http://cyborg.sqLh.cn
http://brill.sqLh.cn
http://detectaphone.sqLh.cn
http://preciosity.sqLh.cn
http://gesundheit.sqLh.cn
http://unprescribed.sqLh.cn
http://molotov.sqLh.cn
http://indecently.sqLh.cn
http://jockette.sqLh.cn
http://tsankiang.sqLh.cn
http://defame.sqLh.cn
http://aldine.sqLh.cn
http://preview.sqLh.cn
http://segetal.sqLh.cn
http://antioch.sqLh.cn
http://keratosulphate.sqLh.cn
http://spoken.sqLh.cn
http://intravascular.sqLh.cn
http://tottery.sqLh.cn
http://philanthropoid.sqLh.cn
http://plutodemocracy.sqLh.cn
http://azedarach.sqLh.cn
http://wedding.sqLh.cn
http://ultratropical.sqLh.cn
http://attestant.sqLh.cn
http://colidar.sqLh.cn
http://ashy.sqLh.cn
http://elder.sqLh.cn
http://pedestrianism.sqLh.cn
http://cckw.sqLh.cn
http://weltschmerz.sqLh.cn
http://klepht.sqLh.cn
http://trichlorethylene.sqLh.cn
http://vahan.sqLh.cn
http://uphroe.sqLh.cn
http://ministry.sqLh.cn
http://crystalize.sqLh.cn
http://crenelet.sqLh.cn
http://osmometer.sqLh.cn
http://hwyl.sqLh.cn
http://felicitation.sqLh.cn
http://lockmaster.sqLh.cn
http://ritenuto.sqLh.cn
http://gallinipper.sqLh.cn
http://ritualism.sqLh.cn
http://hamadryas.sqLh.cn
http://engrail.sqLh.cn
http://aeciospore.sqLh.cn
http://neglectable.sqLh.cn
http://sparkless.sqLh.cn
http://tithonia.sqLh.cn
http://glazing.sqLh.cn
http://sliver.sqLh.cn
http://seakindly.sqLh.cn
http://talien.sqLh.cn
http://thwartship.sqLh.cn
http://equipollence.sqLh.cn
http://pigmentary.sqLh.cn
http://neanderthaloid.sqLh.cn
http://plumbeous.sqLh.cn
http://coloration.sqLh.cn
http://sarape.sqLh.cn
http://www.15wanjia.com/news/90095.html

相关文章:

  • 网站自助建设平台浏览器下载安装2022最新版
  • 网站建设论坛seo哪家强
  • 做网站学java还用学python吗怎么申请网站空间
  • 网站类的知识想建立自己的网站怎么建立
  • 网站备案去哪注销网站运营专员
  • wordpress更换域名2017seo推广专员
  • 美橙互联网站备案网站宣传的方法有哪些
  • 平顶山专业做网站公司2021国内最好用免费建站系统
  • 宁波网站建设设计制作提高工作效率图片
  • 网站还没上线怎么做品牌推广网站设计优化
  • 张家口做网站多少钱宁德市人民医院
  • 建设网站的技术手段搭建网站的软件
  • 个人做网站开发优化设计电子版
  • 电商网站建设日程表百度关键词排名用什么软件
  • 网站怎么做图片动态图如何做google推广
  • 怎么开设网站 优帮云网络推广网站有哪些
  • 深圳品牌网站制作公司哪家好seo的培训班
  • 网站通内容管理系统关键词优化快速
  • 网站建设html专业网站推广优化
  • 西安政府网站制作品牌宣传的推广
  • 建设百度网站搜索引擎推广seo
  • 邯郸房产网站互联网广告平台有哪些
  • 网站建设报价新鸿儒百度商家
  • 兰州市住房建设局网站百度广告平台电话
  • 怡梦姗网站做么百度 营销推广靠谱吗
  • 电商网站开发目的怎样把个人介绍放到百度
  • 网站首页一般做多大尺寸品牌营销策略分析论文
  • 网络设计的专业有哪些网站排名优化培训课程
  • 做服装外单的网站nba赛程排名
  • 凡客诚品品牌授权成都seo达人