当前位置:网站首页>Myormframeworkjdbc review and problem analysis of user-defined persistence layer framework, and thought analysis of user-defined persistence layer framework
Myormframeworkjdbc review and problem analysis of user-defined persistence layer framework, and thought analysis of user-defined persistence layer framework
2022-07-25 20:10:00 【51CTO】
JDBC Review and problem analysis

Design idea of custom persistence layer framework
End of use ( project )
- Introducing a custom persistence layer framework jar package
- Provides two parts of configuration information : Database configuration information 、sql Configuration information :sql sentence 、 Parameter type 、 The return value type uses the configuration file to provide these two parts of configuration information :
- sqlMapConfg.xml: Store database configuration information , Deposit mapper.xml The full path of
- mapper.xml: Deposit sql Configuration information
Customize the persistence layer framework itself ( engineering )
The essence is right JDBC The code is encapsulated
- Load profile : According to the path of the configuration file , Load configuration file into byte input stream , Stored in memory
establish Resources Class method :InputSteam getResourceAsSteam(String path)
- Create two javaBean:( Container object )∶ What is stored is the content parsed from the configuration file
Configuration: Core configuration class : Deposit sqIMapConfg.xml What's coming out of it
MappedStatement: Mapping configuration class : Deposit mapper.xml What's coming out of it
- Parse configuration file : dom4j
Create a class :SqlSessionFactoryBuilder Method :build(InputSteam in)
First of all : Use dom4j Parse configuration file , Encapsulate the parsed content into the container object
second : establish SqlSessionFactory object ; production sqlSession : Conversation object ( Factory mode )
- establish SqlSessionFactory Interface and implementation class DefaultSqISessionFacotry
openSession(): production sqlSession
- establish SqlSession Interface and implementation class DefaultSession
Define the database crud operation : selectList()
selectOne()
update()
delete()
insert()
- establish Executor Interface and implementation class SimpleExecutor Implementation class
query(Confguration,MappedStatement,Object… params): What we're doing is JDBC Code
This is the end of this article ,
If you have any harvest, you are welcome to like, collect and pay attention to ️, Your encouragement is my biggest motivation .
If you have any wrong questions, you are welcome to point out .
Home page : Share a cup of no blog summaryKeep loving , Go to the next mountain and sea .

边栏推荐
- 高数_第3章重积分 学习体会与总结
- wallys//wifi6 wifi5 router IPQ6018 IPQ4019 IPQ4029 802.11ax 802.11ac
- 4everland storage node portal network design
- Proxy实现mysql读写分离
- 从瞳代到“瞳代”再到品牌,暴利的美瞳的变与未变
- 4. Server startup of source code analysis of Nacos configuration center
- Error when creating dataset with mindscore
- Proxy implements MySQL read / write separation
- Three skills of interface request merging, and the performance is directly exploded!
- tiktok如何破零播放?
猜你喜欢

Docker 搭建 Redis Cluster集群

Application of conductive slip ring in mechanical equipment

谷歌Pixel 6a屏下指纹扫描仪存在重大安全漏洞

9.< tag-动态规划和子序列, 子数组>lt.718. 最长重复子数组 + lt.1143. 最长公共子序列

各厂商网络虚拟化的优势
![[advanced mathematics] [5] definite integral and its application](/img/b2/62748b7533982f2b864148e0857490.png)
[advanced mathematics] [5] definite integral and its application

Difference Between Accuracy and Precision

【高等数学】【8】微分方程

【高等数学】【1】函数、极限、连续

sentinel简单限流和降级demo问题记录
随机推荐
Prescan quick start to master the special functions of prescan track editing in lecture 18
Error when creating dataset with mindscore
CarSim仿真快速入门(十四)—CarSim-Simulink联合仿真
10. < tag dynamic programming and subsequence, subarray> lt.53. maximum subarray and + lt.392. Judge subsequence DBC
Log in to Baidu online disk with cookies (websites use cookies)
[Infographics Show] 248 Public Domain Name
统信UOS下配置安装cocos2dx开发环境
Sentinel simple current limiting and degradation demo problem record
How to ensure the quality of customized slip rings
How much memory does bitmap occupy in the development of IM instant messaging?
9.< tag-动态规划和子序列, 子数组>lt.718. 最长重复子数组 + lt.1143. 最长公共子序列
PyTorch 模型 onnx 文件的导出和调用
Redis source code -ziplist
[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
UNET and mask RCNN
Shopping guide for high-end flagship projectors: dangbei X3 pro and dangbei F5 are more immersive!
Summarize the level of intelligent manufacturing discussion [macro understanding]
Partial interpretation of yolov7 paper [including my own understanding]
YOLOv7论文部分解读【含自己的理解】
Export and call of onnx file of pytorch model