MyBatis框架在数据持久层中的应用研究  被引量:19

Application Research of MyBatis Framework in Data Persistence Layer

在线阅读下载全文

作  者:欧阳宏基 葛萌 程海波 OUYANG Hongji;GE Meng;CHENG Haibo(Computer College,Xianyang Normal University,Xianyang 712000,China)

机构地区:[1]咸阳师范学院,计算机学院,陕西咸阳712000

出  处:《微型电脑应用》2023年第1期73-75,共3页Microcomputer Applications

基  金:咸阳师范学院专项科研计划项目(XSYK19021,XSYK19054);咸阳师范学院教学改革研究项目(2019Y015);咸阳师范学院2020年省级大学生创新创业训练计划项目(S202010722036)。

摘  要:针对原生JDBC在数据持久层开发中存在的硬编码、结果集与对象映射繁琐等缺点,提出了基于MyBatis框架的数据持久层开发方案。分析了MyBatis框架的核心组件及功能,阐述了开发DAO的两种实现方法,结合目标考核管理系统的实际需求,详细描述了MyBatis框架的具体应用过程。实践表明MyBatis框架简化了DAO的开发,解耦合了SQL语句与Java代码,省略了查询结果集与POJO对象的映射过程,能够提高数据持久层的开发效率。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.

关 键 词:MyBatis框架 JDBC 数据持久层 DAO设计模式 结果集映射 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象