| 15,976 | 50 | 437 |
| 下载次数 | 被引频次 | 阅读次数 |
针对原生JDBC在数据持久层开发中存在的硬编码、结果集与对象映射繁琐等缺点,提出了基于MyBatis框架的数据持久层开发方案。分析了MyBatis框架的核心组件及功能,阐述了开发DAO的两种实现方法,结合目标考核管理系统的实际需求,详细描述了MyBatis框架的具体应用过程。实践表明MyBatis框架简化了DAO的开发,解耦合了SQL语句与Java代码,省略了查询结果集与POJO对象的映射过程,能够提高数据持久层的开发效率。
Abstract:There are some shortcomings in using native JDBC to develop data persistence layer, such as hard coding, the tedious mapping between result set and object. Therefore, the paper proposes a data persistence layer development scheme based on MyBatis framework. It analyzes the core components and functions of MyBatis framework, and describes two implementation methods of developing DAO, it describes the application process of MyBatis framework detailly according to the actual requirements of the target assessment management system. Practice shows that MyBatis framework simplifies the development of DAO, decouples SQL statements and Java code, omits the mapping between query result set and POJO object, and improves the development efficiency of data persistence layer.
[1] 韩兵,沈冲,方英兰.基于JDBC的缓存数据细粒度管理的研究[J].计算机技术与发展,2019,29(12):66-71.
[2] 曾国林,傅秀芬.一种新的数据库连接池模型的研究[J].计算机与数字工程,2011,39(2):163-166.
[3] 张旭刚,张昕,高若寒.基于Spring Boot与MyBatis框架构建动态读写分离模型[J].微型电脑应用,2021,37(2):84-86.
[4] 荣艳冬.关于Mybatis持久层框架的应用研究[J].信息安全与技术,2015,6(12):86-88.
[5] 陈欣.基于java三层构架的管理信息系统中DAO层的构建探索[J].科技资讯,2015,13(11):26-27.
[6] 欧阳宏基,葛萌.Java EE数据初始化应用中的设计模式解决方案[J].计算机系统应用,2019,28(4):188-193.
[7] 欧阳宏基,宋笑雪,李红.高等院校目标考核信息化框架研究[J].计算机技术与发展,2018,28(10):182-187.
[8] 邵全勇,雒海东.基于JavaEE的旅游电子商务平台的设计与实现[J].自动化仪表,2020,41(10):67-69.
[9] 蔡创.基于Spring和Hibernate的在线教学系统的研究与实现[J].自动化与仪器仪表,2019(7):216-218.
[10] 刘松.基于设计模式的校园网异构数据整合方案研究[J].吉林师范大学学报(自然科学版),2011,32(4):105-107.
基本信息:
中图分类号:TP311.13
引用信息:
[1]欧阳宏基,葛萌,程海波.MyBatis框架在数据持久层中的应用研究[J].微型电脑应用,2023,39(01):73-75.
基金信息:
咸阳师范学院专项科研计划项目(XSYK19021;XSYK19054); 咸阳师范学院教学改革研究项目(2019Y015); 咸阳师范学院2020年省级大学生创新创业训练计划项目(S202010722036)
2023-01-20
2023-01-20