MyBatisJPAExtra:世界杯买球平台

本文摘要:2021买球平台,世界杯买球平台,MyBatisJPAExtraMyBatisJPAExtra对MyBatis开展了JPA拓展,致力于根据JPA2.1的注释简单化对单表CUID实际操作,依据JPA注释动态性转化成SQL句子;应用Interceptor完成数据库查询SELECT分页查询,兼容多种多样数据库查询;此外出示mybatis-jpa-extra-spring-boot-starter简单化SpringBoot集成化。

2021买球平台

MyBatisJPAExtraMyBatisJPAExtra对MyBatis开展了JPA拓展,致力于根据JPA2.1的注释简单化对单表CUID实际操作,依据JPA注释动态性转化成SQL句子;应用Interceptor完成数据库查询SELECT分页查询,兼容多种多样数据库查询;此外出示mybatis-jpa-extra-spring-boot-starter简单化SpringBoot集成化。有关資源MyBatis网址MyBatisGitHub源代码1、JavaBean注释简易只适用6个注释EntityTableColumnIdGeneratedValueTransientGeneratedValue有3中对策AUTOuuiduuid.hexserialSEQUENCEgenerator值为数据库查询编码序列名IDENTITYgenerator无,.;;;;;;;;.;/*IDvarchar40notnull,NAMEvarchar60notnull,STATUSchar1null,CREATEBYvarchar40null,CREATEDATEdatenull,UPDATEBYvarchar40null,UPDATEDATEdatenull,constraintPK_ROLESprimarykeyclusteredID*//***authorCrystal.Sea**/EntityTablename="STUDENTS"publicclassStudentsextendsJpaBaseDomainimplementsSerializable{/****/privatestaticfinallongserialVersionUID=-6928570405840778151L;IdColumnGeneratedValuestrategy=GenerationType.AUTO,generator="serial"//GeneratedValuestrategy=GenerationType.SEQUENCE,generator="SEQ_MYBATIS_STUD"//GeneratedValuestrategy=GenerationType.IDENTITY,generator="SEQ_MYBATIS_STUD"privateStringid;ColumnprivateStringstdNo;ColumnprivateStringstdName;ColumnprivateStringstdGender;ColumnprivateintstdAge;ColumnprivateStringstdMajor;ColumnprivateStringstdClass;publicStudents{super;}publicStringgetStdNo{returnstdNo;}publicvoidsetStdNoStringstdNo{this.stdNo=stdNo;}publicStringgetStdName{returnstdName;}publicvoidsetStdNameStringstdName{this.stdName=stdName;}publicStringgetStdGender{returnstdGender;}publicvoidsetStdGenderStringstdGender{this.stdGender=stdGender;}publicintgetStdAge{returnstdAge;}publicvoidsetStdAgeintstdAge{this.stdAge=stdAge;}publicStringgetStdMajor{returnstdMajor;}publicvoidsetStdMajorStringstdMajor{this.stdMajor=stdMajor;}publicStringgetStdClass{returnstdClass;}publicvoidsetStdClassStringstdClass{this.stdClass=stdClass;}publicStringgetId{returnid;}publicvoidsetIdStringid{this.id=id;}OverridepublicStringtoString{return"Students[stdNo=" stdNo ",stdName=" stdName ",stdgender=" stdGender ",stdAge=" stdAge ",stdMajor=" stdMajor ",stdClass=" stdClass "]";}}2、单表增加、改动、删掉、.jpa.test;;;;;..service.StudentsService;..Students;.;;;;;.ApplicationContext;.support.ClassPathXmlApplicationContext;publicclassMyBatisTestRunner{privatestaticfinalLogger_logger=LoggerFactory.getLoggerMyBatisTestRunner.class;publicstaticApplicationContextcontext;publicstaticStudentsServiceservice;TestpublicvoidinsertthrowsException{_logger.info"insert...";Studentsstudent=newStudents;student.setStdNo"10024";student.setStdGender"M";student.setStdName"司马昭";student.setStdAge20;student.setStdMajor"政冶";student.setStdClass"4";service.insertstudent;Thread.sleep1000;service.removestudent.getId;}TestpublicvoidgetthrowsException{_logger.info"get...";Studentsstudent=service.get"921d3377-937a-4578-b1e2-92fb23b5e512";_logger.info"Students" student;}TestpublicvoidremovethrowsException{_logger.info"remove...";Studentsstudent=newStudents;student.setId"921d3377-937a-4578-b1e2-92fb23b5e512";service.removestudent.getId;}TestpublicvoidbatchDeletethrowsException{_logger.info"batchDelete...";ListidList=newArrayList;idList.add"8584804d-b5ac-45d2-9f91-4dd8e7a090a7";idList.add"ab7422e9-a91a-4840-9e59-9d911257c918";idList.add"12b7ceb8-573b-4f01-ad85-cfb24cfa007c";idList.add"dafd5ba4-d2e3-4656-bd42-178841e610fe";service.batchDeleteidList;}TestpublicvoidfindAllthrowsException{_logger.info"findAll...";_logger.info"findAll" service.findAll;}BeforepublicvoidinitSpringContext{ifcontext!=nullreturn;_logger.info"initSpringContext...";SimpleDateFormatsdf_ymdhms=newSimpleDateFormat"yyyy-MM-ddHH。

2021买球平台

世界杯买球平台


本文关键词:2021买球平台,世界杯买球平台

本文来源:2021买球平台-www.bracketpy.com

上一篇:2021买球平台|YunGouOS 个人支付接口 2.0.6 版本发布,个人支付宝商户支持花呗分期收款
下一篇:南安英都至翔云公路改造工程开工|2021买球平台
脚注信息

地址: 香港特别行政区香港市香港区奥用大楼718号    电话: 0514-497833784    传真: 099-99698063
2021买球平台,世界杯买球平台    E-mail: admin@bracketpy.com    备案号:港ICP备12688776号-9