当前位置:网站首页>How to implement common frameworks
How to implement common frameworks
2022-07-06 20:57:00 【EnndmeRedis】
MyBatis
mybatis It's a persistence layer framework , It's solved JDBC To operate the database, you need to write complex connections 、 Data manual mapping . Use xml Configuration omits establishment sqlSession The process of , Use object relational mapping to solve the troublesome manual mapping .
What you need to do is to execute the corresponding... When calling an interface SQL, I'm gonna use it here A dynamic proxy
Generate proxy objects , The proxy object can be based on the incoming SQL, Complete connection establishment and use JDBC The method of execution SQL; Get the type of the return value of this method through reflection , Map the data set returned by the database in turn
Spring IOC Containers
- Define something Bean Annotations , We want to scan these annotations and add them to Bean Containers
- Read the scan path in the configuration and scan , Then put the .class Files are stored in one Set in
- Let's go through this set , According to the annotation on the class, give it to IOC Containers , It's a Map aggregate
- If there is Bean Depend on others Bean Complete dependency injection
- Generate circular dependencies , Create two more Map Make L2 cache and L3 cache
MQ
- Specify the message protocol (JMS、AMQP)
- Select the storage method ( Memory 、 journal 、 database ) Balance efficiency and reliability
Naocs
Reference resources Nacos Realization principle
Distributed lock
Reference resources Redis Do distributed locking process setnx -> red lock
Distributed transactions
Reference resources XA、AT、TCC
Distributed transactions Seata
Local message table ??? I don't understand
MQ: I guarantee the reliability of the information ( Release confirmation + Persistence + Manual response ), Retry to prevent inconsistencies caused by downtime . however ! If it is my downstream service business problem , For example, the user's balance is insufficient , Then I How the downstream service notifies the upstream service to rollback ????( use Seata???)
边栏推荐
- 【每周一坑】正整数分解质因数 +【解答】计算100以内质数之和
- Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
- [DIY]如何制作一款個性的收音機
- [wechat applet] operation mechanism and update mechanism
- 【OpenCV 例程200篇】220.对图像进行马赛克处理
- How to turn a multi digit number into a digital list
- SSO single sign on
- 7. Data permission annotation
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- [DSP] [Part 1] start DSP learning
猜你喜欢
The mail command is used in combination with the pipeline command statement
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
Why do novices often fail to answer questions in the programming community, and even get ridiculed?
(work record) March 11, 2020 to March 15, 2021
Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
How to upgrade high value-added links in the textile and clothing industry? APS to help
使用.Net分析.Net达人挑战赛参与情况
【DSP】【第二篇】了解C6678和创建工程
3D人脸重建:从基础知识到识别/重建方法!
随机推荐
2022 nurse (primary) examination questions and new nurse (primary) examination questions
3D人脸重建:从基础知识到识别/重建方法!
看过很多教程,却依然写不好一个程序,怎么破?
OLED屏幕的使用
小孩子學什麼編程?
PG基础篇--逻辑结构管理(事务)
2022 portal crane driver registration examination and portal crane driver examination materials
The mail command is used in combination with the pipeline command statement
R language visualizes the relationship between more than two classification (category) variables, uses mosaic function in VCD package to create mosaic plots, and visualizes the relationship between tw
【DSP】【第一篇】开始DSP学习
Quel genre de programmation les enfants apprennent - ils?
2022 refrigeration and air conditioning equipment installation and repair examination contents and new version of refrigeration and air conditioning equipment installation and repair examination quest
OSPF多区域配置
Web开发小妙招:巧用ThreadLocal规避层层传值
Pat 1085 perfect sequence (25 points) perfect sequence
【mysql】游标的基本使用
OLED屏幕的使用
OAI 5g nr+usrp b210 installation and construction
##无yum源安装spug监控
C language operators