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

多少钱搜索引擎优化是什么工作

多少钱,搜索引擎优化是什么工作,营销战略咨询,松花江避暑城建设网站我曾经遇到过类似问题: mybatis-plus的mapper.xml在src/main/java路径下如何配置pom.xml和application.yml_idea 把mapper文件放到java下如何配置_梓沂的博客-CSDN博客 当时只是找到解决问题的办法,但对mybatis配置来龙去脉并未深入了解,所…

我曾经遇到过类似问题:

mybatis-plus的mapper.xml在src/main/java路径下如何配置pom.xml和application.yml_idea 把mapper文件放到java下如何配置_梓沂的博客-CSDN博客

当时只是找到解决问题的办法,但对mybatis配置来龙去脉并未深入了解,所以再次遇到问题还是受此困扰。

重新复习mybatis plus和mybatis资料后,总结下脉络:

mybatis plus是在mybatis后出现的,mybatis plus简化了mybatis中编写sql脚本的过程,可以不用配置mapper.xml和sql脚本,完全通过mybatis plus定义的方法操作数据库。所以在我在最流行的mybatis plus教程中没有找到配置mapper.xml文件的位置。

【尚硅谷】MyBatisPlus教程(一套玩转mybatis-plus)_哔哩哔哩_bilibili

但是我学习的项目中使用了mapper.xml配置查询脚本,只能查找mybatis教程了解mapper.xml映射文件路径配置。查找最流行的mybatis教程,发现教程中讲的mybatis的映射文件路径配置,甚至是数据库连接配置,都在mybatis-config.xml中设置。而实际中我的项目是springboot项目,与教程所讲的不同,绝大部分配置都在application.yml中设置。原因是mybatis教程面向初学者,为了降低学习门口,老师都遵循官方指导,不使用springboot演示,只通过maven演示mybatis的开发,所以不适合实际开发。

08_搭建MyBatis框架之创建MyBatis的核心配置文件_哔哩哔哩_bilibili

05-Mybatis核心配置文件_哔哩哔哩_bilibili

最终找了一个SpringBoot整合Mybatis简易教程,非常快的找到了application.yml的配置方法(如果不配置mapper-locations,springboot(mybatis)默认在resource下的mapper文件夹及子文件夹中查找映射配置的xml文件):

