当前位置:网站首页>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???)
边栏推荐
- How to upgrade high value-added links in the textile and clothing industry? APS to help
- KDD 2022 | 通过知识增强的提示学习实现统一的对话式推荐
- Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
- C language games - three chess
- 7、数据权限注解
- Value of APS application in food industry
- Trends of "software" in robotics Engineering
- [DIY]自己设计微软MakeCode街机,官方开源软硬件
- Function optimization and arrow function of ES6
- Design your security architecture OKR
猜你喜欢
【mysql】游标的基本使用
逻辑是个好东西
使用.Net分析.Net达人挑战赛参与情况
“罚点球”小游戏
(工作记录)2020年3月11日至2021年3月15日
Activiti global process monitors activitieventlistener to monitor different types of events, which is very convenient without configuring task monitoring in acitivit
OneNote 深度评测:使用资源、插件、模版
OAI 5G NR+USRP B210安装搭建
电子游戏的核心原理
How to upgrade high value-added links in the textile and clothing industry? APS to help
随机推荐
Redis insert data garbled solution
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
Infrared thermometer based on STM32 single chip microcomputer (with face detection)
2022 construction electrician (special type of construction work) free test questions and construction electrician (special type of construction work) certificate examination
“罚点球”小游戏
Spiral square PTA
OSPF多区域配置
How to upgrade high value-added links in the textile and clothing industry? APS to help
Minimum cut edge set of undirected graph
防火墙基础之外网服务器区部署和双机热备
Pycharm remote execution
Logic is a good thing
Leetcode hot topic Hot 100 day 32: "minimum coverage substring"
[weekly pit] calculate the sum of primes within 100 + [answer] output triangle
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
Taylor series fast Fourier transform (FFT)
C language games - three chess
15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient
面试官:Redis中有序集合的内部实现方式是什么?
What programming do children learn?