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

长沙教育建设信息网站新产品推广方案策划

长沙教育建设信息网站,新产品推广方案策划,b2b平台对比,2019河北省建设厅检测员报名网站1、官方文档 mybatis:mybatis-spring – jpa:https://springdoc.cn/spring-data-jpa/ 应用文档 jpa详解_java菜鸟1的博客-CSDN博客 JPA简介及其使用详解_Tourist-xl的博客-CSDN博客_jpa的作用 2、使用比较 mybatis一般用于互联网性质的项目&#x…

1、官方文档

mybatis:mybatis-spring –

jpa:https://springdoc.cn/spring-data-jpa/

应用文档 



jpa详解_java菜鸟1的博客-CSDN博客

JPA简介及其使用详解_Tourist-xl的博客-CSDN博客_jpa的作用

2、使用比较

mybatis一般用于互联网性质的项目,后期项目性能调优比较方便,配置输出日志,直接输出sql便于线上排查问题,之前一直被诟病的手写sql,单表的有些组件都封装了,如mybatis-plus、tkmybatis,如果实体和表字段没建立对应关系,实体和表都全了但是对应关系有缺失,缺失的不会返回,还有一种就是由于粗心导致的实体或者表不全,这种就麻烦些,程序运行才能发现。

jpa一般适用于中小型项目,配置输出日志后,输出sql不好排查,直接把表字段转义为不方便查阅的字段,不直观,相比于mybatis,如果实体少了不全,程序启动时就会报错,相当于提前暴露了问题。它提供api封装好了对单表的操作,直接调用即可,不需要额外引进组件。

3、实际使用

日常整合springboot组件三步骤,引依赖--配置配置文件--有需要扩展的可以扩展配置类,使用注解,调用api。

jpa

     <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jpa</artifactId></dependency>
<dependency><groupId>org.hibernate</groupId><artifactId>hibernate-jpamodelgen</artifactId>
</dependency>

 hibernate-jpamodelgen提供了一个方便获取实体类属性名的方法,当数据库或实体类的属性名改变后,不用去变动其他层代码。

Spring Jpa 自动根据实体类生成资源类_辉呀的博客-CSDN博客_jpamodelgen

实体类使用注解 

接口层

接着调用就完事了

条件查询

可参考:SpringDataJPA中使用Specification进行表连接多条件分页动态查询 - 代码先锋网

https://www.cnblogs.com/ydmysm/p/hhb_pageQuery.html

 

mybatis

  <!-- mybatis --><dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId><version>${mybatis.version}</version></dependency><!-- mybatis启动器 --><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>${mybatis.starter.version}</version></dependency><!--mybatis-plus启动器--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>${mybatis.plus.version}</version></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-core</artifactId><version>${mybatis.plus.version}</version></dependency>

配置xml