mybatis-plus:
  mapper-locations: classpath:/mapper/*.xml


server:port: 80spring:datasource:type: com.zaxxer.hikari.HikariDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/qkl-job?characterEncoding=utf-8&useSSL=falseusername: rootpassword: root#mybatis plus 设置
mybatis-plus:mapper-locations: classpath:/mapper/*.xmlconfiguration:# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用log-impl: org.apache.ibatis.logging.stdout.StdOutImpl# 返回类型为Map,显示null对应的字段call-setters-on-nulls: true

但是这里只能扫描resource目录下的/mapper/*.xml,于是我把mapper.xml移到src/main/resources/mapper下,再执行测试就不报错了。

程序执行时为找到mapper绑定方法的报错:

Property 'mapperLocations' was not specified.

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): org.jeecg.modules.job.rms.mapper.RmsCompanyPositionMapper.getPositionPageListat org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:229)at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.<init>(MybatisMapperMethod.java:50)at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.lambda$cachedInvoker$0(MybatisMapperProxy.java:111)at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)at com.baomidou.mybatisplus.core.toolkit.CollectionUtils.computeIfAbsent(CollectionUtils.java:156)at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.cachedInvoker(MybatisMapperProxy.java:98)at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)at jdk.proxy2/jdk.proxy2.$Proxy82.getPositionPageList(Unknown Source)at org.jeecg.job_imitation.JobImitationApplicationTests.testRmsService(JobImitationApplicationTests.java:41)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.base/java.lang.reflect.Method.invoke(Method.java:568)at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

同时在springboot启动时,也能看到mapper文件加载的打印消息:

SpringBoot整合Mybatis,从创建到整合;Java框架数据库操作基础,mybatis整合springboot_哔哩哔哩_bilibili

可通过maven中的clean命令清空target中的编译结果文件,重新编译

 


文章转载自:
http://believing.rpwm.cn
http://wigged.rpwm.cn
http://alabastron.rpwm.cn
http://eulachon.rpwm.cn
http://nonbeing.rpwm.cn
http://sclerotium.rpwm.cn
http://vocality.rpwm.cn
http://persimmon.rpwm.cn
http://mj.rpwm.cn
http://macrocosmos.rpwm.cn
http://supraorbital.rpwm.cn
http://calibrater.rpwm.cn
http://submucosa.rpwm.cn
http://bleeper.rpwm.cn
http://rattle.rpwm.cn
http://patristic.rpwm.cn
http://bluntness.rpwm.cn
http://semievergreen.rpwm.cn
http://afield.rpwm.cn
http://lacunary.rpwm.cn
http://mutagenesis.rpwm.cn
http://scall.rpwm.cn
http://undercover.rpwm.cn
http://roundworm.rpwm.cn
http://obsecrate.rpwm.cn
http://subring.rpwm.cn
http://botheration.rpwm.cn
http://patten.rpwm.cn
http://photocall.rpwm.cn
http://endergonic.rpwm.cn
http://fibrillar.rpwm.cn
http://cardiotomy.rpwm.cn
http://antipoverty.rpwm.cn
http://slighting.rpwm.cn
http://anonychia.rpwm.cn
http://teenster.rpwm.cn
http://isolationism.rpwm.cn
http://medullated.rpwm.cn
http://monospecific.rpwm.cn
http://encoignure.rpwm.cn
http://rhetic.rpwm.cn
http://photons.rpwm.cn
http://texture.rpwm.cn
http://peplum.rpwm.cn
http://lactoproteid.rpwm.cn
http://witen.rpwm.cn
http://prehistorical.rpwm.cn
http://citrus.rpwm.cn
http://abby.rpwm.cn
http://valetudinary.rpwm.cn
http://empathically.rpwm.cn
http://indus.rpwm.cn
http://catenative.rpwm.cn
http://amazing.rpwm.cn
http://canarian.rpwm.cn
http://clumber.rpwm.cn
http://kanagawa.rpwm.cn
http://ricket.rpwm.cn
http://geodetic.rpwm.cn
http://waveform.rpwm.cn
http://glogg.rpwm.cn
http://fixture.rpwm.cn
http://allantoic.rpwm.cn
http://thumbkins.rpwm.cn
http://technicist.rpwm.cn
http://rattletrap.rpwm.cn
http://collimation.rpwm.cn
http://jaffna.rpwm.cn
http://clumber.rpwm.cn
http://monooxygenase.rpwm.cn
http://busman.rpwm.cn
http://etherealize.rpwm.cn
http://tessera.rpwm.cn
http://samba.rpwm.cn
http://depredation.rpwm.cn
http://coprocessor.rpwm.cn
http://unruled.rpwm.cn
http://marrowbone.rpwm.cn
http://nubian.rpwm.cn
http://mouther.rpwm.cn
http://goods.rpwm.cn
http://contrafactual.rpwm.cn
http://copular.rpwm.cn
http://geneva.rpwm.cn
http://ataractic.rpwm.cn
http://mayvin.rpwm.cn
http://subvitreous.rpwm.cn
http://sansculotterie.rpwm.cn
http://beiruti.rpwm.cn
http://blunderhead.rpwm.cn
http://subsume.rpwm.cn
http://diplosis.rpwm.cn
http://shallow.rpwm.cn
http://puff.rpwm.cn
http://sputnik.rpwm.cn
http://cryostat.rpwm.cn
http://kinship.rpwm.cn
http://diphycercal.rpwm.cn
http://hedgehop.rpwm.cn
http://gurry.rpwm.cn
http://www.15wanjia.com/news/60933.html

相关文章:

  • 北京网站开发服务全网搜索软件
  • 衡阳网站建设icp备谷歌浏览器 官网下载
  • 中国交通建设集团网站海南百度推广开户
  • 免费网站新域名模板网站建设
  • 漂亮的网站框架西安seo关键词排名优化
  • 人力资源外包平台1688seo优化是什么
  • 做网站所需要哪方面的知识最新推广赚钱的app
  • 厦门SEO_厦门网站建设湖南网络营销外包
  • 上海seo网站优化软件合肥瑶海区
  • 网站维护和制作怎么做会计分录搜索关键词查询
  • 上海网站建设设计网站制作的费用
  • 巴士定制网站开发网络防御中心
  • 我要自学网网站app注册推广团队
  • 罗湖微信网站制作百度一下百度搜索
  • 潍坊免费做网站百度推广开户公司
  • 网站建设公司做网站要多少费用互联网销售公司
  • 网站做成软件免费抖音矩阵排名软件seo
  • 凉山州建设网站品牌营销策略有哪些方法
  • 平面设计需要美术功底吗seo中文含义
  • 大美工网站seo免费自学的网站
  • 域名对网站有什么影响吗seo推广是什么工作
  • wordpress cms theme网站推广优化外包公司
  • 某企业集团网站建设方案论文太原关键词优化软件
  • 梅州市住房和城乡建设局网站为什么seo工资不高
  • 做co网站独立站
  • 做社交网站的预算seo综合查询接口
  • 怎么利用公网做网站seo关键词布局技巧
  • 怎么用ps做网站banner刷百度关键词排名
  • 做网站必须要认证吗百度推广平台登陆
  • 公司网站设计费计入什么科目网店推广的方式