-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmybatis.drawio
1616 lines (1616 loc) · 245 KB
/
mybatis.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<mxfile host="Electron" modified="2024-12-09T17:07:06.094Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.5 Chrome/114.0.5735.243 Electron/25.3.1 Safari/537.36" etag="WGIOFCZfjYgglpAuoXQx" version="21.6.5" type="device" pages="3">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="工作流程">
<mxGraphModel dx="3088" dy="879" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="9RbiF7Askb06rhWkXzBX-20" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2210" y="2070" width="1510" height="470" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-9" style="edgeStyle=entityRelationEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;shape=link;strokeColor=none;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-63" target="FaMM4MfJ-Ujy_KWEskPM-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-0" value="<h1>Mybatis 工作流图 <span style="font-weight: normal">(Mybatis 3.5.9)</span></h1><p><b>前置知识</b>:</p><p></p><ul><li><span style="font-size: 10px">javax.xml 拓展包使用 &amp; xml相关知识(如果没有对xml的系统认识,配置文件及Mapper文件解析的源码看起来不会很顺畅),DOM + XPath 解析XML;</span></li><li><span style="font-size: 10px">深入理解:动态代理、反射(比如:泛型反射)、MethodHandle(被称为新型反射)</span></li><li><span style="font-size: 10px">JDBC (包括基本使用、会话、事务等);</span></li></ul><p></p>" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="40" width="720" height="120" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-2" target="4h_itlIO3gS3AQeO8IFH-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-2" value="start" style="ellipse;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="60" y="200" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-3" value="end" style="ellipse;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="60" y="2120" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-8" target="4h_itlIO3gS3AQeO8IFH-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-8" value="读取配置文件到输入流" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="280" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-10" target="4h_itlIO3gS3AQeO8IFH-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-10" target="8foiymuQkOx7uc3-mmT_-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-10" value="根据配置<br>创建SqlSession工厂" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="400" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-12" target="4h_itlIO3gS3AQeO8IFH-14" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-54" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-12" target="8foiymuQkOx7uc3-mmT_-53" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-12" value="建立会话<br><font color="#3399ff" style="font-size: 8px">会话层面的设置</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="920" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-14" target="4h_itlIO3gS3AQeO8IFH-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-67" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-14" target="8foiymuQkOx7uc3-mmT_-66" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-14" value="获取Mapper代理对象<br><font color="#3399ff" style="font-size: 10px">主要是里面的MapperMethod</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="1200" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-16" target="4h_itlIO3gS3AQeO8IFH-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-69" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4h_itlIO3gS3AQeO8IFH-16" target="8foiymuQkOx7uc3-mmT_-68" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4h_itlIO3gS3AQeO8IFH-16" value="执行sql操作<br>并返回结果<br><font color="#3399ff" style="font-size: 8px">将上面的MapperMethod结合参数信息,丢到Executor执行</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="1430" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-0" target="8foiymuQkOx7uc3-mmT_-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-20" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-0" target="4h_itlIO3gS3AQeO8IFH-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-0" value="new SqlSessionFactoryBuilder()<br>.build(inputStream)" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="240" y="400" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-2" target="8foiymuQkOx7uc3-mmT_-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-2" target="8foiymuQkOx7uc3-mmT_-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-2" value="XMLConfigBuilder parser = new XMLConfigBuilder(inputStream, environment, properties)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="480" y="400" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="100" y="2440" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-15" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-5" target="8foiymuQkOx7uc3-mmT_-14" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-19" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-5" target="8foiymuQkOx7uc3-mmT_-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-5" value="this.build(parser.parse())" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="480" y="520" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-7" target="8foiymuQkOx7uc3-mmT_-9" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-7" value="XMLConfigBuilder &lt;init&gt;<br><font color="#007fff">新建用于将xml文件解析成<br>Configuration对象的Builder</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="400" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-9" value="<div>new <b>XPathParser</b>(<b>inputStream</b>, true, props, new <b>XMLMapperEntityResolver</b>())</div><div>super(new <b>Configuration</b>());<span style="white-space: pre">	</span><span style="white-space: pre">	</span><font color="#3399ff">//configuration存储上次解析的缓存</font></div><div>this.<b>localReflectorFactory</b> = new <b>DefaultReflectorFactory</b>();</div><div>ErrorContext.instance().resource("SQL Mapper Configuration");</div><div>this.<b>configuration</b>.setVariables(props);<span>	</span><span>	</span></div><div>this.parsed = false;<span>	<span style="white-space: pre">	</span><span style="white-space: pre">	</span><span style="white-space: pre">	</span><span style="white-space: pre">	</span></span><font color="#3399ff">//是否解析过,解析过再获取配置就直接取缓存</font></div><div>this.environment = environment;</div><div>this.<b>parser</b> = parser;<span style="white-space: pre">	</span><span style="white-space: pre">	</span><span style="white-space: pre">	</span><font color="#3399ff">//上面的XPathParser,自带待解析数据(传参)</font></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;align=left;arcSize=3;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="360" width="440" height="120" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-17" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-14" target="8foiymuQkOx7uc3-mmT_-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-24" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-14" target="8foiymuQkOx7uc3-mmT_-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-14" value="<b>XMLConfigBuilder</b>$<b>parse</b>()<br><font color="#3399ff">解析数据流<br>返回Configuration实例</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="520" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-18" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-16" target="8foiymuQkOx7uc3-mmT_-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-16" value="return new DefaultSqlSessionFactory(config);<br><font color="#3399ff" style="font-size: 8px">使用Configuration实例构建SqlSession工厂,只是传下Configuration实例</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="760" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-26" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-23" target="8foiymuQkOx7uc3-mmT_-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-23" value="evalNode("/configuration")<br><font color="#3399ff">通过XPath和DOM解析并返回XNode根节点实例</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="520" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-29" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-43" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-44" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-32" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-45" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-46" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-47" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-37" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-48" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-38" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-49" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-39" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-50" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-40" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-51" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-41" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-52" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-25" target="8foiymuQkOx7uc3-mmT_-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-25" value="<b>parseConfiguration</b>(XNode root)<br><font color="#3399ff">遍历根节点实例,解析所有子节点</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="600" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-27" value="<font color="#3399ff">"properties"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="530" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-31" value="<font color="#3399ff">"settings"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="550" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-6" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-32" target="nTEty8VkxfBIhpbtXYr3-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-32" value="<font color="#3399ff">"typeAliases"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="570" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-33" value="<font color="#3399ff">"plugins"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="590" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-36" value="<font color="#3399ff">"objectFactory"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="610" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-37" value="<font color="#3399ff">"objectWrapperFactory"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="630" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-38" value="<font color="#3399ff">"reflectorFactory"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="650" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-39" target="sPj-nGploxGMAyuYcm76-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-39" value="<font color="#3399ff">"environments"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="670" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-40" value="<font color="#3399ff">"databaseIdProvider"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="690" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-41" value="<font color="#3399ff">"typeHandlers"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="710" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-75" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-42" target="8foiymuQkOx7uc3-mmT_-74" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-42" value="<font color="#3399ff">"mappers"</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="730" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-56" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-53" target="8foiymuQkOx7uc3-mmT_-55" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-17" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-53" target="4h_itlIO3gS3AQeO8IFH-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-53" value="openSession(true)" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="240" y="920" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-58" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-55" target="8foiymuQkOx7uc3-mmT_-57" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-16" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-55" target="8foiymuQkOx7uc3-mmT_-53" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-55" value="openSessionFromDataSource(ExecutorType execType, TransactionIsolationLevel level, boolean autoCommit)<br><div style="text-align: left"><span style="color: rgb(51 , 153 , 255)">&nbsp; execType:默认ExecutorType.SIMPLE,</span></div><font color="#3399ff"><div style="text-align: left"><span>&nbsp; level: 事务隔离级别null,</span></div><div style="text-align: left"><span>&nbsp; autoCommit: 自动提交</span></div></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="430" y="905" width="220" height="70" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-60" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-57" target="8foiymuQkOx7uc3-mmT_-59" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-57" value="TransactionFactory transactionFactory = getTransactionFactoryFromEnvironment(environment)<br><font color="#3399ff">测试中是JDBCTransactionFactory</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="920" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-62" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-59" target="8foiymuQkOx7uc3-mmT_-61" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-59" value="tx = transactionFactory.newTransaction(<br>environment.getDataSource(), level, autoCommit);<br><font color="#3399ff">测试中是JDBCTransaction</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#cdeb8b;strokeColor=#36393d;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="980" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-64" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-61" target="8foiymuQkOx7uc3-mmT_-63" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-13" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-61" target="sPj-nGploxGMAyuYcm76-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-61" value="Executor executor = configuration.newExecutor(tx, execType);<br><font color="#3399ff">创建SQL执行器<br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="1040" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-65" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-63" target="8foiymuQkOx7uc3-mmT_-55" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-10" style="edgeStyle=entityRelationEdgeStyle;shape=link;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;elbow=vertical;strokeColor=#3399FF;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-63" target="FaMM4MfJ-Ujy_KWEskPM-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-63" value="new <b>DefaultSqlSession</b>(configuration, executor, autoCommit);<br><font color="#3399ff">使用上面的组件创建会话对象</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="1100" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-18" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-66" target="8foiymuQkOx7uc3-mmT_-70" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-66" value="sqlSession.getMapper(<br>Xxx.class);<br><font style="font-size: 10px" color="#3399ff">获取某MapperProxy代理对象</font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="240" y="1200" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-34" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-68" target="sPj-nGploxGMAyuYcm76-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-68" value="<font style="font-size: 10px">比如blogMapper.selectBlog(1);</font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="240" y="1440" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-19" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-70" target="8foiymuQkOx7uc3-mmT_-72" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-70" value="configuration.getMapper<br>(type, this)<br><font color="#3399ff">type即Mapper接口类</font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="280" y="1280" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-22" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-72" target="sPj-nGploxGMAyuYcm76-20" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-72" value="<b>mapperProxyFactory</b><br>.newInstance(sqlSession);<br><font color="#3399ff" style="font-size: 10px">从mapperRegistry读取type的Mapper代理工厂,然后创建Mapper代理对象</font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="1350" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-77" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-74" target="8foiymuQkOx7uc3-mmT_-76" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-79" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-74" target="8foiymuQkOx7uc3-mmT_-78" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-74" value="<b>mapperElement</b>(<br>root.evalNode("mappers"))<br><font color="#3399ff">读取mappers配置节点,然后逐个解析mapper xml文件并注册到<b>Configuration</b>.<b>mapperRegistry</b></font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1400" y="750" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-76" value="&lt;package name=""&gt;<br><font color="#3399ff">通过包名加载Mapper</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1600" y="730" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-84" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-78" target="8foiymuQkOx7uc3-mmT_-83" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-78" value="&lt;mapper resource="" url="" class=""&gt;<br><font color="#3399ff">通过本地Mapper文件、URL远程Mapper文件、Mapper Interface类 加载</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1600" y="790" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-80" value="解析细节参考:XmlParseTest::testParseXml" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="720" y="490" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-89" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-81" target="8foiymuQkOx7uc3-mmT_-88" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-81" value="<b>XMLMapperBuilder</b> &lt;init&gt;<br>this.<b>builderAssistant</b> = new MapperBuilderAssistant;<br>this.<b>sqlFragments</b> = sqlFragments;<br><font color="#3399ff">这两个类似解析缓存</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2000" y="640" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-85" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-83" target="8foiymuQkOx7uc3-mmT_-81" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-83" value="本地Mapper文件加载" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1840" y="650" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-91" value="Y" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-88" target="8foiymuQkOx7uc3-mmT_-90" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-24" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;strokeColor=#330000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-88" target="nTEty8VkxfBIhpbtXYr3-22" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1970" y="750" />
<mxPoint x="1970" y="1075" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-25" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fontColor=#3399FF;" parent="nTEty8VkxfBIhpbtXYr3-24" vertex="1" connectable="0">
<mxGeometry x="-0.8573" y="9" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-88" value="首次加载?<br><font color="#3399ff" style="font-size: 8px">loadedResouces<br>是否包含?</font>" style="rhombus;whiteSpace=wrap;html=1;fontSize=10;rounded=1;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2040" y="730" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-93" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-90" target="8foiymuQkOx7uc3-mmT_-92" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-98" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-90" target="8foiymuQkOx7uc3-mmT_-97" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-90" value="configurationElement(<br>parser.evalNode("/mapper"))<br><font style="font-size: 10px" color="#3399ff">解析并加载“/mapper”根节点,然后记录到loadedResouces</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2010" y="800" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-15" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-92" target="nTEty8VkxfBIhpbtXYr3-14" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;strokeColor=#330000;elbow=vertical;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-92" target="nTEty8VkxfBIhpbtXYr3-22" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-92" value="bindMapperForNamespace()<br><font color="#3399ff">将当前namespace指定的Mapper Interface 类型及Mapper代理工厂注册到Configurations$<b>mapperRegistry</b>中</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2000" y="890" width="180" height="50" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-96" value="内部流程和前面解析/configuration的原理类似<br>把内部各种属性、元素等解析为对象,存储到Configuration实例中" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1800" y="805" width="210" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-0" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-97" target="8foiymuQkOx7uc3-mmT_-99" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-7" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-97" target="nTEty8VkxfBIhpbtXYr3-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-10" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-97" target="nTEty8VkxfBIhpbtXYr3-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-11" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8foiymuQkOx7uc3-mmT_-97" target="nTEty8VkxfBIhpbtXYr3-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-97" value=""namespace" <font color="#3399ff">命名空间 -&gt;&nbsp;cacheRefMap</font><br>"cache-ref" <font color="#3399ff">缓存配置引用</font><br>"cache" <font color="#3399ff">缓存配置</font><br><strike>"/mapper/parameterMap" <font color="#3399ff">参数映射</font><br></strike>"/mapper/resultMap"<br>"/mapper/sql"<span>	</span><font color="#3399ff">可重用sql模块</font><br>"select|insert|update|delete"" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=7;align=left;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2220" y="780" width="220" height="90" as="geometry" />
</mxCell>
<mxCell id="8foiymuQkOx7uc3-mmT_-99" value="缓存配置:<font color="#3399ff">Mybatis提供了多种实现</font><br>Cache cache = new CacheBuilder(...)<br>configuration.addCache(cache);" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=7;align=left;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2480" y="700" width="170" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-8" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-1" target="8foiymuQkOx7uc3-mmT_-81" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-1" value="resultMap<br>1) 获取type属性,获取对应Class类型,并注册到typeAliasRegistry<br>2) 解析各个字段的映射规则(包括列名、java类型、jdbc类型、自定义类型转换器、flags等等)<br>3)最后将映射规则注册到XMLMapperBuilder$<b>builderAssistant</b><br>同时还创建了ResultMapResolver注册到<b>&nbsp;</b>Configuration$<b>incompleteResultMaps</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=7;align=left;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2480" y="760" width="430" height="60" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-9" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-2" target="8foiymuQkOx7uc3-mmT_-81" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-2" value="可重用sql&nbsp;<br>涉及databaseId、id属性,最终将可重用sql片段存储到 XMLMapperBuilder$<b>sqlFragments</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=7;align=left;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2480" y="840" width="250" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-3" value="statement<br>创建sql语句解析器<b>XMLStatementBuilder</b>,解析CRUD语句,并将此解析器注册到 Configuration$<b>incompleteStatements</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=7;align=left;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2480" y="900" width="250" height="50" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-4" value="<font color="#3399ff"><span style="font-size: 10px">resultMap解析还是比较复杂的,可以实现复杂查询语句的结果映射<br>这个后面详细分析 TODO<br></span></font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2910" y="770" width="310" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-5" value="别名注册, 存储到Map&nbsp; configuration.typeAliasRegistry" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1400" y="560" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-12" value="<font color="#3399ff"><span style="font-size: 10px">XMLStatementBuilder是后面获取Mapper代理对象时很重要的一个对象<br>后面详细分析 TODO<br></span></font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2730" y="905" width="330" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-17" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-14" target="nTEty8VkxfBIhpbtXYr3-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-14" value="<div>knownMappers.put(<span>type,</span></div><div>new MapperProxyFactory&lt;&gt;(type));</div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2240" y="895" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-19" style="edgeStyle=isometricEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;shape=link;elbow=vertical;strokeColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-16" target="nTEty8VkxfBIhpbtXYr3-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-16" value="parser = new MapperAnnotationBuilder(config, type);<br>parser.parse()<br>注解形式定义的Statement的解析及构造器&nbsp;<b>MethodResolver</b><br>注册到&nbsp;<span>Configuration$</span><b>incompleteMethods</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;align=left;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2190" y="970" width="280" height="60" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-18" value="<font color="#3399ff"><span style="font-size: 10px"><b>XMLStatementBuilder</b>是处理XML statement定义的</span><br><span style="font-size: 10px"><b>MethodResolver</b> 是处理 注解 statement定义的</span><br></font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2470" y="980" width="250" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-27" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#330000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-22" target="nTEty8VkxfBIhpbtXYr3-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-22" value="parsePendingResultMaps()<br><font color="#3399ff">遍历incompleteResultMaps执行resolve整合到 ResultMapResolver.assistant</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2010" y="1050" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-29" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#330000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nTEty8VkxfBIhpbtXYr3-26" target="nTEty8VkxfBIhpbtXYr3-28" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-26" value="parsePendingCacheRefs()<br><font color="#3399ff">同上,后续处理</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2010" y="1120" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-28" value="parsePendingStatements()<br><span style="color: rgb(51 , 153 , 255)">同上,后续处理</span>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;arcSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2010" y="1180" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-30" value="前面为何不处理完全?<br>可能在等待什么依赖的配置解析完才能继续<br>这个后面再看" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2170" y="1055" width="210" height="40" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-34" value="通过这一步主要创建了XMLStatementBuilder,和几个Resolver类" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1400" y="810" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="nTEty8VkxfBIhpbtXYr3-35" value="<span style="font-size: 10px"><font color="#ff0080">疑问:XMLMapperBuilder只是中间对象,解析阶段完成后sqlFragments应该还是要存到<br>Configuration$sqlFragments 才对,哪一步传过去的? TODO</font><br></span>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2730" y="845" width="400" height="30" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-1" value="environmentsElement(<br>root.evalNode("environments"))<br><font color="#3399ff" style="font-size: 8px">创建事务工厂实例,这里是JDBCTransactionFactory; 创建数据源这里是PooledDataSource; 然后构造Envorionment实例存入Configuration</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1400" y="625" width="160" height="70" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-9" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-6" target="sPj-nGploxGMAyuYcm76-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-6" value="<font>executor = new SimpleExecutor(this, transaction);<br><font color="#3399ff">有三种执行器类型(测试中选用的SIMPLE)</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="970" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-14" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-8" target="sPj-nGploxGMAyuYcm76-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-8" value="<font>executor = new CachingExecutor(executor);<br><font color="#3399ff">是否为执行器开启缓存(这个是<b>一级缓存</b>默认开启)<br>关键是TransactionalCacheManager</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;strokeColor=#82b366;fillColor=#d5e8d4;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1049" y="1030" width="181" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-15" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-10" target="8foiymuQkOx7uc3-mmT_-61" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-10" value="<font>executor = (Executor) interceptorChain.pluginAll(executor);<br><font color="#3399ff">通过动态代理</font><span style="color: rgb(51 , 153 , 255)">将插件逻辑</span><font color="#3399ff">一层层地包装到Executor上,如果有加载插件的话<br>最终拿到的Executor是个代理类</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;strokeColor=#82b366;fillColor=#d5e8d4;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1050" y="1110" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-27" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-20" target="sPj-nGploxGMAyuYcm76-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-29" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-20" target="sPj-nGploxGMAyuYcm76-28" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-20" value="<font style="font-size: 10px">MapperProxy&lt;T&gt; mapperProxy = new <b>MapperProxy</b>&lt;&gt;(sqlSession, mapperInterface, methodCache);<br><font color="#007fff">MapperProxy实现InvocationHandler接口,即定义了增强逻辑</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="560" y="1180" width="180" height="80" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-23" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-24" target="sPj-nGploxGMAyuYcm76-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-24" value="<font color="#000000"><span style="font-size: 10px">MapperProxy 数据结构</span></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="2307" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-25" value="<div>private static final Constructor&lt;Lookup&gt; lookupConstructor; <font color="#3399ff">//获取的MethodHandles.Lookup.class的构造器方法</font></div><div>private static final Method privateLookupInMethod; <font color="#3399ff">//估计是用于旧版本兼容</font></div><div>private final SqlSession sqlSession;</div><div>private final Class&lt;T&gt; mapperInterface;</div><div>private final Map&lt;Method, MapperMethodInvoker&gt; methodCache; <font color="#3399ff">//MapperMethodInvoker(核心是MapperMethod)缓存</font></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fontColor=#000000;arcSize=2;align=left;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="120" y="2367" width="400" height="100" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-31" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-26" target="sPj-nGploxGMAyuYcm76-30" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-26" value="&nbsp;newInstance(mapperProxy)" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="560" y="1280" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="94C2e1VlCWugmCqxg8EF-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;curved=1;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-28" target="ZMCkvMuu3y16pFemIggh-8" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1030" y="1250" />
<mxPoint x="1030" y="1459" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-28" value="lookup = MethodHandles.Lookup.class.<br style="font-size: 10px">getDeclaredConstructor(Class.class, int.class);<br style="font-size: 10px">lookupConstructor = lookup;<br><font color="#3399ff">Mapper接口没定义default方法的话不会用到 MethodHandle</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="800" y="1190" width="220" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-30" value="<font style="font-size: 10px">Proxy.newProxyInstance(<br>mapperInterface.getClassLoader(), <br>new Class[] { <b>mapperInterface</b> }, <b>mapperProxy</b>)<br><font color="#3399ff">invoke()内部使用MethodHandle</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="800" y="1270" width="220" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-32" value="MapperProxy中最重要的代码是 invoke() -&gt;&nbsp;cachedInvoker()&nbsp; 中<br>return new PlainMethodInvoker(<br>new <b>MapperMethod</b>(mapperInterface, method, sqlSession.getConfiguration()))" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1030" y="1190" width="360" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-36" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-33" target="sPj-nGploxGMAyuYcm76-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-33" value="<font style="font-size: 10px">MapperProxy$invoke()</font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="400" y="1440" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-38" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-35" target="sPj-nGploxGMAyuYcm76-37" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-35" target="ZMCkvMuu3y16pFemIggh-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-35" value="<font><span style="font-size: 10px">MapperMethodInvoker invoker = cachedInvoker(method)</span><br><font color="#3399ff" style="font-size: 8px">获取缓存的MapperMethod,没有则新建,并缓存到 MapperPrxoy的</font><font color="#3399ff"><span style="font-size: 8px">methodCache</span></font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="560" y="1430" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-53" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-37" target="sPj-nGploxGMAyuYcm76-54" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="780" y="1660" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-82" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-37" target="sPj-nGploxGMAyuYcm76-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-37" value="<font><span style="font-size: 10px">invoker.<b>invoke</b>(proxy, method, args, sqlSession)</span><br><font color="#3399ff" style="font-size: 8px">调用MapperMethod的execute()方法,执行SQL语句并返回结果</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="560" y="1670" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-44" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-39" target="sPj-nGploxGMAyuYcm76-43" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-47" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-39" target="sPj-nGploxGMAyuYcm76-41" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-39" value="<font style="font-size: 10px">new <b>SqlCommand</b>(config, mapperInterface, method)<br><font color="#3399ff">包括SQL类型、SQL statement名</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="1460" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-51" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-50" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-104" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-96" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-105" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-97" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-107" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-98" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-108" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-99" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-109" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-100" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-110" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-101" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-111" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-102" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-112" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-41" target="sPj-nGploxGMAyuYcm76-103" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-41" value="<font style="font-size: 10px">new <b>MethodSignature</b>(config, mapperInterface, method)<br><font color="#3399ff">方法签名,包括很多执行时的信息</font><br style="font-size: 10px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="1600" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-46" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-43" target="sPj-nGploxGMAyuYcm76-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-84" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-43" target="sPj-nGploxGMAyuYcm76-83" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-43" value="<font style="font-size: 10px"><div><b>MappedStatement</b> ms = <b>resolveMappedStatement</b>(mapperInterface, methodName, declaringClass,&nbsp;<span>configuration);</span></div><div><span><font color="#3399ff">从Configuration.mappedStatements查找此Mapper方法对应的Statement</font></span></div></font>" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1240" y="1450" width="240" height="58.75" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-45" value="<font style="font-size: 10px"><span style="font-weight: normal"><div>name = ms.getId();</div><div style="font-size: 8px">type = ms.getSqlCommandType();<br><font color="#3399ff" style="font-size: 8px">name: Mapper接口类型+方法名;<br>type: 增、删、改、查、FLUSH (???)</font></div></span></font>" style="rounded=1;whiteSpace=wrap;html=1;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1270" y="1540" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-49" value="MapperMethod.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1065" y="1440" width="110" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-50" value="<font style="font-size: 9px;">TypeParameterResolver.resolveReturnType(method, mapperInterface)&nbsp;<font color="#3399ff" style="font-size: 9px;">获取返回结果类型</font><br style="font-size: 9px;"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1600" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-56" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-54" target="sPj-nGploxGMAyuYcm76-55" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="920" y="1960" />
<mxPoint x="920" y="1800" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-62" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-54" target="sPj-nGploxGMAyuYcm76-57" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-63" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-54" target="sPj-nGploxGMAyuYcm76-58" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-64" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-54" target="sPj-nGploxGMAyuYcm76-59" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-65" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-54" target="sPj-nGploxGMAyuYcm76-61" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="920" y="1960" />
<mxPoint x="920" y="2120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-54" value="command.getType()" style="rhombus;whiteSpace=wrap;html=1;fontSize=10;fontColor=#000000;strokeColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="760" y="1940" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-55" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">INSERT</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="1780" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-57" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">UPDATE</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="1860" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-58" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">DELETE</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="1940" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-67" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-59" target="sPj-nGploxGMAyuYcm76-66" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1120" y="2040" />
<mxPoint x="1120" y="1960" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-68" value="method.returnsVoid() &amp;&amp; <br style="font-size: 8px;">method.hasResultHandler()" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#3399FF;" parent="sPj-nGploxGMAyuYcm76-67" vertex="1" connectable="0">
<mxGeometry x="0.1239" y="-3" relative="1" as="geometry">
<mxPoint x="17" y="-6" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-73" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-59" target="sPj-nGploxGMAyuYcm76-69" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-77" value="method.returnsMany()" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#3399FF;" parent="sPj-nGploxGMAyuYcm76-73" vertex="1" connectable="0">
<mxGeometry x="0.4289" y="-6" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-74" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-59" target="sPj-nGploxGMAyuYcm76-70" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-78" value="method.returnsMap()" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#3399FF;" parent="sPj-nGploxGMAyuYcm76-74" vertex="1" connectable="0">
<mxGeometry x="0.7304" y="1" relative="1" as="geometry">
<mxPoint x="-23" y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-75" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-59" target="sPj-nGploxGMAyuYcm76-71" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-79" value="method.returnsCursor()" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#3399FF;" parent="sPj-nGploxGMAyuYcm76-75" vertex="1" connectable="0">
<mxGeometry x="0.767" relative="1" as="geometry">
<mxPoint x="-20" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-76" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-59" target="sPj-nGploxGMAyuYcm76-72" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-80" value="else" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#3399FF;" parent="sPj-nGploxGMAyuYcm76-76" vertex="1" connectable="0">
<mxGeometry x="0.6877" y="13" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-59" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">SELECT<br><font color="#3399ff">返回值类型,TODO</font><br></span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="2020" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-61" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">FLUSH</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="960" y="2100" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-66" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">executeWithResultHandler(<br>sqlSession, args)</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="1940" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-69" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">executeForMany(<br>sqlSession, args)</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="2000" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-70" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">executeForMap(<br>sqlSession, args)</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="2060" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-71" value="<font face="jetbrains mono, monospace"><span style="font-size: 11.2px">executeForCursor(<br>sqlSession, args)</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="2120" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;curved=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-72" target="FaMM4MfJ-Ujy_KWEskPM-0" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1420" y="2200" />
<mxPoint x="1420" y="2065" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-72" value="查找单个结果<br>返回普通类型或Optional.class类型" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1200" y="2180" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-83" value="<font style="font-size: 10px"><div>mappedStatements来源</div></font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1520" y="1460" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-85" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="sPj-nGploxGMAyuYcm76-86" target="sPj-nGploxGMAyuYcm76-87" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-86" value="<font color="#000000"><span style="font-size: 10px">MethodSignature&nbsp;<br>数据结构</span></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="2507" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-87" value="<div>private final boolean returnsMany; <font color="#3399ff">//是否返回多个结果</font></div><div>private final boolean returnsMap;</div><div>private final boolean returnsVoid;</div><div>private final boolean returnsCursor;</div><div>private final boolean returnsOptional;</div><div>private final Class&lt;?&gt; returnType;</div><div>private final String mapKey;</div><div>private final Integer resultHandlerIndex;</div><div>private final Integer rowBoundsIndex;</div><div>private final ParamNameResolver paramNameResolver;</div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fontColor=#000000;arcSize=2;align=left;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="120" y="2567" width="400" height="140" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-96" value="<font>this.returnsVoid = void.class.equals(this.returnType); <font color="#3399ff">无返回值</font><br style="font-size: 10px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1620" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-97" value="<font style="font-size: 9px">this.returnsMany = configuration.getObjectFactory()<br style="font-size: 9px">.isCollection(this.returnType) || this.returnType.isArray(); <font color="#3399ff">返回集合或数组</font><br style="font-size: 9px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1640" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-98" value="<font>this.returnsCursor = Cursor.class.equals(this.returnType); <font color="#3399ff">返回Cursor.class</font><br style="font-size: 10px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1660" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-99" value="<font>this.returnsOptional = Optional.class.equals(this.returnType); <font color="#3399ff">返回Optional.class</font><br style="font-size: 10px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1680" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-100" value="<font style="font-size: 8px"><div style="font-size: 8px">this.mapKey = getMapKey(method);</div><div style="font-size: 8px">&nbsp; &nbsp; &nbsp; this.returnsMap = this.mapKey != null;&nbsp; <font color="#3399ff">@MapKey注解的值 ???</font></div></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1700" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-101" value="<font style="font-size: 9px">this.rowBoundsIndex = getUniqueParamIndex(method, RowBounds.class); <br><font color="#3399ff" style="font-size: 9px">获取method RowBounds类型参数索引 ???</font><br style="font-size: 11px"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1720" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-102" value="<font style="font-size: 9px;">this.resultHandlerIndex = getUniqueParamIndex(method, ResultHandler.class);<br style="font-size: 9px;"><font color="#3399ff" style="font-size: 9px;">获取method ResultHandler类型参数索引 ???</font><br style="font-size: 9px;"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1740" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-103" value="<font style="font-size: 9px;">this.paramNameResolver = new ParamNameResolver(configuration, method);<br style="font-size: 9px;"><font color="#3399ff" style="font-size: 9px;">处理@Param注解的参数 ???</font><br style="font-size: 9px;"></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1280" y="1760" width="400" height="20" as="geometry" />
</mxCell>
<mxCell id="sPj-nGploxGMAyuYcm76-113" value="MapperMethod.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1065" y="1580" width="110" height="20" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-3" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-0" target="FaMM4MfJ-Ujy_KWEskPM-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-0" value="return paramNameResolver<br>.getNamedParams(args)<br><font color="#3399ff" style="font-size: 9px">获取命名的参数?如果参数有多个返回参数Map ...</font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1460" y="2040" width="140" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-5" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-2" target="FaMM4MfJ-Ujy_KWEskPM-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-7" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-2" target="FaMM4MfJ-Ujy_KWEskPM-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-2" value="result = <b>sqlSession</b>.<b>selectOne</b>(<br>command.getName(), param)<br><font color="#3399ff" style="font-size: 9px">name是接口类全路径加上方法名</font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1460" y="2120" width="140" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-4" value="如果返回Optional.class类型<br>结果封装一下<br style="font-size: 9px">Optional.ofNullable(result)" style="whiteSpace=wrap;html=1;fontSize=9;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1460" y="2190" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-6" target="FaMM4MfJ-Ujy_KWEskPM-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-6" value="selectList(statement, parameter)" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1640" y="2120" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-8" value="DefaultSqlSession" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3399FF;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1650" y="2100" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-14" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-11" target="FaMM4MfJ-Ujy_KWEskPM-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-11" value="<b>selectList</b>(statement, parameter, rowBounds, Executor.NO_RESULT_HANDLER)<br><font color="#3399ff">RowBounds.DEFAULT</font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1800" y="2115" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-16" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-13" target="FaMM4MfJ-Ujy_KWEskPM-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-13" value="MappedStatement<span style="font-weight: normal"> ms = configuration</span><br><span style="font-weight: normal">.getMappedStatement(statement)</span><br><font style="font-size: 8px" color="#3399ff"><span style="font-weight: normal">使用方法名换取之前解析XML创建的</span><span style="font-weight: 400">mappedStatements中的MappedStatement对象</span></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2000" y="2110" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-22" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-15" target="FaMM4MfJ-Ujy_KWEskPM-21" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2210" y="2219" />
<mxPoint x="2210" y="2140" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-15" value="executor<span style="font-weight: 400">.query(ms, wrapCollection(parameter), rowBounds, handler)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2000" y="2199" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-20" value="CachingExecutor" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3399FF;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2285" y="2095" width="90" height="20" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-24" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-21" target="FaMM4MfJ-Ujy_KWEskPM-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-21" value="<span style="font-weight: 400">BoundSql boundSql = ms.getBoundSql(parameterObject);<br><font color="#3399ff">基本包含SQL所有信息:sql语句、参数映射、参数值</font><br></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2240" y="2115" width="180" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-26" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-23" target="FaMM4MfJ-Ujy_KWEskPM-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-23" value="<font><span style="font-weight: 400">CacheKey key = </span>createCacheKey<span style="font-weight: 400">(ms, parameterObject, rowBounds, boundSql)<br></span><font color="#3399ff" size="1"><span style="font-weight: 400 ; font-size: 9px">创建缓存的Key,内容和BoundSql差不多,后面查缓存时用的</span></font></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2240" y="2191" width="180" height="59" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-28" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-25" target="FaMM4MfJ-Ujy_KWEskPM-27" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2450" y="2300" />
<mxPoint x="2450" y="2140" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-25" value="query<span style="font-weight: 400">(ms, parameterObject, rowBounds, resultHandler, key, boundSql)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2240" y="2280" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="9RbiF7Askb06rhWkXzBX-11" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-27" target="9RbiF7Askb06rhWkXzBX-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-27" value="<span style="font-weight: 400">Cache cache = ms.getCache()</span><br><span style="font-weight: 400">if (cache != null) :</span><br>List&lt;E&gt; list = (List&lt;E&gt;) tcm.getObject(cache, key);<br><font color="#3399ff"><span style="font-weight: normal">即先尝试从</span>二级缓存<span style="font-weight: normal">获取</span></font><br><span style="font-weight: 400"><font color="#3399ff" style="font-size: 8px">Configuration -&gt; mappedStatements(Map) -&gt; MappedStatement -&gt; Cache</font></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2480" y="2100" width="260" height="80" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-24" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-29" target="ZMCkvMuu3y16pFemIggh-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9RbiF7Askb06rhWkXzBX-14" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-29" target="9RbiF7Askb06rhWkXzBX-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-29" value="<span style="font-weight: normal">list = </span>delegate.query<span style="font-weight: 400">(ms, parameterObject, rowBounds, resultHandler, key, boundSql)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2760" y="2201" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-34" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-31" target="FaMM4MfJ-Ujy_KWEskPM-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9RbiF7Askb06rhWkXzBX-23" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-31" target="9RbiF7Askb06rhWkXzBX-22" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-31" value="<span style="font-weight: normal">list = </span>queryFromDatabase<span style="font-weight: normal">(ms, parameter, rowBounds, resultHandler, key, boundSql)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3180" y="2351" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-36" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-33" target="FaMM4MfJ-Ujy_KWEskPM-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-39" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-33" target="ZMCkvMuu3y16pFemIggh-38" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-33" value="<div>localCache<span style="font-weight: 400">.putObject(key, EXECUTION_PLACEHOLDER);</span></div><div><span style="font-weight: 400">try {</span></div><div><span style="font-weight: 400">&nbsp; &nbsp; list = </span>doQuery<span style="font-weight: 400">(ms, parameter, rowBounds, resultHandler, boundSql);</span></div><div><span style="font-weight: 400">} finally {</span></div><div><span style="font-weight: 400">&nbsp; &nbsp; </span>localCache<span style="font-weight: 400">.removeObject(key);</span></div><div><span style="font-weight: 400">}</span><br><span style="font-weight: 400"><font color="#007fff">EXECUTION_PLACEHOLDER用于标识此key的缓存正在更新</font></span><br></div>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;align=left;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3400" y="2320" width="280" height="100" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-38" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-35" target="FaMM4MfJ-Ujy_KWEskPM-37" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-43" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-35" target="ZMCkvMuu3y16pFemIggh-42" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3960" y="2371" />
<mxPoint x="3960" y="2319" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-35" value="<span style="font-weight: 400">StatementHandler handler = configuration.</span>newStatementHandler<span style="font-weight: 400">(<br>wrapper, ms, parameter, rowBounds, resultHandler, boundSql);</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3760" y="2346" width="180" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-40" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-37" target="FaMM4MfJ-Ujy_KWEskPM-39" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-49" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-37" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="3980" y="2431" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-37" value="<span style="font-weight: 400">stmt = </span>prepareStatement<span style="font-weight: 400">(handler, ms.getStatementLog());</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3760" y="2431" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-42" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-39" target="FaMM4MfJ-Ujy_KWEskPM-41" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9RbiF7Askb06rhWkXzBX-6" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-39" target="9RbiF7Askb06rhWkXzBX-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-39" value="<span style="font-weight: 400">handler.</span>query<span style="font-weight: 400">(stmt, resultHandler);<br><font color="#3399ff">RoutingStatementHandler.class</font><br></span>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3760" y="2496" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-44" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="FaMM4MfJ-Ujy_KWEskPM-41" target="FaMM4MfJ-Ujy_KWEskPM-43" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-41" value="<span style="font-weight: 400">PreparedStatement ps = (PreparedStatement) statement;</span><br><span style="font-weight: 400">ps.execute();<br><font color="#3399ff">进入到JDBC代码执行并返回结果</font><br></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3980" y="2491" width="180" height="50" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-43" value="<font style="font-size: 9px">resultSetHandler</font><span style="font-weight: 400 ; font-size: 9px"><font style="font-size: 9px">.handleResultSets(ps)<br><font color="#3399ff" style="font-size: 9px">DefaultResultSetHandler处理结果集数据</font></font><br></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#d6b656;rounded=1;arcSize=8;fontStyle=1;fillColor=#fff2cc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3980" y="2561" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-45" value="PreparedStatementHandler.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="4005" y="2471" width="130" height="20" as="geometry" />
</mxCell>
<mxCell id="FaMM4MfJ-Ujy_KWEskPM-46" value="BaseExecutor.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3025" y="2242" width="90" height="20" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-0" value="<font color="#3399ff">这之前还有一步判断:<br style="font-size: 8px">调用的方法是否是Object类声明的,<br>不过基本不可能走这一步,略<br></font>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="400" y="1480" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-3" target="ZMCkvMuu3y16pFemIggh-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-7" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-3" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="880" y="1480" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-3" value="m.isDefault()<br style="font-size: 10px;"><font color="#3399ff" style="font-size: 10px;">是否是 default方法</font>" style="rhombus;whiteSpace=wrap;html=1;rounded=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="760" y="1420" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-5" value="&nbsp;new DefaultMethodInvoker()" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="880" y="1380" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-9" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-8" target="sPj-nGploxGMAyuYcm76-39" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-8" value="new PlainMethodInvoker(new <b>MapperMethod</b>(mapperInterface, method, sqlSession.getConfiguration()));" style="whiteSpace=wrap;html=1;fontSize=8;rounded=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="880" y="1459.38" width="120" height="40.62" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-15" value="<b>缓存过期机制</b>:<br>缓存结果为null,还是会走后面的代理查询逻辑<br>那么何时缓存的结果会被清除?&nbsp;insert、update 和 delete 语句执行后会刷新缓存;同时默认使用LRU机制清除不需要的缓存" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2780" y="2105" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-17" value="<b>TransactionalCacheManager</b> 在后面执行SQL查询前会用到,先从缓存中查,没有再执行SQL;<br>内部集成了事务操作,这个抽离出一个单元测试看吧" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1230" y="1040" width="210" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-19" value="<b><font style="font-size: 12px">梳理进度</font></b><br style="font-size: 9px"><br style="font-size: 9px"><b style="font-size: 9px">1) “select”主线的逻辑,包括</b><br style="font-size: 9px"><ul style="font-size: 9px"><li style="font-size: 9px"><b style="font-weight: bold ; font-size: 9px">XML解析 </b>(将xml配置解析到Configuaraion全局配置对象[不是静态类,很多对象都包含其引用],包含很多xml指定的和默认的配置)</li><li style="font-size: 9px"><b style="font-weight: bold ; font-size: 9px">插件原理 </b>(JDK Proxy 装饰者模式,形式为通过拦截器链进行代理装饰)</li><li style="font-size: 9px"><b>Mapper动态代理</b> (SQL执行入口,内部构造Sql参数、Statement、使用executor执行、将结果集映射到Mapper接口返回类型对象)<br>关于动态代理逻辑已抽离到了测试,参考:top.kwseeker.mybatis.analysis.proxy.MethodHandleTest</li><li><b>缓存机制&nbsp;&nbsp;</b>(两级缓存 session / namespace,说三级缓存的是把redis等第三方缓存算进来了)<br>由源码可知这两级缓存在分布式场景下都存在“可能出现脏数据的”问题,需要注意。<br>可以通过设置 LocalCacheScope.STATEMENT 关闭一级缓存,或者通过设置 flushCache =“true” 关闭单个SQL语句的一级缓存。</li></ul><div>TODO:</div><ul><li style="font-size: 9px">RoutingStatementHandler执行详细流程(StatementHandler、ParameterHandler、ResultSetHandler、连接池)</li><li>缓存的LRU机制</li><li style="font-size: 9px">复杂关联查询的原理:一对多、多对多映射</li><li style="font-size: 9px">延迟加载、动态SQL</li><li style="font-size: 9px">常用插件实现原理(分页插件、乐观锁插件)</li></ul>" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="800" y="40" width="600" height="240" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-20" value="二级缓存,全局缓存,<br>通过&lt;cache/&gt;标签配置开启" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2545" y="2070" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-26" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-23" target="ZMCkvMuu3y16pFemIggh-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-27" value="Y" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fontColor=#3399FF;" parent="ZMCkvMuu3y16pFemIggh-26" vertex="1" connectable="0">
<mxGeometry x="-0.2434" y="1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="BK6uqOB74IsekC5S0Vyd-0" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-23" target="ZMCkvMuu3y16pFemIggh-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-23" value="<span style="font-weight: normal ; font-size: 8px">queryStack == 0 &amp;&amp; ms.isFlushCacheRequired()<br></span>" style="rhombus;whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3010" y="2196" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-25" value="<span style="font-weight: normal">clearLocalCache();<br><font color="#3399ff">清理一级缓存</font><br></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3230" y="2201" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-32" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-29" target="ZMCkvMuu3y16pFemIggh-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-29" value="<span style="font-weight: 400">list = resultHandler == null ? (List&lt;E&gt;) localCache.</span>getObject<span style="font-weight: 400">(key) : null<br></span><font color="#3399ff">从一级缓存(本地缓存)</font><span style="color: rgb(51 , 153 , 255) ; font-weight: 400">获取</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2980" y="2262" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-33" value="Y,不为空" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-31" target="ZMCkvMuu3y16pFemIggh-34" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="3400" y="2282" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-36" value="N" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-31" target="FaMM4MfJ-Ujy_KWEskPM-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-31" value="<span style="font-weight: normal ; font-size: 9px">list != null ?<br><font color="#007fff">一级缓存<br>此key是否为空</font></span><span style="font-family: monospace ; font-weight: 400 ; font-size: 0px"><font color="#007fff">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%26lt%3Bspan%20style%3D%26quot%3Bfont-weight%3A%20normal%26quot%3B%26gt%3BqueryStack%20%3D%3D%200%20%26amp%3Bamp%3B%26amp%3Bamp%3B%20ms.isFlushCacheRequired()%26lt%3B%2Fspan%26gt%3B%22%20style%3D%22rhombus%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfontSize%3D10%3BstrokeColor%3D%23000000%3BfontColor%3D%23000000%3Brounded%3D1%3BarcSize%3D8%3BfontStyle%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%222730%22%20y%3D%222185%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</font></span><span style="font-weight: normal"><br></span>" style="rhombus;whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3210" y="2257" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-34" value="<span style="font-weight: 400">handleLocallyCachedOutputParameters(<br>ms, key, parameter, boundSql)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3400" y="2262" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-37" value="它的基类里面创建了<b>二级缓存</b>(namespace)<br>this.localCache = new <b>PerpetualCache</b>("LocalCache")<br>后面执行SQL查询会用到" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1241" y="970" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-38" value="<div style="text-align: left"><span>localCache</span><span style="font-weight: normal">.</span><span>putObject</span><span style="font-weight: normal">(key, list);</span></div><span style="font-weight: 400"><font><div style="text-align: left">if (ms.getStatementType() == StatementType.CALLABLE) {</div><div style="text-align: left">&nbsp; &nbsp; &nbsp; localOutputParameterCache.putObject(key, parameter);<br><span>}</span></div></font><span><div style="text-align: left"><span><font color="#007fff">即更新本地缓存和参数缓存</font></span></div></span></span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#b85450;rounded=1;arcSize=8;fontStyle=1;fillColor=#f8cecc;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3400" y="2440" width="280" height="60" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-41" value="后面几步都是在与JDBC打交道" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3780" y="2326" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-45" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-42" target="ZMCkvMuu3y16pFemIggh-44" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-42" value="<span style="font-weight: 400">new </span>RoutingStatementHandler<span style="font-weight: 400">(...)</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3990" y="2291" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-44" value="<font style="font-size: 9px">statementHandler<span style="font-weight: 400"> = (StatementHandler) interceptorChain.pluginAll(statementHandler);</span><br><font color="#3399ff" style="font-weight: 400">插入插件拦截器功能</font><br></font>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#B09500;rounded=1;arcSize=8;fontStyle=1;fillColor=#e3c800;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3980" y="2351" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-53" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-50" target="ZMCkvMuu3y16pFemIggh-52" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="4280" y="2431" />
<mxPoint x="4280" y="2351" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-60" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-50" target="ZMCkvMuu3y16pFemIggh-59" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-62" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=9;fontColor=#3399FF;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-50" target="ZMCkvMuu3y16pFemIggh-63" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="4300" y="2481" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-50" value="<div>Connection<span style="font-weight: normal"> connection = getConnection(statementLog);</span></div><div><span style="font-weight: normal">stmt = handler.prepare(</span>connection<span style="font-weight: normal">, transaction.getTimeout());</span></div><div><span style="font-weight: normal">handler.parameterize(stmt);</span></div>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3980" y="2401" width="280" height="60" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-55" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ZMCkvMuu3y16pFemIggh-52" target="ZMCkvMuu3y16pFemIggh-54" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZMCkvMuu3y16pFemIggh-52" value="JdbcTransaction<span style="font-weight: 400">$<br></span><span style="font-weight: normal">openConnection()</span>" style="whiteSpace=wrap;html=1;fontSize=10;strokeColor=#000000;fontColor=#000000;rounded=1;arcSize=8;fontStyle=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="4300" y="2331" width="120" height="40" as="geometry" />
</mxCell>