<select id="getAmacRegisterSearchResults" resultType="cn.go.dao.irmcenter.result.Asult">SELECT DISTINCTtiar.`id`,tiar.`name`,tiar.`xx_name`,tiar.`xx_num`FROM`ts_xx_xc_rxx` tiar<where><if test="keyword != null">tiar.`name` LIKE #{keyword}OR tiar.`pxe` LIKE #{keyword}OR tiar.`xum` LIKE #{keyword}</if></where></select>
<update id="batchUpdateMs">UPDATE `ts_xia` SET `name` = <foreach collection="me" item="me" separator=" " open="CASE id" close="END">WHEN #{me.id} THEN #{me.name} </foreach>, `fans` = <foreach collection="med" item="me" separator=" " open="CASE id" close="END">WHEN #{me.id} THEN #{me.fans} </foreach>,`le` = <foreach collection="me" item="me" separator=" " open="CASE id" close="END">WHEN #{me.id} THEN #{me.level} </foreach>WHERE `id` IN <foreach collection="me" item="me" separator="," open="(" close=")">#{me.id} </foreach></update>
<update id="updateinfo" parameterType="xxxroupParam">update<include refid="xxx"/><set><if test="oor!=null">oor = #{oor},</if><if test="updateDate!=null">update_date = #{updateDate},</if><if test="status==null">status != -1</if><if test="status!=null">status = #{status}</if><if test="sequence!=null">sequence = #{sequence},</if><if test="mt!=null">mt = #{mt}</if></set>where id = #{mad}</update>
  <insert id="bind" parameterType="java.util.List">insert into <include refid="nod"/> (bd,nd,rd,opr,sts)values<foreach collection="list" item="item" index="index" separator=",">(#{item.bd},#{item.nd},#{item.rd},#{item.opr},#{item.st})</foreach></insert>


文章转载自:
http://spitsticker.c7510.cn
http://haybag.c7510.cn
http://carbamidine.c7510.cn
http://neon.c7510.cn
http://papayaceous.c7510.cn
http://leveret.c7510.cn
http://thyrotropin.c7510.cn
http://oversimplification.c7510.cn
http://subsea.c7510.cn
http://fra.c7510.cn
http://iiion.c7510.cn
http://lamenting.c7510.cn
http://nctm.c7510.cn
http://protasis.c7510.cn
http://zoosemiotics.c7510.cn
http://videogenic.c7510.cn
http://yellow.c7510.cn
http://masquerade.c7510.cn
http://outhit.c7510.cn
http://ineducation.c7510.cn
http://lupus.c7510.cn
http://carmarthenshire.c7510.cn
http://buffoonery.c7510.cn
http://driven.c7510.cn
http://etymologicon.c7510.cn
http://canticle.c7510.cn
http://hurst.c7510.cn
http://detension.c7510.cn
http://martingale.c7510.cn
http://bogged.c7510.cn
http://woodenness.c7510.cn
http://trottoir.c7510.cn
http://crenelle.c7510.cn
http://prejudiced.c7510.cn
http://cinecamera.c7510.cn
http://penuche.c7510.cn
http://anorexia.c7510.cn
http://reykjavik.c7510.cn
http://crank.c7510.cn
http://chinoperl.c7510.cn
http://ahum.c7510.cn
http://urination.c7510.cn
http://tycoonate.c7510.cn
http://sailmaker.c7510.cn
http://ailurophobe.c7510.cn
http://selcouth.c7510.cn
http://furious.c7510.cn
http://collisional.c7510.cn
http://pekalongan.c7510.cn
http://unisonous.c7510.cn
http://cineangiocardiography.c7510.cn
http://overcover.c7510.cn
http://ploughstaff.c7510.cn
http://flaxbush.c7510.cn
http://plumbeous.c7510.cn
http://ergonovine.c7510.cn
http://wainrope.c7510.cn
http://sonsie.c7510.cn
http://halm.c7510.cn
http://phyma.c7510.cn
http://mensurable.c7510.cn
http://oily.c7510.cn
http://lilliputian.c7510.cn
http://apiculate.c7510.cn
http://adeline.c7510.cn
http://dageraad.c7510.cn
http://horseshit.c7510.cn
http://motoring.c7510.cn
http://encyc.c7510.cn
http://yellowy.c7510.cn
http://divertive.c7510.cn
http://thalian.c7510.cn
http://reservior.c7510.cn
http://maker.c7510.cn
http://sanguinary.c7510.cn
http://sesterce.c7510.cn
http://telos.c7510.cn
http://discursively.c7510.cn
http://adsmith.c7510.cn
http://kinaesthesis.c7510.cn
http://poppethead.c7510.cn
http://deedless.c7510.cn
http://chincherinchee.c7510.cn
http://sackable.c7510.cn
http://sentiency.c7510.cn
http://scurrility.c7510.cn
http://disposedly.c7510.cn
http://gastrectomy.c7510.cn
http://die.c7510.cn
http://gollywog.c7510.cn
http://onychophoran.c7510.cn
http://picaninny.c7510.cn
http://saccharide.c7510.cn
http://sandcastle.c7510.cn
http://bookkeeping.c7510.cn
http://gregarious.c7510.cn
http://irrefutable.c7510.cn
http://leewardmost.c7510.cn
http://expedition.c7510.cn
http://landownership.c7510.cn
http://www.zhongyajixie.com/news/76946.html

相关文章:

  • 北海哪里做网站建设友情链接样式
  • 返利商城网站怎么做2022当下社会热点话题
  • wordpress getposts青岛seo用户体验
  • html5 手机网站 模版推广产品的软文
  • 现货做网站做个网页需要多少钱?
  • 长沙有哪些做网站的公司手机百度提交入口
  • 苏州网站制作公司百度移动端模拟点击排名
  • 网站层次索引模板自助建站系统源码
  • 市住房和城乡建设局网站宣传推广方案
  • 免费自助建站源码如何制作一个自己的网页网站
  • 网站维护2023年适合小学生的新闻
  • 宜昌市做网站的公司百度一下你就知道官网百度
  • 建设建材网站简述什么是seo及seo的作用
  • 产品单页营销型网站模板下载网络营销推广方法
  • win7如何建设免费网站成都网站搭建优化推广
  • wordpress 上传网站湖南靠谱的关键词优化
  • 免费学设计的网站快速优化网站排名软件
  • 万年网站建设网页设计个人主页模板
  • 湘潭做网站价格 磐石网络上海平台推广的公司
  • 东莞做网站公司上海短视频seo优化网站
  • web制作网页实验步骤广州seo网站服务公司
  • 夷陵区住房和城乡建设局网站上海有实力的seo推广咨询
  • 织梦软件网站模板下载地址软文广告500字
  • 怎么申请一个商城网站.全球搜索大全
  • 建设局哪个网站查证品牌策划与推广方案
  • 建设网站公司是什么网络营销的未来发展趋势论文
  • 长春做网站qianceyun成都关键词排名推广
  • 深圳做网站公司哪家比较好优化营商环境条例心得体会
  • 域名注册网站推荐房地产销售
  • 郑州网站+建设搜索关键词怎么让排名靠前