Compare commits
2000 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7f64abc21 | ||
|
|
800da01c72 | ||
|
|
6ade0fdb77 | ||
|
|
08e79dfde2 | ||
|
|
fa982b33cc | ||
|
|
84ac030c42 | ||
|
|
bfb0848fa2 | ||
|
|
7a76256317 | ||
|
|
f700743134 | ||
|
|
6401c74f10 | ||
|
|
65b4e66677 | ||
|
|
243bd95b44 | ||
|
|
b40f167867 | ||
|
|
550f955678 | ||
|
|
39b1ea3e4e | ||
|
|
da25cd531f | ||
|
|
3876f149fd | ||
|
|
151b09ce0b | ||
|
|
9d691e50f7 | ||
|
|
0895c82525 | ||
|
|
e6d4b26c9d | ||
|
|
39f743b47d | ||
|
|
f33ac5f88a | ||
|
|
edfc7b9190 | ||
|
|
c43d151d4d | ||
|
|
f3f84bd5b3 | ||
|
|
8f257761fd | ||
|
|
020d9c853d | ||
|
|
da88762f99 | ||
|
|
60a47d33c4 | ||
|
|
ec17eea1e0 | ||
|
|
29ea1eb76b | ||
|
|
9c7ece9282 | ||
|
|
2c0dbeaa15 | ||
|
|
377799f19a | ||
|
|
7e85fc134b | ||
|
|
95e207fd34 | ||
|
|
3a7a462f65 | ||
|
|
f8b8429044 | ||
|
|
f9744b8480 | ||
|
|
4695d787c5 | ||
|
|
1d9f385da9 | ||
|
|
72fe0dc2ba | ||
|
|
5fbe56bfc1 | ||
|
|
e2a3560661 | ||
|
|
c524e15267 | ||
|
|
5da88a7916 | ||
|
|
7c9c3822e0 | ||
|
|
1d6b1a3a30 | ||
|
|
aec47a7a9a | ||
|
|
754c9f0c2b | ||
|
|
7405ce4dab | ||
|
|
59b9c695ec | ||
|
|
c2a923619e | ||
|
|
a19b083478 | ||
|
|
9cf402f18c | ||
|
|
9a085536fb | ||
|
|
e82f7e39b0 | ||
|
|
fa8ca1fb38 | ||
|
|
fd5225ab37 | ||
|
|
c0960b21f1 | ||
|
|
062f9a09db | ||
|
|
264cc3995b | ||
|
|
173a5c8a24 | ||
|
|
1491f6be70 | ||
|
|
cc760ff327 | ||
|
|
2c47e5db30 | ||
|
|
4f6ca16ca6 | ||
|
|
57686cf221 | ||
|
|
7586577521 | ||
|
|
f1ae2bd165 | ||
|
|
048c718ba2 | ||
|
|
6429cc93f8 | ||
|
|
e4bf7432f4 | ||
|
|
a989f1af9f | ||
|
|
687606282a | ||
|
|
ae7bae1b05 | ||
|
|
bea6f6fd5a | ||
|
|
50994c3f78 | ||
|
|
0d45e6c43b | ||
|
|
3e06534b63 | ||
|
|
2ec628cc7d | ||
|
|
4d17fe7e3f | ||
|
|
4e2ba22fc3 | ||
|
|
85ac8f743d | ||
|
|
f65c02677f | ||
|
|
399df22672 | ||
|
|
1cc659276b | ||
|
|
909b813573 | ||
|
|
38ec269df2 | ||
|
|
dbee6c15b0 | ||
|
|
3a532617a1 | ||
|
|
b6accc97f6 | ||
|
|
a1c4fafa47 | ||
|
|
bb611413a5 | ||
|
|
3f172824b6 | ||
|
|
acf8eb1ce0 | ||
|
|
45b0e7098b | ||
|
|
5a7181428f | ||
|
|
d5908815d9 | ||
|
|
f86f82db8d | ||
|
|
1dc07638e5 | ||
|
|
335933a0f4 | ||
|
|
8ea63c5171 | ||
|
|
ed2d9527bf | ||
|
|
dc3396daf5 | ||
|
|
72d9427426 | ||
|
|
35754cb8f5 | ||
|
|
6769389f3a | ||
|
|
1bcc35cbcf | ||
|
|
227e94b546 | ||
|
|
0d84ef0541 | ||
|
|
21c00b3419 | ||
|
|
62eb06f272 | ||
|
|
e5acbdcdee | ||
|
|
71cec55f1c | ||
|
|
76623e9c6b | ||
|
|
59ad1d8617 | ||
|
|
a542c03e8b | ||
|
|
845a1e97ff | ||
|
|
3d8c2f1fc5 | ||
|
|
77a8b8fa7f | ||
|
|
0427a76b55 | ||
|
|
ba7bbed7b1 | ||
|
|
0138e46ee5 | ||
|
|
8ca483c63e | ||
|
|
2b06bc26bf | ||
|
|
1db55185d7 | ||
|
|
d6a90f23a5 | ||
|
|
c8cd1e23ef | ||
|
|
34fef28ed6 | ||
|
|
d20d20f46a | ||
|
|
acdd626d4f | ||
|
|
f3a0e7a1a8 | ||
|
|
545a0c5473 | ||
|
|
4eb34ba7d9 | ||
|
|
7bab2742a5 | ||
|
|
154fd08183 | ||
|
|
07eb1386de | ||
|
|
162401ee19 | ||
|
|
a0a12bc709 | ||
|
|
d2b8ef4471 | ||
|
|
a2ac9ff896 | ||
|
|
04e539ab0f | ||
|
|
2f5f96290f | ||
|
|
198a3575f8 | ||
|
|
69fa2c9156 | ||
|
|
37cc5dd080 | ||
|
|
a3cbc19de9 | ||
|
|
b56feefd8a | ||
|
|
96ac0d8715 | ||
|
|
b5c381d992 | ||
|
|
aaa719214d | ||
|
|
5c5bce467f | ||
|
|
b7a604ebee | ||
|
|
88417f35a4 | ||
|
|
8e981e1b7e | ||
|
|
67aa3c0609 | ||
|
|
4e71f8009a | ||
|
|
692f0fa8b1 | ||
|
|
cd15a1a586 | ||
|
|
e8a53d6b24 | ||
|
|
00c22d4a72 | ||
|
|
bb92e4541a | ||
|
|
e7f05c31e0 | ||
|
|
306dbabc7d | ||
|
|
f18ffb7940 | ||
|
|
850ff211ca | ||
|
|
40000ae026 | ||
|
|
dad7d38202 | ||
|
|
8cf8a2c037 | ||
|
|
c847b349a2 | ||
|
|
4070945270 | ||
|
|
b40f975c14 | ||
|
|
fbe2a01519 | ||
|
|
0b10009d5e | ||
|
|
b724ce1a0c | ||
|
|
ab2773ba86 | ||
|
|
bc4b3ab17f | ||
|
|
f42ff13824 | ||
|
|
b736cbafc6 | ||
|
|
090bfb5629 | ||
|
|
73eb306eb2 | ||
|
|
71cfd9e1cd | ||
|
|
1dec372d18 | ||
|
|
7536744d93 | ||
|
|
b50a28132b | ||
|
|
c804cb8c1c | ||
|
|
fd5b63f58c | ||
|
|
7229fb90de | ||
|
|
81c7c162bb | ||
|
|
20b4080f40 | ||
|
|
4f9805b254 | ||
|
|
d245f134b7 | ||
|
|
84177f43f4 | ||
|
|
438ce904ab | ||
|
|
de5114a480 | ||
|
|
a0472438c8 | ||
|
|
a3e660ff63 | ||
|
|
271f6d1e03 | ||
|
|
2ad4dce50e | ||
|
|
78ba874dbf | ||
|
|
4028c9a465 | ||
|
|
1d4a1d4b66 | ||
|
|
23eaff080b | ||
|
|
bc55d24e08 | ||
|
|
c50cb855d1 | ||
|
|
cf638997f6 | ||
|
|
a42e3cd63c | ||
|
|
b58b630be0 | ||
|
|
aa4c592d9e | ||
|
|
133c280dc2 | ||
|
|
3e23c9143a | ||
|
|
3ce56c08df | ||
|
|
ee29eb98a0 | ||
|
|
1d453b7883 | ||
|
|
f0fae107ba | ||
|
|
242f668aa6 | ||
|
|
97e732e9e3 | ||
|
|
5f6a8c5a12 | ||
|
|
6aa4e87b35 | ||
|
|
c098674ab8 | ||
|
|
7b03a9fffe | ||
|
|
9235cd035a | ||
|
|
6162e71d29 | ||
|
|
a060075d08 | ||
|
|
5474cd846d | ||
|
|
f207999117 | ||
|
|
f51a52e895 | ||
|
|
82d375b517 | ||
|
|
8ad28e8932 | ||
|
|
5f2abc725b | ||
|
|
f4c4bfda70 | ||
|
|
2cf74bedca | ||
|
|
3646e0ab15 | ||
|
|
a79c4303aa | ||
|
|
79e63fa7ad | ||
|
|
10842830dc | ||
|
|
016ee632c1 | ||
|
|
5015834d69 | ||
|
|
58d3f5101c | ||
|
|
f2992a76fa | ||
|
|
8cc83af502 | ||
|
|
64f6ac55e7 | ||
|
|
a7cddab9fb | ||
|
|
1cfc17766a | ||
|
|
c8ba21dac2 | ||
|
|
fe293c6f25 | ||
|
|
6dca528381 | ||
|
|
fcff5ccf7e | ||
|
|
a65f4318f5 | ||
|
|
cc5a3106aa | ||
|
|
c4a02e05e1 | ||
|
|
67312e3a7e | ||
|
|
767f689351 | ||
|
|
334c4920d9 | ||
|
|
0c1f605dbb | ||
|
|
c0ea28cf9c | ||
|
|
28aa2285f5 | ||
|
|
a757504877 | ||
|
|
aa3a00a40f | ||
|
|
1035052f02 | ||
|
|
c370c885e6 | ||
|
|
2c39167025 | ||
|
|
ff1d392196 | ||
|
|
20518259aa | ||
|
|
5aa3e61686 | ||
|
|
12a39ac405 | ||
|
|
2a8bda69e5 | ||
|
|
ebf498edf8 | ||
|
|
357d8b3d11 | ||
|
|
91eee09e2f | ||
|
|
2b18310050 | ||
|
|
61586beb45 | ||
|
|
eced5e522e | ||
|
|
352dc9038f | ||
|
|
9c4aeda85c | ||
|
|
ac8d146c98 | ||
|
|
98021cb87f | ||
|
|
588e1eca90 | ||
|
|
d5c3841198 | ||
|
|
da8ee3a6d7 | ||
|
|
672b5a7cf5 | ||
|
|
3ca986e5a5 | ||
|
|
8c448da19a | ||
|
|
2f37dd9c03 | ||
|
|
9da964657d | ||
|
|
50c10f31fa | ||
|
|
9cb4889a9c | ||
|
|
426e8e463a | ||
|
|
2c25cc9f27 | ||
|
|
ea01415b5f | ||
|
|
21b9239c8d | ||
|
|
aab8a631f0 | ||
|
|
2506405d8c | ||
|
|
3cda0c4dd9 | ||
|
|
8ca6f46c4a | ||
|
|
ec7f54809f | ||
|
|
cfcb11ae61 | ||
|
|
01c8aca36a | ||
|
|
4c6403a4ca | ||
|
|
1d3049b743 | ||
|
|
932bf729b0 | ||
|
|
48007b141b | ||
|
|
5ddf730c7d | ||
|
|
6fb70c3945 | ||
|
|
cce667e019 | ||
|
|
6a72fecbb1 | ||
|
|
4328eb7770 | ||
|
|
a33f5dcd6f | ||
|
|
21cb0e191e | ||
|
|
f6d20a6324 | ||
|
|
254ab9a25a | ||
|
|
b48182f7cc | ||
|
|
4adf23e57c | ||
|
|
95fff255cf | ||
|
|
05d2a5aa8c | ||
|
|
ff70491e55 | ||
|
|
43d739638d | ||
|
|
2c65bb5996 | ||
|
|
74823fe2fe | ||
|
|
9137aed8db | ||
|
|
6f9d851965 | ||
|
|
cd415699b7 | ||
|
|
9402db9fd5 | ||
|
|
96e9d897ec | ||
|
|
5384e9ab96 | ||
|
|
cf65c780c8 | ||
|
|
e1a88ef5d9 | ||
|
|
86ea5f8cb9 | ||
|
|
db0b81b4a0 | ||
|
|
e7ed4ae9bc | ||
|
|
60b4425a47 | ||
|
|
742a0fde42 | ||
|
|
b1d87f4d66 | ||
|
|
5a2dbc4e67 | ||
|
|
6edf8b58fc | ||
|
|
dd0debd51e | ||
|
|
c520910d5c | ||
|
|
8c0b9a0f6a | ||
|
|
4876191e7a | ||
|
|
5168dd59ce | ||
|
|
09d710b928 | ||
|
|
d3580668b6 | ||
|
|
0c9576603d | ||
|
|
f10ade8795 | ||
|
|
483244bda2 | ||
|
|
d69412b1f8 | ||
|
|
66806d60a5 | ||
|
|
9d169c568b | ||
|
|
3acf6a40ad | ||
|
|
3158f9265f | ||
|
|
df8fd31e75 | ||
|
|
44bb9ac086 | ||
|
|
cb9b57a04c | ||
|
|
f694b617cf | ||
|
|
f19e2a916e | ||
|
|
a51141d497 | ||
|
|
aee5745172 | ||
|
|
cebd463d58 | ||
|
|
45548f2de9 | ||
|
|
6ad3ba192b | ||
|
|
f8fbabaef9 | ||
|
|
328d2c432e | ||
|
|
f871c36080 | ||
|
|
33c579f14f | ||
|
|
aa47820ee7 | ||
|
|
b6659ea15e | ||
|
|
cca73a5045 | ||
|
|
c6fa2a688c | ||
|
|
2733cbcc62 | ||
|
|
f1f8f653e4 | ||
|
|
d6cd97c798 | ||
|
|
61a9e88cd0 | ||
|
|
c357373310 | ||
|
|
15cd481713 | ||
|
|
7bbf05af21 | ||
|
|
20d400178b | ||
|
|
8fde50fabf | ||
|
|
69c2baae51 | ||
|
|
9b48e85b26 | ||
|
|
913a055e7e | ||
|
|
ff76c698f4 | ||
|
|
8136345484 | ||
|
|
def85ca1ac | ||
|
|
f9d762534d | ||
|
|
68af3c7495 | ||
|
|
da17758614 | ||
|
|
76761acb9b | ||
|
|
c05be6d4f8 | ||
|
|
978afdd829 | ||
|
|
38e8da994e | ||
|
|
c99cf9d0d9 | ||
|
|
52cf34ba29 | ||
|
|
ca06085dfb | ||
|
|
9ddd8472b1 | ||
|
|
4411a32522 | ||
|
|
892e09cb53 | ||
|
|
01439d0779 | ||
|
|
f1fe2ac81b | ||
|
|
c5de588fd3 | ||
|
|
1e5442a1b9 | ||
|
|
0ccddc04c0 | ||
|
|
fd4aa227d3 | ||
|
|
7d841e938c | ||
|
|
a47f73cf10 | ||
|
|
9acb7a5290 | ||
|
|
15a501b2cd | ||
|
|
0f110fca33 | ||
|
|
3060b99a89 | ||
|
|
53f1d6dded | ||
|
|
145dcdf1d3 | ||
|
|
a676dca6b4 | ||
|
|
7c28f2c54d | ||
|
|
a1645e8b46 | ||
|
|
52c120e5ac | ||
|
|
5913c515b9 | ||
|
|
b89bc452e6 | ||
|
|
ff1bba7679 | ||
|
|
da6855193b | ||
|
|
7d2903b1a8 | ||
|
|
a6ae2ec816 | ||
|
|
c23055a7d3 | ||
|
|
2ee9dcfeb2 | ||
|
|
4478c521e6 | ||
|
|
36fb3391cc | ||
|
|
74b91ac5b0 | ||
|
|
ca7c0d47b0 | ||
|
|
6bcb1de304 | ||
|
|
bbf72bb27b | ||
|
|
f62b276033 | ||
|
|
f9339229bc | ||
|
|
c60c96a672 | ||
|
|
0ff3d3133b | ||
|
|
5e5577e685 | ||
|
|
1a4e2986ad | ||
|
|
90097909ce | ||
|
|
ba25120dea | ||
|
|
1c07fcc6fa | ||
|
|
f0bc867220 | ||
|
|
4ee64ed1ef | ||
|
|
02202e3d06 | ||
|
|
43012a5399 | ||
|
|
2e8c183c3a | ||
|
|
9fefe9d19e | ||
|
|
f3896483ad | ||
|
|
a358e5bf01 | ||
|
|
071f1f35b7 | ||
|
|
07d2ca87b9 | ||
|
|
5a8557bf63 | ||
|
|
698e6c6ee7 | ||
|
|
f3f5f53535 | ||
|
|
00e0a820c7 | ||
|
|
7d84c0ca1f | ||
|
|
c1992434d0 | ||
|
|
0c61ffbe19 | ||
|
|
81c6543650 | ||
|
|
31cd2163e5 | ||
|
|
9668623b25 | ||
|
|
e733980e33 | ||
|
|
e9645e6b05 | ||
|
|
19041335b4 | ||
|
|
3819e42593 | ||
|
|
897eb97d46 | ||
|
|
9b22fc3f5d | ||
|
|
91a353900a | ||
|
|
fb82801bda | ||
|
|
d8c13c8420 | ||
|
|
bea1900fdc | ||
|
|
439d702e97 | ||
|
|
e67720f066 | ||
|
|
90dab3a4c6 | ||
|
|
a49e340622 | ||
|
|
d7ca6bdc6e | ||
|
|
2355bb2796 | ||
|
|
02013be08a | ||
|
|
7f7c4c857e | ||
|
|
09e00c02b9 | ||
|
|
1b41b6e568 | ||
|
|
2665ebf52b | ||
|
|
da807e5b8e | ||
|
|
4d3a94ca17 | ||
|
|
b37cdc2c6d | ||
|
|
41c293ed1f | ||
|
|
5cdde0eeaa | ||
|
|
3e0bfc581c | ||
|
|
9463887112 | ||
|
|
7e77183dad | ||
|
|
9fe7069eed | ||
|
|
ffd0ccdf21 | ||
|
|
30df2c5b07 | ||
|
|
db40973bea | ||
|
|
a641485921 | ||
|
|
7b571f630c | ||
|
|
931b3f57a1 | ||
|
|
080b3a77f3 | ||
|
|
d56b9b7ac9 | ||
|
|
244909db85 | ||
|
|
98571c3779 | ||
|
|
32234cd1dd | ||
|
|
4608c34dc8 | ||
|
|
fb4bbb1ce5 | ||
|
|
5fe760c40b | ||
|
|
80b0feb611 | ||
|
|
825fad4109 | ||
|
|
1226f0bd21 | ||
|
|
3a837e4cf3 | ||
|
|
8ea2415586 | ||
|
|
14f4c81e75 | ||
|
|
20f9ad40d3 | ||
|
|
1cd58f4a01 | ||
|
|
e98cdd4028 | ||
|
|
26308abc70 | ||
|
|
635e7111cf | ||
|
|
54a8822bf8 | ||
|
|
b3514773ad | ||
|
|
c85188b026 | ||
|
|
220dff2802 | ||
|
|
8cab0c78df | ||
|
|
30236f9bbc | ||
|
|
641efad649 | ||
|
|
b5b8e5b59b | ||
|
|
f556d9fe29 | ||
|
|
c94be39f02 | ||
|
|
ec9a0bbaf0 | ||
|
|
bf6213aca1 | ||
|
|
249468c601 | ||
|
|
5f0b738264 | ||
|
|
5f9a06c1e4 | ||
|
|
5f5f246c2e | ||
|
|
c21801767f | ||
|
|
e5b7921860 | ||
|
|
54487a73c0 | ||
|
|
698591fe28 | ||
|
|
53e50bbd95 | ||
|
|
d665c89799 | ||
|
|
717fd0376b | ||
|
|
17889c2b33 | ||
|
|
284785841a | ||
|
|
54e8ab3b7e | ||
|
|
09304c198c | ||
|
|
2209d6147e | ||
|
|
faea36a92b | ||
|
|
e9005637af | ||
|
|
65413baccd | ||
|
|
0ce73064f5 | ||
|
|
6632846f10 | ||
|
|
3cff00b5b8 | ||
|
|
f5479e13db | ||
|
|
6cc6056e37 | ||
|
|
a70cc585a9 | ||
|
|
626c2452d8 | ||
|
|
d27657b113 | ||
|
|
36fd26264e | ||
|
|
51656cbaa1 | ||
|
|
dc8ec75ada | ||
|
|
58685dacb2 | ||
|
|
10f9f57218 | ||
|
|
bb14060517 | ||
|
|
a77180a0ba | ||
|
|
d47ecacf1f | ||
|
|
5813e99f0c | ||
|
|
38b3bec2a8 | ||
|
|
27bfda94a0 | ||
|
|
cbb224046c | ||
|
|
053cda1017 | ||
|
|
5079560037 | ||
|
|
4d1eaa9766 | ||
|
|
41e6b5da7d | ||
|
|
bcf74fbe71 | ||
|
|
f189803bb7 | ||
|
|
56c460e6c3 | ||
|
|
db048652cc | ||
|
|
f71e824539 | ||
|
|
dbc5ff378a | ||
|
|
7f05b61ad9 | ||
|
|
8147001f3f | ||
|
|
325639a49c | ||
|
|
38e31df6d7 | ||
|
|
5722b25429 | ||
|
|
74421024ea | ||
|
|
6cea220256 | ||
|
|
3a4e41c531 | ||
|
|
9cbb706302 | ||
|
|
ecc53303d1 | ||
|
|
aeeb7a3c72 | ||
|
|
7230be701e | ||
|
|
b5e7111e78 | ||
|
|
05dd539f4f | ||
|
|
b51259cb91 | ||
|
|
4227a8a080 | ||
|
|
b4ded6f746 | ||
|
|
4f008796d7 | ||
|
|
46e5130e08 | ||
|
|
0f0c4eac6e | ||
|
|
3331723aea | ||
|
|
95836a73cd | ||
|
|
04a8c6f784 | ||
|
|
665b295a96 | ||
|
|
07cdf26aaf | ||
|
|
e0aac13710 | ||
|
|
6f21745537 | ||
|
|
49405c509b | ||
|
|
94bc2a512d | ||
|
|
2b6e44015b | ||
|
|
f5c412c286 | ||
|
|
9fbce21de9 | ||
|
|
dc7a481463 | ||
|
|
dc57d62f34 | ||
|
|
cd059c02a2 | ||
|
|
5ce226edd7 | ||
|
|
54d629155b | ||
|
|
c83aa7e8a8 | ||
|
|
f725e491f0 | ||
|
|
3fdea1b1d8 | ||
|
|
75f645e9cf | ||
|
|
7bf75b69cd | ||
|
|
c94c34e6a8 | ||
|
|
258fa43bba | ||
|
|
0ef0ebabd2 | ||
|
|
4cd6d85bc1 | ||
|
|
16a1e25f42 | ||
|
|
84e4a24ff5 | ||
|
|
99a217cef6 | ||
|
|
97d517abd9 | ||
|
|
b326e6ea6f | ||
|
|
ddfdf68c83 | ||
|
|
07e9ad4a21 | ||
|
|
2d80646cc4 | ||
|
|
cd39b484f5 | ||
|
|
1c19b70ae9 | ||
|
|
257b406d73 | ||
|
|
70fe0fde1e | ||
|
|
470e636e55 | ||
|
|
436853dd03 | ||
|
|
f9994b33af | ||
|
|
47584f3106 | ||
|
|
ef985e2aef | ||
|
|
4f34f1fd2e | ||
|
|
c633d1c0e8 | ||
|
|
e347a43738 | ||
|
|
636927e4eb | ||
|
|
49f03f9701 | ||
|
|
93d7277bfe | ||
|
|
4b7b140c7b | ||
|
|
b17716780a | ||
|
|
2992250745 | ||
|
|
ef802bb1ce | ||
|
|
076c260793 | ||
|
|
7162116ae3 | ||
|
|
5ea5869897 | ||
|
|
fb2cf4e5e3 | ||
|
|
7d327e7864 | ||
|
|
ce630ee253 | ||
|
|
4de3d3f505 | ||
|
|
6c331f733b | ||
|
|
853f501ffd | ||
|
|
6b877e8136 | ||
|
|
8c5b8b0a70 | ||
|
|
a7f1ef2c3b | ||
|
|
a34bc80f19 | ||
|
|
267a17858f | ||
|
|
81340be2e1 | ||
|
|
87f46d2785 | ||
|
|
503c2c6f72 | ||
|
|
6348aa884f | ||
|
|
0435cc4e48 | ||
|
|
1e715285fa | ||
|
|
f3707a3499 | ||
|
|
552d1ac872 | ||
|
|
6078c9a686 | ||
|
|
564eadec11 | ||
|
|
d6b9df4109 | ||
|
|
95539580a7 | ||
|
|
34a03b0e26 | ||
|
|
cad219d7e1 | ||
|
|
4a383a9dc1 | ||
|
|
5ee14bc859 | ||
|
|
e6f22a1f18 | ||
|
|
fe6a5dd91c | ||
|
|
263aa86211 | ||
|
|
718dfc6fd1 | ||
|
|
372f96b3a9 | ||
|
|
af3079377f | ||
|
|
62042d3aaa | ||
|
|
ce94610a72 | ||
|
|
7648f0cdc8 | ||
|
|
a4f8519bcf | ||
|
|
6cade6a1da | ||
|
|
fc420221cf | ||
|
|
be202cef6a | ||
|
|
06a1d5d1bb | ||
|
|
79a310181c | ||
|
|
46d2629fca | ||
|
|
83dd4da4ec | ||
|
|
fb321c58a7 | ||
|
|
0840f04847 | ||
|
|
8a19914a07 | ||
|
|
dc1dc42bef | ||
|
|
9c64cde003 | ||
|
|
1d80041c16 | ||
|
|
fb9bdd22c4 | ||
|
|
f552c657b6 | ||
|
|
0c10e928fc | ||
|
|
58bd2b08a4 | ||
|
|
fd3e33d836 | ||
|
|
cac8da9b4d | ||
|
|
c57a32143b | ||
|
|
6db029263c | ||
|
|
498b2ff70f | ||
|
|
710f8fc632 | ||
|
|
0c18e29aaf | ||
|
|
08f679c422 | ||
|
|
0578fa3ca5 | ||
|
|
7ef195f49e | ||
|
|
a5fc08a821 | ||
|
|
88392fd5dd | ||
|
|
ae03bdecad | ||
|
|
240b2b226b | ||
|
|
b52090d1f2 | ||
|
|
7664edb9a1 | ||
|
|
5a156467d7 | ||
|
|
5951b1b9cb | ||
|
|
29bf353e40 | ||
|
|
69014e83c5 | ||
|
|
25881ff06a | ||
|
|
d6e82eb8c1 | ||
|
|
2cc67af409 | ||
|
|
88c20f798f | ||
|
|
ce36250e60 | ||
|
|
ec26e3c9f7 | ||
|
|
cfbf4bbe85 | ||
|
|
95b08e1db0 | ||
|
|
382ad87c5f | ||
|
|
bbddb31752 | ||
|
|
81da17ddd4 | ||
|
|
e5a3c4c102 | ||
|
|
63c3326265 | ||
|
|
cda78cfc7d | ||
|
|
f9ec08adea | ||
|
|
50607df3ef | ||
|
|
00ead74204 | ||
|
|
3fba0a3eeb | ||
|
|
ebaf4ebe16 | ||
|
|
ff7ed50e82 | ||
|
|
0c1e34c2cc | ||
|
|
5d9bd3018a | ||
|
|
ef5349098d | ||
|
|
4ddf2dbe86 | ||
|
|
7a37df319c | ||
|
|
e8eea11ca6 | ||
|
|
8e413db8d1 | ||
|
|
ec48417e20 | ||
|
|
9942a194a6 | ||
|
|
70aac955c6 | ||
|
|
24a043195a | ||
|
|
d3a6f46c6c | ||
|
|
1a49db8a1b | ||
|
|
d971fe94ee | ||
|
|
fc228964fd | ||
|
|
7e45b458e9 | ||
|
|
eb7c44de18 | ||
|
|
6cb0a05720 | ||
|
|
387f1688f4 | ||
|
|
eec8939461 | ||
|
|
feb063a4ed | ||
|
|
56d0ad2711 | ||
|
|
9b641edc11 | ||
|
|
398b7b76a5 | ||
|
|
a357c9f20e | ||
|
|
680a12d83b | ||
|
|
9df80032a7 | ||
|
|
8ef27add1c | ||
|
|
8ab6b6e955 | ||
|
|
08d667d4d1 | ||
|
|
8698d12d1f | ||
|
|
618a42c5df | ||
|
|
f7e3f7d7ec | ||
|
|
a2f6578503 | ||
|
|
53f029052b | ||
|
|
ce5125db9c | ||
|
|
d6b9402ce0 | ||
|
|
8780365e17 | ||
|
|
c008dfdfd7 | ||
|
|
2ee787f08b | ||
|
|
71a7e7e7f6 | ||
|
|
bd088ab9ec | ||
|
|
8e51f99c7a | ||
|
|
d589eef853 | ||
|
|
5b6c978620 | ||
|
|
7dc6dc6a6d | ||
|
|
23cfbf6f1e | ||
|
|
d06406c200 | ||
|
|
6d9f2ec6be | ||
|
|
c2f66b61ec | ||
|
|
86cfeafd8d | ||
|
|
e7a7461d9d | ||
|
|
6615326edb | ||
|
|
64c3a2c4bd | ||
|
|
8f6098834f | ||
|
|
e204b60ac4 | ||
|
|
0177599442 | ||
|
|
9f0a2b99b7 | ||
|
|
42a1229f1f | ||
|
|
cdcc42c90a | ||
|
|
875d335cc9 | ||
|
|
989153815f | ||
|
|
b3ea041b67 | ||
|
|
54f9b68b3d | ||
|
|
a0da13bc4f | ||
|
|
dbd4a79589 | ||
|
|
158ff3b961 | ||
|
|
c62b55fea4 | ||
|
|
aeafac22b0 | ||
|
|
225460f522 | ||
|
|
7522e79f7d | ||
|
|
ed8719c27b | ||
|
|
31c6ffdd17 | ||
|
|
0085493b3f | ||
|
|
c234663f87 | ||
|
|
061fecf7b4 | ||
|
|
609242bce8 | ||
|
|
916f0eb793 | ||
|
|
9dff5967fb | ||
|
|
c25001c5e4 | ||
|
|
f0e53d4a8e | ||
|
|
a4b277e875 | ||
|
|
ba788eec9c | ||
|
|
fa575da721 | ||
|
|
ad58cb76aa | ||
|
|
b574313e61 | ||
|
|
c3862297b1 | ||
|
|
e192d37bf0 | ||
|
|
252a45fbb4 | ||
|
|
90e813a06c | ||
|
|
0a93ccb818 | ||
|
|
05e3046af8 | ||
|
|
0bb91186a8 | ||
|
|
7433530998 | ||
|
|
aefd10c029 | ||
|
|
b1b58da3ec | ||
|
|
5be0cb5d2e | ||
|
|
19d2bab0d1 | ||
|
|
aecbf0fb26 | ||
|
|
4a8c3a58f7 | ||
|
|
2223845ab3 | ||
|
|
753d8b020a | ||
|
|
ae91e47a73 | ||
|
|
930f0781b8 | ||
|
|
8f913dff0b | ||
|
|
c82f454e42 | ||
|
|
1ee5d79866 | ||
|
|
02b24953ea | ||
|
|
b29dedbb79 | ||
|
|
36c68df5ff | ||
|
|
ea13e89146 | ||
|
|
044e6c8b7a | ||
|
|
b256db65d4 | ||
|
|
e44afc9208 | ||
|
|
af45c451a3 | ||
|
|
ea91894cec | ||
|
|
c9386a445b | ||
|
|
73411593b2 | ||
|
|
d1a318f8ed | ||
|
|
cfcc229000 | ||
|
|
5e25bc623c | ||
|
|
cb2abab70c | ||
|
|
fdfa70c765 | ||
|
|
2f80bbf379 | ||
|
|
0391304024 | ||
|
|
03152e4e6a | ||
|
|
553622cfec | ||
|
|
3eb357055f | ||
|
|
25398327c7 | ||
|
|
700ef231df | ||
|
|
b5a21838d2 | ||
|
|
602647891c | ||
|
|
ff4c34fe33 | ||
|
|
7f8d6f96f1 | ||
|
|
8cbdcca40f | ||
|
|
c065f693a9 | ||
|
|
d78f2df9a8 | ||
|
|
ce164d3047 | ||
|
|
bd9b04ce0b | ||
|
|
2304e115da | ||
|
|
073568d6ac | ||
|
|
8ed6d18190 | ||
|
|
f04d55adab | ||
|
|
960e4ff358 | ||
|
|
b3c1b156ee | ||
|
|
9dd3128a65 | ||
|
|
cb3cb00e2b | ||
|
|
da81509157 | ||
|
|
48a4c60737 | ||
|
|
2019c0ce3c | ||
|
|
09596e9b4b | ||
|
|
482a3313c4 | ||
|
|
fa8225fb1b | ||
|
|
ca93aceafc | ||
|
|
3d8dcc0026 | ||
|
|
8cba160af8 | ||
|
|
d743d7e90d | ||
|
|
cde5b80c2d | ||
|
|
3b5010c0a7 | ||
|
|
cc6624bfdc | ||
|
|
0e30db3463 | ||
|
|
bda65b483e | ||
|
|
2155c58989 | ||
|
|
c3928fdc2b | ||
|
|
8c625e93c7 | ||
|
|
c4b91ebbc6 | ||
|
|
6d63798ccf | ||
|
|
a32586bf3b | ||
|
|
b1f91d3b8a | ||
|
|
89b0a06e51 | ||
|
|
c5acc25dec | ||
|
|
59ccb0fe6a | ||
|
|
007db8d508 | ||
|
|
17fbb29957 | ||
|
|
c2e3636062 | ||
|
|
8ed540890b | ||
|
|
48c1263ea1 | ||
|
|
bad571aecb | ||
|
|
98ff3cdfcf | ||
|
|
5936ec1986 | ||
|
|
2dd2f6c38e | ||
|
|
c783c1ef31 | ||
|
|
52d7a7a3f7 | ||
|
|
a5e3a277ba | ||
|
|
71a0a69bd3 | ||
|
|
404e1b8eee | ||
|
|
2fd56afe2a | ||
|
|
bf4920de93 | ||
|
|
c66aafe7fe | ||
|
|
c58c603e6d | ||
|
|
1fa17bf10c | ||
|
|
33e751a44c | ||
|
|
fc574a31ff | ||
|
|
0d406530eb | ||
|
|
26795ece3f | ||
|
|
341309e7ae | ||
|
|
89ff54a15e | ||
|
|
4351b74a91 | ||
|
|
2e060cba45 | ||
|
|
690acf286c | ||
|
|
d5e193d0a8 | ||
|
|
d961a4283b | ||
|
|
361e5a8500 | ||
|
|
001c51c8fe | ||
|
|
8954c63285 | ||
|
|
c7e06ed519 | ||
|
|
da1de47927 | ||
|
|
61e2cc16ad | ||
|
|
a71544a78d | ||
|
|
b8d5800434 | ||
|
|
e280061dff | ||
|
|
f4b4609acc | ||
|
|
87f260d25a | ||
|
|
dbf4c2e8ca | ||
|
|
1eb153f51f | ||
|
|
1c7bcdebc7 | ||
|
|
e41af85715 | ||
|
|
f97f17bceb | ||
|
|
19db4fdae9 | ||
|
|
8b65320491 | ||
|
|
e60e869fe9 | ||
|
|
915583d915 | ||
|
|
eab480f0be | ||
|
|
2939556800 | ||
|
|
df0c4489db | ||
|
|
bca85e7e5f | ||
|
|
d748ca1bde | ||
|
|
164ec113cd | ||
|
|
39eea4be5a | ||
|
|
94121da0f3 | ||
|
|
b2b8c0de2d | ||
|
|
c1414de552 | ||
|
|
fc1487bda4 | ||
|
|
ddfabc0010 | ||
|
|
42bf6ec73b | ||
|
|
30213e9b0b | ||
|
|
4c3f919238 | ||
|
|
ddd3d33edc | ||
|
|
388505c899 | ||
|
|
da41c7f7fa | ||
|
|
8af945d8c2 | ||
|
|
b599dc9acb | ||
|
|
55d26693bc | ||
|
|
95499542a4 | ||
|
|
651be0c50d | ||
|
|
79ee417ae6 | ||
|
|
707ad2da70 | ||
|
|
3979af71cb | ||
|
|
58620ac519 | ||
|
|
d326750222 | ||
|
|
8db24bdcd6 | ||
|
|
41daf2ede5 | ||
|
|
2caf609a2e | ||
|
|
1a95fb3d3a | ||
|
|
24188de9e0 | ||
|
|
4bfe4278f3 | ||
|
|
061575bb94 | ||
|
|
00a37fb263 | ||
|
|
8130eea859 | ||
|
|
3c33c2ecbb | ||
|
|
317f1ffbb8 | ||
|
|
87892b27e7 | ||
|
|
5ed7bc2c6f | ||
|
|
1d52cc5acf | ||
|
|
eb1c0e1513 | ||
|
|
e729f04917 | ||
|
|
a6de4df777 | ||
|
|
509e81888c | ||
|
|
c0e2295c1c | ||
|
|
56cf1d0873 | ||
|
|
0b5c74b458 | ||
|
|
e8e9b46206 | ||
|
|
52a1fa9f3a | ||
|
|
e5d31344b9 | ||
|
|
302259e30d | ||
|
|
398071a272 | ||
|
|
7fa66930a4 | ||
|
|
3e2a8c932e | ||
|
|
357962ec97 | ||
|
|
6d613f715f | ||
|
|
906c147ed6 | ||
|
|
d228228eee | ||
|
|
30a6e29897 | ||
|
|
11d88c887f | ||
|
|
213a9a362d | ||
|
|
f1a7c4588b | ||
|
|
82b64c2e38 | ||
|
|
be11b0767e | ||
|
|
0fb3684a18 | ||
|
|
25a7aeacfa | ||
|
|
4804eed0a7 | ||
|
|
07585a01ed | ||
|
|
8346df60ec | ||
|
|
047149798b | ||
|
|
b84006d8db | ||
|
|
e20d398a73 | ||
|
|
a8ee396ffa | ||
|
|
56924fb447 | ||
|
|
5b8f797b33 | ||
|
|
f2769dc182 | ||
|
|
fe67add571 | ||
|
|
70764f1ea4 | ||
|
|
e86638e490 | ||
|
|
1e87f6497c | ||
|
|
16acc3a959 | ||
|
|
06efe3f5c3 | ||
|
|
3c45093632 | ||
|
|
f33a1b997f | ||
|
|
835e9b7eea | ||
|
|
f9bee11001 | ||
|
|
ede8f40b0d | ||
|
|
7dcaa3eda0 | ||
|
|
2a5184f4fc | ||
|
|
0b1c02ac96 | ||
|
|
8b3c472d70 | ||
|
|
8ccea3750e | ||
|
|
222969e8a3 | ||
|
|
f9463c0f82 | ||
|
|
6b27653a99 | ||
|
|
50faf01d10 | ||
|
|
ad71343650 | ||
|
|
f234ed0614 | ||
|
|
69797fd29c | ||
|
|
2163ce3c4c | ||
|
|
a57b186c67 | ||
|
|
4c11217dda | ||
|
|
78b1285b37 | ||
|
|
1ef6d51497 | ||
|
|
1b7bdd2ad9 | ||
|
|
cfd22623b7 | ||
|
|
7b7fb33b7b | ||
|
|
c64763cb35 | ||
|
|
c80bb876a3 | ||
|
|
fbea655e96 | ||
|
|
5390147985 | ||
|
|
81e871cca9 | ||
|
|
f016d5fb4a | ||
|
|
319b9e04dd | ||
|
|
6bb91552f7 | ||
|
|
7c66446459 | ||
|
|
f38adacbe4 | ||
|
|
479d2d427a | ||
|
|
6be5f42ddd | ||
|
|
93524d515a | ||
|
|
2fa3b1c7b2 | ||
|
|
4a62ea0cd3 | ||
|
|
1fd6dca941 | ||
|
|
647cf7ca7d | ||
|
|
49823d457c | ||
|
|
5f34ef68cc | ||
|
|
f6abbc99ab | ||
|
|
9ff03e3ec6 | ||
|
|
773a260438 | ||
|
|
7e7e352924 | ||
|
|
cdb3dce63a | ||
|
|
00cc5d896e | ||
|
|
2591d92959 | ||
|
|
5b45022dfb | ||
|
|
a2be5a9430 | ||
|
|
8c08112097 | ||
|
|
5e6b2fb86e | ||
|
|
f3475341a0 | ||
|
|
87899d514b | ||
|
|
acee7cdfb0 | ||
|
|
564aa972dc | ||
|
|
936f50659b | ||
|
|
264dce055c | ||
|
|
ff5b9a897a | ||
|
|
d44fb67f88 | ||
|
|
27f54ebd15 | ||
|
|
94774d917f | ||
|
|
06d71bb2bc | ||
|
|
cc0f35ce70 | ||
|
|
4b329296f2 | ||
|
|
197d76fd3c | ||
|
|
644186a398 | ||
|
|
e2c6990265 | ||
|
|
98f89d87d4 | ||
|
|
3d379d59ef | ||
|
|
a00a5eb5e2 | ||
|
|
2daa9ce7fd | ||
|
|
4dfeb2aa88 | ||
|
|
8603e98b9b | ||
|
|
4b0570770c | ||
|
|
85d23214ec | ||
|
|
2e35abccd0 | ||
|
|
685ae89685 | ||
|
|
2e6ec01711 | ||
|
|
d63d8ff836 | ||
|
|
450ae24e94 | ||
|
|
39b0e0f318 | ||
|
|
ca9a13ea27 | ||
|
|
ca782e7c62 | ||
|
|
29d45b1e3d | ||
|
|
2202465e31 | ||
|
|
454e6b60d7 | ||
|
|
6ff04b408c | ||
|
|
de7c5e84f4 | ||
|
|
18932bf48b | ||
|
|
1b1bfbb3ac | ||
|
|
20a98e2a95 | ||
|
|
8dbf474662 | ||
|
|
26d0cce404 | ||
|
|
eb5142a125 | ||
|
|
4911aa3f15 | ||
|
|
4a8fc9d771 | ||
|
|
0d9216dd35 | ||
|
|
331047957a | ||
|
|
bec1c0c2d8 | ||
|
|
82fa56d66c | ||
|
|
8db6fd7b73 | ||
|
|
b82a7d86e5 | ||
|
|
698269f8b0 | ||
|
|
5e9c85e0fc | ||
|
|
0fca7cd47b | ||
|
|
d56af6043d | ||
|
|
021bf8ce51 | ||
|
|
53e8f44088 | ||
|
|
3f244b2cff | ||
|
|
3178221c44 | ||
|
|
41d0cbcb46 | ||
|
|
e6a2167261 | ||
|
|
7286531bc5 | ||
|
|
91d7f51678 | ||
|
|
5746449cfb | ||
|
|
4bdbf0f493 | ||
|
|
68b9d955f6 | ||
|
|
39ac48884f | ||
|
|
663ca4f441 | ||
|
|
8f3ae4b5a7 | ||
|
|
db77b8c8cb | ||
|
|
dc6d53e6be | ||
|
|
849d628a75 | ||
|
|
22fd2212de | ||
|
|
188a74423b | ||
|
|
8727b5165a | ||
|
|
aa03d356b8 | ||
|
|
d417fb7232 | ||
|
|
156131d4b5 | ||
|
|
dba72cab46 | ||
|
|
0b4a52ccb1 | ||
|
|
6b92748b7c | ||
|
|
00829cf198 | ||
|
|
20ebcad982 | ||
|
|
6f03f38222 | ||
|
|
5c6b9dcec8 | ||
|
|
c9be4a89af | ||
|
|
41e1ffa6e2 | ||
|
|
c9c202f63f | ||
|
|
1dbaf107ca | ||
|
|
ee535692b4 | ||
|
|
df0a290032 | ||
|
|
7de19f142f | ||
|
|
0cfb00e40b | ||
|
|
3cf560f220 | ||
|
|
3bb287b3ef | ||
|
|
49662a7d5f | ||
|
|
d7655aa2be | ||
|
|
a61d515a49 | ||
|
|
94185cc23e | ||
|
|
9ef977aee9 | ||
|
|
34fb441817 | ||
|
|
ac33b36d20 | ||
|
|
372656fea9 | ||
|
|
a872c6e75f | ||
|
|
067b88ab72 | ||
|
|
ffbad698b4 | ||
|
|
71d3c015d9 | ||
|
|
051299d4a5 | ||
|
|
ac9995fb1a | ||
|
|
83d04d02da | ||
|
|
80bad30811 | ||
|
|
f34554f2cb | ||
|
|
e2f331ab6b | ||
|
|
039ed0f569 | ||
|
|
358ad80f21 | ||
|
|
f9a65f7492 | ||
|
|
32cae92848 | ||
|
|
e168c1368c | ||
|
|
9cab0c6443 | ||
|
|
9e7e4cc177 | ||
|
|
523c101e25 | ||
|
|
1428cd8f10 | ||
|
|
1edd256028 | ||
|
|
42201c7c11 | ||
|
|
aec65a2ff5 | ||
|
|
c2b5733ceb | ||
|
|
2e40c98b81 | ||
|
|
6622e88232 | ||
|
|
67cd0b1b46 | ||
|
|
3ec4f9f96d | ||
|
|
530bf8078e | ||
|
|
848f33bd2b | ||
|
|
1d6b76b182 | ||
|
|
bab857778b | ||
|
|
75469a49e8 | ||
|
|
7d2a9f6d94 | ||
|
|
35fddb48de | ||
|
|
89f9baee46 | ||
|
|
797d04fea7 | ||
|
|
5df83b2649 | ||
|
|
0aa8e8653c | ||
|
|
2751e6475e | ||
|
|
e9d25a67f8 | ||
|
|
eef43e8edc | ||
|
|
b60e5fef96 | ||
|
|
b9c1fa723c | ||
|
|
63f4a6ee0d | ||
|
|
894ea65a35 | ||
|
|
73c9a3cdb4 | ||
|
|
de39ac1981 | ||
|
|
6973e6b159 | ||
|
|
7f379f9874 | ||
|
|
3c6b15ee9d | ||
|
|
c6ef28c358 | ||
|
|
2ef5eb6cd0 | ||
|
|
cfc20c6248 | ||
|
|
ea9505c2da | ||
|
|
1c1c54ea8a | ||
|
|
851c81e096 | ||
|
|
78f969d2cc | ||
|
|
ad981835f9 | ||
|
|
f7f9e8db41 | ||
|
|
44f0fe1852 | ||
|
|
8088197e29 | ||
|
|
76797228a0 | ||
|
|
ba3c0fdf72 | ||
|
|
c6a1d584ea | ||
|
|
be5da6e287 | ||
|
|
7c8f54dd5c | ||
|
|
7b2dc52a35 | ||
|
|
e55d991bce | ||
|
|
e47abd6417 | ||
|
|
afaf97aaf8 | ||
|
|
9bafeccd38 | ||
|
|
18afbd6bae | ||
|
|
4d2458da64 | ||
|
|
737d36be67 | ||
|
|
6d1cf4b6bf | ||
|
|
7dc57c67ed | ||
|
|
823b89ec48 | ||
|
|
d428c58e15 | ||
|
|
4b70e19211 | ||
|
|
ae27fffdb0 | ||
|
|
f41a1bc3a1 | ||
|
|
ed5c52cfdc | ||
|
|
5740d2704a | ||
|
|
56e7775c5a | ||
|
|
d4e807ada3 | ||
|
|
0b5a8863f3 | ||
|
|
83b4887dd6 | ||
|
|
2a7f0901af | ||
|
|
71fb4102f6 | ||
|
|
a492cbd815 | ||
|
|
8d4ebe653d | ||
|
|
88026fae3c | ||
|
|
f34ec61458 | ||
|
|
4d42f94be4 | ||
|
|
961ff7fa22 | ||
|
|
4d41b2afda | ||
|
|
ec5b337460 | ||
|
|
1d559ef4d4 | ||
|
|
732e855daa | ||
|
|
b74bc43007 | ||
|
|
f5d79c7035 | ||
|
|
19c8ffb79d | ||
|
|
39ade6f3ab | ||
|
|
8789c0915b | ||
|
|
55ddf7c417 | ||
|
|
58e206d0e9 | ||
|
|
dc0849d82a | ||
|
|
9192cb4606 | ||
|
|
87f7b82e0a | ||
|
|
21df7f05dd | ||
|
|
e6150b3469 | ||
|
|
68bfa944fe | ||
|
|
a973834325 | ||
|
|
6c8b482f65 | ||
|
|
0712b71b71 | ||
|
|
52b9fd8326 | ||
|
|
8e7b27eb16 | ||
|
|
ab79359eff | ||
|
|
f904af3da6 | ||
|
|
48e1c5dc86 | ||
|
|
25214db1dd | ||
|
|
091a08b783 | ||
|
|
cf37303b5e | ||
|
|
ad059eb3d6 | ||
|
|
41028384af | ||
|
|
43ff13867f | ||
|
|
9b66bd186f | ||
|
|
851efa5097 | ||
|
|
35d923d856 | ||
|
|
bf3bf836ac | ||
|
|
8f8a2ef325 | ||
|
|
eeaefb1ed2 | ||
|
|
6a605359d7 | ||
|
|
d603915d2b | ||
|
|
bb4482c08c | ||
|
|
645ecc3a32 | ||
|
|
da96d2ef9f | ||
|
|
084ba6609d | ||
|
|
9cef4b4f79 | ||
|
|
1898fa7717 | ||
|
|
159c7f9e1b | ||
|
|
158ea68265 | ||
|
|
7ce7c71163 | ||
|
|
4e5a03bb65 | ||
|
|
a986becb70 | ||
|
|
aa78b98ebf | ||
|
|
442d806161 | ||
|
|
310d6fe217 | ||
|
|
288cab7c4f | ||
|
|
6f9a6e32bd | ||
|
|
bb8faf14cb | ||
|
|
9be0afacef | ||
|
|
809b574f12 | ||
|
|
5975be44d9 | ||
|
|
7680b4e165 | ||
|
|
80c04d9645 | ||
|
|
abe73c4022 | ||
|
|
13ef219ab1 | ||
|
|
d6d3fd0966 | ||
|
|
43f2f38ae3 | ||
|
|
44500b6500 | ||
|
|
979a263c88 | ||
|
|
c72d0bec8c | ||
|
|
ba82ca3051 | ||
|
|
0032c06498 | ||
|
|
0c0cee756a | ||
|
|
21f66d13ee | ||
|
|
496b165d42 | ||
|
|
3a306a6235 | ||
|
|
6b75e950ec | ||
|
|
f09a323b20 | ||
|
|
6f6c3f70ff | ||
|
|
1c1211a298 | ||
|
|
b3862cea72 | ||
|
|
391352e077 | ||
|
|
de089072fa | ||
|
|
2542eb959a | ||
|
|
76a85a6e3d | ||
|
|
2c861a5ed4 | ||
|
|
8701450940 | ||
|
|
478b22e7c8 | ||
|
|
38436e7f37 | ||
|
|
43a665497d | ||
|
|
1622cb0285 | ||
|
|
3a28111cfc | ||
|
|
b8b8873eaf | ||
|
|
34023f6d08 | ||
|
|
65f7692116 | ||
|
|
2af90d790b | ||
|
|
daa6fe4cbb | ||
|
|
9c7676a3f2 | ||
|
|
06bd653b24 | ||
|
|
441a74a7c9 | ||
|
|
ebd010b6d9 | ||
|
|
9200a3a32b | ||
|
|
54ea96b820 | ||
|
|
ef6b90c2f6 | ||
|
|
bcb2a89388 | ||
|
|
9e37f693c3 | ||
|
|
337377c001 | ||
|
|
8636a1a43d | ||
|
|
b656c8877b | ||
|
|
48ba0edd2e | ||
|
|
e44bfbe9f3 | ||
|
|
5750dd5dc3 | ||
|
|
bb750d3689 | ||
|
|
6940b7af81 | ||
|
|
31eb6f8701 | ||
|
|
989f1cddf8 | ||
|
|
2d06fd6ea9 | ||
|
|
e79427f708 | ||
|
|
68ff0f7bab | ||
|
|
19b22161c9 | ||
|
|
2d84fc3eda | ||
|
|
e823c2e4e1 | ||
|
|
e5a905f04c | ||
|
|
616a501af7 | ||
|
|
c48ba58d55 | ||
|
|
d3236f57d2 | ||
|
|
f327378d18 | ||
|
|
66a1850c49 | ||
|
|
3ac01eca15 | ||
|
|
e7aac019e1 | ||
|
|
628e3f15b1 | ||
|
|
321ce372d2 | ||
|
|
4fa449990f | ||
|
|
d57b4715d0 | ||
|
|
664ad9e4aa | ||
|
|
a31e47ea42 | ||
|
|
1334e2439d | ||
|
|
543db6f8ab | ||
|
|
8fd679d21f | ||
|
|
d4def48c99 | ||
|
|
c805beeb34 | ||
|
|
a2331ad71a | ||
|
|
eaa2c4c269 | ||
|
|
bab765a8f8 | ||
|
|
348b27365b | ||
|
|
164dd3d8ea | ||
|
|
4a91e6eb18 | ||
|
|
b6a0885927 | ||
|
|
93ce83f137 | ||
|
|
d36c168faa | ||
|
|
86c66aab6d | ||
|
|
8c20ba96f6 | ||
|
|
8a630ff007 | ||
|
|
8e55ddfcae | ||
|
|
1e49fa50b5 | ||
|
|
5093663cfd | ||
|
|
b41f34cade | ||
|
|
1972e6308c | ||
|
|
c0c5cb7e93 | ||
|
|
186b6c8649 | ||
|
|
23e68e2d0d | ||
|
|
1247c37d71 | ||
|
|
2d92c78c0b | ||
|
|
07ed7163ea | ||
|
|
4560c231ce | ||
|
|
5a1f6c8b1a | ||
|
|
7a915c7015 | ||
|
|
2663b6dea0 | ||
|
|
cc3c07d0c2 | ||
|
|
e01cb1b94d | ||
|
|
709d320a5a | ||
|
|
e781be25a0 | ||
|
|
f8eb3d03ad | ||
|
|
b2e7160ce7 | ||
|
|
18bb3b807b | ||
|
|
af92ac4048 | ||
|
|
6ab8aa8e72 | ||
|
|
595e2b83f5 | ||
|
|
ea8ffbc510 | ||
|
|
2663fb318c | ||
|
|
1c70fd201a | ||
|
|
6e635d4272 | ||
|
|
2c41a354f3 | ||
|
|
b24eb1ce9e | ||
|
|
d6b626fd47 | ||
|
|
53f7e5d337 | ||
|
|
232accc0da | ||
|
|
56119d2aab | ||
|
|
53d35fa02f | ||
|
|
a68d63d2be | ||
|
|
17dcddcd80 | ||
|
|
7621c4bdc3 | ||
|
|
949498f3a7 | ||
|
|
0b2f2b189c | ||
|
|
050ebc673a | ||
|
|
cc397ed07b | ||
|
|
5c7e0b8098 | ||
|
|
16ebdcde85 | ||
|
|
4e675d007e | ||
|
|
a4dd37fff2 | ||
|
|
20a545825c | ||
|
|
b912e3a35f | ||
|
|
86a7ffb642 | ||
|
|
cd3e5bdd14 | ||
|
|
48db5a76b0 | ||
|
|
630f18792a | ||
|
|
d0cb04a224 | ||
|
|
0e8ac2f43c | ||
|
|
0c60700d82 | ||
|
|
dc285b6c2f | ||
|
|
74009b38c4 | ||
|
|
e820be1de9 | ||
|
|
7db3cbd03d | ||
|
|
27d2433993 | ||
|
|
64eda4cdf7 | ||
|
|
f05961cf07 | ||
|
|
be713c9ccf | ||
|
|
00dc3ee945 | ||
|
|
927007774b | ||
|
|
f4994f66c9 | ||
|
|
aef973a4d9 | ||
|
|
ba618ceba0 | ||
|
|
7f22eca8dc | ||
|
|
862018b63f | ||
|
|
f38143ff7b | ||
|
|
481cde05bf | ||
|
|
a1e6413704 | ||
|
|
8d1b9a18b4 | ||
|
|
6e21fe56e9 | ||
|
|
f0ac042b3c | ||
|
|
13a4264488 | ||
|
|
7ffb65cc38 | ||
|
|
2464c360c0 | ||
|
|
1917ccf35c | ||
|
|
4f9c14da97 | ||
|
|
58e23c1b8c | ||
|
|
34156fc092 | ||
|
|
86fde56129 | ||
|
|
d997d3a7bb | ||
|
|
4e689855f4 | ||
|
|
eace16d7fd | ||
|
|
53b7f9b26f | ||
|
|
983c667725 | ||
|
|
96fd660d46 | ||
|
|
7d1770da8a | ||
|
|
b83f6867f3 | ||
|
|
fa7db42f50 | ||
|
|
80c07a5c5b | ||
|
|
59a4c85aeb | ||
|
|
7fc01d38e8 | ||
|
|
3010422f4e | ||
|
|
1f78bb1a98 | ||
|
|
1d7f32efe4 | ||
|
|
1e3d980437 | ||
|
|
8654b5eef8 | ||
|
|
5781ad1de0 | ||
|
|
e2a1fa15d3 | ||
|
|
50da7413d8 | ||
|
|
e45b945024 | ||
|
|
f3668a77ef | ||
|
|
2aee6cab20 | ||
|
|
6233a0b960 | ||
|
|
0ae469d8e2 | ||
|
|
bcad47ebd5 | ||
|
|
71d179b8c3 | ||
|
|
af35e5100e | ||
|
|
96c97c7dd2 | ||
|
|
d5a41fc8b6 | ||
|
|
c3c3afb3c3 | ||
|
|
4f32dcda16 | ||
|
|
67717e73ad | ||
|
|
1753734581 | ||
|
|
3e408e535c | ||
|
|
f154292cb5 | ||
|
|
ac261533c3 | ||
|
|
1982c984ee | ||
|
|
fb5f82c44f | ||
|
|
840cea06db | ||
|
|
3237e2488e | ||
|
|
98e1e40e18 | ||
|
|
def3fc7b2e | ||
|
|
6057b8f90a | ||
|
|
2847f761bb | ||
|
|
b0a2d2ad80 | ||
|
|
564b814f77 | ||
|
|
433585a231 | ||
|
|
6a4750e302 | ||
|
|
748a6f11c1 | ||
|
|
bdd9a82682 | ||
|
|
c551c157d1 | ||
|
|
7e777229ba | ||
|
|
612bfcba37 | ||
|
|
c44e00a100 | ||
|
|
7f46b3194a | ||
|
|
50b7999dee | ||
|
|
871f84b1ff | ||
|
|
4018a95af0 | ||
|
|
ffe3ff5830 | ||
|
|
9b9b0ab10e | ||
|
|
b19e5fe839 | ||
|
|
f6caf41960 | ||
|
|
67d57de166 | ||
|
|
4d79f17a3a | ||
|
|
245d6d6fc7 | ||
|
|
66bd1feadf | ||
|
|
c02e3549eb | ||
|
|
210b8dcf9d | ||
|
|
bbefa788fd | ||
|
|
2f6eb0908e | ||
|
|
51e4d44fc1 | ||
|
|
ed502daeb9 | ||
|
|
d7da527bd5 | ||
|
|
7c5146bc97 | ||
|
|
91cdf9990b | ||
|
|
7d03609462 | ||
|
|
7be9a06e76 | ||
|
|
3eaecacac0 | ||
|
|
9c5e23090c | ||
|
|
c7b05e530d | ||
|
|
889fa25e58 | ||
|
|
da6945224f | ||
|
|
026a727480 | ||
|
|
2404f547ab | ||
|
|
a9dd82dcf4 | ||
|
|
95443be313 | ||
|
|
5d1805b10e | ||
|
|
72eb175dc3 | ||
|
|
d5cbcaaa15 | ||
|
|
bfa722f6da | ||
|
|
6b9d35983a | ||
|
|
6cf50c7cc9 | ||
|
|
cf05851752 | ||
|
|
1cbbf17392 | ||
|
|
96afeb19b2 | ||
|
|
56da72b16e | ||
|
|
b781868876 | ||
|
|
6a05f4b497 | ||
|
|
b9fa617374 | ||
|
|
c59baee1f5 | ||
|
|
98531d6b2f | ||
|
|
8df5b45525 | ||
|
|
ebba966d52 | ||
|
|
169f35d41f | ||
|
|
8bec9e88a7 | ||
|
|
854aa0153f | ||
|
|
77eaaae6ce | ||
|
|
fd7badec0a | ||
|
|
a834b6ea21 | ||
|
|
31fad72172 | ||
|
|
ef14195e71 | ||
|
|
a2fab32356 | ||
|
|
2dd0ecfa49 | ||
|
|
849fe15728 | ||
|
|
76afab3c78 | ||
|
|
21250794f5 | ||
|
|
9f85ceb2ed | ||
|
|
b6ecdef0c5 | ||
|
|
4dfd528533 | ||
|
|
3131601477 | ||
|
|
5921cf5f0d | ||
|
|
788f7d5eb1 | ||
|
|
79cb79481e | ||
|
|
41f0061dca | ||
|
|
f981e4f886 | ||
|
|
ebf30e488a | ||
|
|
7ab889baac | ||
|
|
8d9d893839 | ||
|
|
205233f8c9 | ||
|
|
6ee9527ed9 | ||
|
|
ee56ffa346 | ||
|
|
3fcc478356 | ||
|
|
26e4cd2f4a | ||
|
|
509524144d | ||
|
|
676285e20b | ||
|
|
43edb0f814 | ||
|
|
1c684a4e32 | ||
|
|
156af0e2a4 | ||
|
|
28d9c465fd | ||
|
|
a285510656 | ||
|
|
d6042d142e | ||
|
|
be8d368e72 | ||
|
|
75698d9390 | ||
|
|
9d343694cc | ||
|
|
fddb2a3be0 | ||
|
|
3b44eddbb9 | ||
|
|
ba4100e22d | ||
|
|
72155e31dd | ||
|
|
60903c844e | ||
|
|
5c810b5ff6 | ||
|
|
e3a8c2d392 | ||
|
|
1f27d5f3e3 | ||
|
|
abb790da54 | ||
|
|
f4a2f2af94 | ||
|
|
29a21d060b | ||
|
|
de19861974 | ||
|
|
e5766e31dc | ||
|
|
fca727ecaf | ||
|
|
d009c9b2ed | ||
|
|
fd2e84f781 | ||
|
|
2b7676449d | ||
|
|
4b2c6eba63 | ||
|
|
84147280cf | ||
|
|
e62d9f8201 | ||
|
|
4cec4e64f9 | ||
|
|
9eb647428c | ||
|
|
b68808b325 | ||
|
|
a9dce0efbf | ||
|
|
de63f81238 | ||
|
|
a05afe45c0 | ||
|
|
236996caa1 | ||
|
|
b808c93885 | ||
|
|
7865b74359 | ||
|
|
143e1880d4 | ||
|
|
1be467cfe9 | ||
|
|
7f8f157616 | ||
|
|
c140ad6828 | ||
|
|
50e41dba25 | ||
|
|
c73fc5f266 | ||
|
|
a5f3adc477 | ||
|
|
b77764c1cf | ||
|
|
714b188560 | ||
|
|
47315f188a | ||
|
|
384a8a3991 | ||
|
|
7a80c00439 | ||
|
|
43486ce1e2 | ||
|
|
627c1e953e | ||
|
|
da141cc6bd | ||
|
|
8f3a9a6297 | ||
|
|
e8d496b0ad | ||
|
|
f5accfbe8f | ||
|
|
16e291036e | ||
|
|
a79b8b77b5 | ||
|
|
8e2d6acdf8 | ||
|
|
70c5123f7a | ||
|
|
7cfbaee199 | ||
|
|
fa8d78e18f | ||
|
|
4f5e72a31a | ||
|
|
7c5822fb7c | ||
|
|
60df140bfd | ||
|
|
f41e905842 | ||
|
|
9824fe6da3 | ||
|
|
1fb37f4b67 | ||
|
|
a8a6861a21 | ||
|
|
614222bdc3 | ||
|
|
8e98dda795 | ||
|
|
3686306505 | ||
|
|
d29aa78022 | ||
|
|
85fa406e1d | ||
|
|
d501e2016f | ||
|
|
cf0cd66ac9 | ||
|
|
c921f657b1 | ||
|
|
c93c1d84c5 | ||
|
|
2e66b1a546 | ||
|
|
48629146ed | ||
|
|
a6c8502416 | ||
|
|
fc74dc33c1 | ||
|
|
73de9dfc33 | ||
|
|
68d78a4aa4 | ||
|
|
b618e0e884 | ||
|
|
2d1a6e0edc | ||
|
|
76a7e92787 | ||
|
|
a2178b9a5f | ||
|
|
dcf0fecdb0 | ||
|
|
f88db8abf9 | ||
|
|
0c8b0f5e19 | ||
|
|
b794872147 | ||
|
|
86614f035b | ||
|
|
5f3a472c5e | ||
|
|
7eb2a405d3 | ||
|
|
1d030183bb | ||
|
|
d211692306 | ||
|
|
86c7d95c80 | ||
|
|
e99d43b25c | ||
|
|
730fc0a911 | ||
|
|
1ea92d7165 | ||
|
|
0dfc0ca853 | ||
|
|
474f82b3cf | ||
|
|
ae80109c77 | ||
|
|
807fe63cbe | ||
|
|
44ed3259f9 | ||
|
|
93b2b5fab8 | ||
|
|
58e807439c | ||
|
|
ca2f34bfac | ||
|
|
b8719d7f76 | ||
|
|
be0fdd9045 | ||
|
|
1d2b583c0c | ||
|
|
9def35e2e1 | ||
|
|
a11127ea58 | ||
|
|
af80864e08 | ||
|
|
f6a4fbdf87 | ||
|
|
61f48be2a6 | ||
|
|
8516925537 | ||
|
|
f828ec3d08 | ||
|
|
1eb1706166 | ||
|
|
ffd3b6daf6 | ||
|
|
76d538264a | ||
|
|
02d0a06195 | ||
|
|
c43325e402 | ||
|
|
63bc4b2d00 | ||
|
|
6e5da92263 | ||
|
|
6358719255 | ||
|
|
bdfd92299a | ||
|
|
aa4c9896ba | ||
|
|
1549f1feed | ||
|
|
2a9a713f3e | ||
|
|
0377dac71f | ||
|
|
13217a11c0 | ||
|
|
146b81ee5e | ||
|
|
8502792aad | ||
|
|
3d9447327a | ||
|
|
288fc67621 | ||
|
|
d4bc751a20 | ||
|
|
4cf160e5d3 | ||
|
|
98f29d6a6e | ||
|
|
92bb0a561b | ||
|
|
1329f6f0e1 | ||
|
|
a3dbfaba88 | ||
|
|
2032f39bf9 | ||
|
|
8840415739 | ||
|
|
bdf2fd21c3 | ||
|
|
bd1e326404 | ||
|
|
ebd31bc3d3 | ||
|
|
7185191d91 | ||
|
|
1a1dd44f34 | ||
|
|
95fd147268 | ||
|
|
88657fdf63 | ||
|
|
03de684940 | ||
|
|
b445b99572 | ||
|
|
bd4343c5d8 | ||
|
|
a58c13cd9f | ||
|
|
cf23ecc12c | ||
|
|
86754c2324 | ||
|
|
e6f0a8fdf3 | ||
|
|
fa9fc531d0 | ||
|
|
30bf2c1ad3 | ||
|
|
d326da9344 | ||
|
|
8f6494163d | ||
|
|
490cabefb2 | ||
|
|
66ff86d6fb | ||
|
|
0e5479d55e | ||
|
|
3eb3e0104d | ||
|
|
079e6116b2 | ||
|
|
b6a3adb21c | ||
|
|
ecf831c0f5 | ||
|
|
adfa0be79e | ||
|
|
7ec91802b2 | ||
|
|
1e15eb31c7 | ||
|
|
8d5e61a9a2 | ||
|
|
64500b113a | ||
|
|
a7e5fad571 | ||
|
|
531b00b6fd | ||
|
|
ce3fc5792b | ||
|
|
a477b2fb73 | ||
|
|
6a5d121615 | ||
|
|
90960e0574 | ||
|
|
b6980f7cf8 | ||
|
|
2fb3472de0 | ||
|
|
6dacbafc29 | ||
|
|
f1fcbd7396 | ||
|
|
681e389f19 | ||
|
|
06b7274364 | ||
|
|
b4f7de4858 | ||
|
|
6261232ce6 | ||
|
|
eb35b90950 | ||
|
|
958cea4e0d | ||
|
|
7f184bae50 | ||
|
|
3d68103a19 | ||
|
|
612851bce0 | ||
|
|
e365dae9e4 | ||
|
|
b6d5fc02dc | ||
|
|
59d139ace2 | ||
|
|
1d7a72f992 | ||
|
|
45f2ce261e | ||
|
|
f79e49db5a | ||
|
|
218aebaa0f | ||
|
|
f11870d6bc | ||
|
|
ebea6bb92c | ||
|
|
4806d6ada0 | ||
|
|
6909748bda | ||
|
|
982fc8440c | ||
|
|
e4df07a00c | ||
|
|
0ee30aca7e | ||
|
|
b994bcbcfb | ||
|
|
cc23b44409 | ||
|
|
de36ef697d | ||
|
|
e0d224a330 | ||
|
|
adc2106bec | ||
|
|
6cdbe957a7 | ||
|
|
14808cb01c | ||
|
|
1edadbfee8 | ||
|
|
043a23ecdf | ||
|
|
383ef37989 | ||
|
|
9cd9a8d3ea | ||
|
|
db8c94f433 | ||
|
|
22fb3e5bef | ||
|
|
6329722f17 | ||
|
|
2dee61223d | ||
|
|
f83fc52e9c | ||
|
|
2f8a04c15d | ||
|
|
a1501af7a7 | ||
|
|
a1fdfc9cc9 | ||
|
|
2dddf3c2a5 | ||
|
|
84061cf60f | ||
|
|
557c2c7858 | ||
|
|
cb2d355bc9 | ||
|
|
ed1b642d5b | ||
|
|
411f5e1951 | ||
|
|
450506ca96 | ||
|
|
bf700aa88f | ||
|
|
c108ab196c | ||
|
|
cac8662c01 | ||
|
|
197c58ef98 | ||
|
|
d4c2723759 | ||
|
|
c34a6d8f49 | ||
|
|
5de580c00b | ||
|
|
ed1fb151d7 | ||
|
|
4c4913c5d0 | ||
|
|
adb0dc5963 | ||
|
|
740bc8ae31 | ||
|
|
30a0b12020 | ||
|
|
b0b8b0db3b | ||
|
|
71244732f2 | ||
|
|
820af60c19 | ||
|
|
b3252359bd | ||
|
|
9ade568597 | ||
|
|
cf5224a5f6 | ||
|
|
6c4a83d14d | ||
|
|
0439b95139 | ||
|
|
72a618a0b7 | ||
|
|
0f7520e67b | ||
|
|
fcd69474a2 | ||
|
|
3130e00bab | ||
|
|
1c063b57ec | ||
|
|
efeff3b720 | ||
|
|
ea15634f47 | ||
|
|
e744d001c6 | ||
|
|
06e486e5e2 | ||
|
|
95180ffdef | ||
|
|
e5bd85e9aa | ||
|
|
ec4ec2ff77 | ||
|
|
5a1c9215bc | ||
|
|
53457b73ad | ||
|
|
8cb9fcf01a | ||
|
|
2c88b0e75e | ||
|
|
4daffdc31f | ||
|
|
16dec2cde5 | ||
|
|
82e5fb593e | ||
|
|
4a60ecb3ff | ||
|
|
38307405ed | ||
|
|
fe332d0cbd | ||
|
|
e45f75c1d6 | ||
|
|
a77f450757 | ||
|
|
9f8e946ea3 | ||
|
|
7633687665 | ||
|
|
a1e37643d0 | ||
|
|
8440b58d6c | ||
|
|
a97f8efe21 | ||
|
|
d83e7c22ac | ||
|
|
01a5b32b22 | ||
|
|
8834f57582 | ||
|
|
57fd7b96b4 | ||
|
|
14fe2fbc84 | ||
|
|
0b86edb654 | ||
|
|
07ab74902c | ||
|
|
e4c6e860c1 | ||
|
|
02cf587fcf | ||
|
|
081773163b | ||
|
|
292ff63699 | ||
|
|
f1a97c0219 | ||
|
|
e545010034 | ||
|
|
ef57fa9a25 | ||
|
|
1bd0d891a4 | ||
|
|
9a51c1de1d | ||
|
|
e4bb75dd8e | ||
|
|
66e1e08ae2 | ||
|
|
708cd5a644 | ||
|
|
138c9aba97 | ||
|
|
e5e17b4496 | ||
|
|
cadaebefb9 | ||
|
|
e2fb7935f6 | ||
|
|
16b3dab600 | ||
|
|
758972890e | ||
|
|
a88285d935 | ||
|
|
d7832fb931 | ||
|
|
f073c9a0bc | ||
|
|
63ef83ec62 | ||
|
|
51c50415e1 | ||
|
|
2f08fa6476 | ||
|
|
3091972fc5 | ||
|
|
8e14df9a95 | ||
|
|
683cec6f4d | ||
|
|
ec6e5aa3b1 | ||
|
|
f4c00a9b6f | ||
|
|
c071ec5d6c | ||
|
|
29148c4b42 | ||
|
|
7340caa4a9 | ||
|
|
7d23dfa73d | ||
|
|
19932820a9 |
36
.github/workflows/maven_check.yml
vendored
Normal file
36
.github/workflows/maven_check.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Maven Check
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#push:
|
||||
# branches: [ "main" ]
|
||||
#pull_request:
|
||||
# branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
|
||||
- name: Update dependency graph
|
||||
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|
||||
35
.github/workflows/maven_snapshot.yml
vendored
Normal file
35
.github/workflows/maven_snapshot.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Maven Snapshot
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [11]
|
||||
name: Java ${{ matrix.java }} build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Java ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
server-id: ossrh
|
||||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}
|
||||
- name: Build with Maven
|
||||
run: |
|
||||
cp -fr my/pom.xml pom.xml
|
||||
mvn --batch-mode -e -X clean deploy -DskipTests=true
|
||||
env:
|
||||
MAVEN_GPG_KEY: ${{ secrets.OSSRHGPGKEY }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRHGPGPASSWORD }}
|
||||
31
.gitignore
vendored
31
.gitignore
vendored
@@ -1,12 +1,19 @@
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
/target/
|
||||
/.idea/
|
||||
/redkale.iml
|
||||
/ClientConnection.java
|
||||
/nbactions.xml
|
||||
/nb-configuration.xml
|
||||
/my/target/
|
||||
|
||||
71
README.md
71
README.md
@@ -1,27 +1,48 @@
|
||||
<h1>项目介绍</h1>
|
||||
<p>
|
||||
Redkale (中文名: 红菜苔,一种湖北特产蔬菜) 是基于Java 8全新的微服务框架, 包含HTTP、WebSocket、TCP/UDP、数据序列化、数据缓存、依赖注入等功能。 本框架致力于简化集中式和微服务架构的开发,在增强开发敏捷性的同时保持高性能。
|
||||
</p>
|
||||
<strong>RedKale 有如下主要特点:</strong>
|
||||
<ol>
|
||||
<li>大量使用Java 8新特性(接口默认值、Stream、Lambda、JDk8内置的ASM等)</li>
|
||||
<li>提供HTTP服务,同时内置JSON功能与限时缓存功能</li>
|
||||
<li>TCP层完全使用NIO.2,并统一TCP与UDP的接口换</li>
|
||||
<li>提供分布式与集中式部署的无缝切换</li>
|
||||
<li>提供类似JPA功能,包含数据缓存自动同步、分表分库与简洁的数据层操作接口</li>
|
||||
<li>可以动态修改已依赖注入的资源</li>
|
||||
</ol>
|
||||
# [Redkale 2.8](https://redkale.org) <img src="docs/images/logo.png" alt="redkale" width="100" align="right"/>
|
||||
|
||||
<strong>Redkale 设计理念</strong>
|
||||
<p>
|
||||
作为一个全新的微服务框架,Redkale在接口定义上使用了Java 8大量的新语法,接口有默认实现、接口带静态方法、重复注解等特性,同时在设计上与主流框架有很大不同。Redkale是按组件形式设计的,而非以容器为主,几乎每个子包都是能提供独立功能的组件。如Tomcat是按容器设计的,所有web资源/配置由Tomcat控制,开发者很能难控制到Tomcat内部,而Redkale的HTTP服务只是个组件,开发者既可以自己启动和配置HttpServer,也可以把Redkale当成容器通过Redkale进程来初始化服务。Spring的Ioc容器也是如此,Redkale提供的依赖注入仅通过ResouceFactory一个类来控制,非常轻量,并且可动态更改已注入的资源。Spring提倡控制反转思想,而自身的容器却让开发者很难控制。Redkale是一个既能以组件形式也能以容器形式存在的框架。从整体上看,Redkale的架构分两层:接口和默认实现。开发者若想替换掉Redkale内置的HTTP服务而使用符合JavaEE规范的HttpServlet, 可以采用自定义协议基于JSR 340(Servlet 3.1)来实现自己的HTTP服务;若想使用Hibernate作为数据库操作,可以写一个自己的DataSource实现类;JSON的序列化和反序列化也可以使用第三方的实现;Memcached或Redis也可以作为另一个CacheSource的实现替换Redkale的默认实现。这其实包含了控制反转的思想,让框架里的各个组件均可让开发者控制。<br/>
|
||||
与主流框架比,功能上Redkale显得很简单,这体现了Redkale的简易性,而并非是不足,从一个良好的设计习惯或架构上来看,有些常用功能是不需要提供的,如Redkale的HTTP服务不支持HTTPS和JSP,HTTPS比HTTP多了一层加密解密,这种密集型的计算不是Java的专长,通常提供HTTP服务的架构不会将Java动态服务器放在最前端,而是在前方会放nginx或apache,除了负载均衡还能静动分离,因此HTTPS的加解密应交给nginx这样的高性能服务器处理。Redkale再提供HTTPS服务就显得鸡肋。JSP其实算是一个落后的技术,现在是一个多样化终端的时代,终端不只局限于桌面程序和PC浏览器,还有原生App、混合式App、微信端、移动H5、提供第三方接口等各种形式的终端,这些都不是JSP能方便兼顾的,而HTTP+JSON作为通用性接口可以避免重复开发,模版引擎的功能加上各种强大的JS框架足以取代JSP。Redkale在功能上做了筛选,不会为了迎合主流而提供,而是以良好的设计思想为指导。这是Redkale的主导思维。
|
||||
</p>
|
||||
|
||||
|
||||
<h5>详情请访问: <a href='https://redkale.org' target='_blank'>https://redkale.org</a></h5>
|
||||
|
||||
<h5>基本文档: <a href='https://redkale.org/articles.html' target='_blank'>https://redkale.org/articles.html</a></h5>
|
||||
|
||||
<h5>欢迎加入Redkale QQ群: 527523235</h5>
|
||||
|
||||
|
||||
## 简介
|
||||
  Redkale (中文名: 红菜苔,一种湖北特产蔬菜) 是基于Java 11全新的微服务框架, 包含HTTP、WebSocket、TCP/UDP、数据序列化、数据缓存、依赖注入等功能。 本框架致力于简化集中式和微服务架构的开发,在增强开发敏捷性的同时保持高性能。
|
||||
|
||||
主要特点::
|
||||
* 提供了动态依赖注入和动态字节码生成类功能
|
||||
* 提供HTTP服务,同时内置JSON功能与限时缓存功能
|
||||
* TCP层完全使用NIO,并统一TCP与UDP的接口换
|
||||
* 提供分布式与集中式部署的无缝切换
|
||||
* 提供类似JPA功能,包含数据缓存自动同步、分表分库与简洁的数据层操作接口
|
||||
* 提供了MQ消息消费与生产简洁化API
|
||||
|
||||
## 版本
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkale</groupId>
|
||||
<artifactId>redkale</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## 开发文档
|
||||
* [快速入门](docs/quick-start.md)
|
||||
* [Service组件](docs/service.md)
|
||||
* [序列化](docs/convert.md)
|
||||
* [DB数据源组件](docs/datasource.md)
|
||||
* [Cache数据源组件](docs/cachesource.md)
|
||||
* [WebSocket](docs/websocket.md)
|
||||
* [native-image](docs/native-image.md)
|
||||
* [方法缓存Cached](docs/cached.md)
|
||||
* [定时任务Scheduled](docs/scheduled.md)
|
||||
* [消息队列MQ](docs/agent-message.md)
|
||||
* [基本配置](docs/config.md)
|
||||
* [FAQ](docs/faq.md)
|
||||
|
||||
## 设计理念
|
||||
  作为一个全新的微服务框架,Redkale在接口定义上使用了默认实现、接口带静态方法、重复注解等特性,同时在设计上与主流框架有很大不同。Redkale是按组件形式设计的,而非以容器为主,几乎每个子包都是能提供独立功能的组件。如Tomcat是按容器设计的,所有web资源/配置由Tomcat控制,开发者很能难控制到Tomcat内部,而Redkale的HTTP服务只是个组件,开发者既可以自己启动和配置HttpServer,也可以把Redkale当成容器通过Redkale进程来初始化服务。Spring的Ioc容器也是如此,Redkale提供的依赖注入仅通过ResouceFactory一个类来控制,非常轻量,并且可动态更改已注入的资源。Spring提倡控制反转思想,而自身的容器却让开发者很难控制。Redkale是一个既能以组件形式也能以容器形式存在的框架。从整体上看,Redkale的架构分两层:接口和默认实现。开发者若想替换掉Redkale内置的HTTP服务而使用符合JavaEE规范的HttpServlet, 可以采用自定义协议基于JSR 340(Servlet 3.1)来实现自己的HTTP服务;若想使用Hibernate作为数据库操作,可以写一个自己的DataSource实现类;JSON的序列化和反序列化也可以使用第三方的实现;Memcached或Redis也可以作为另一个CacheSource的实现替换Redkale的默认实现。这其实包含了控制反转的思想,让框架里的各个组件均可让开发者控制。
|
||||
  与主流框架比,功能上Redkale显得很简单,这体现了Redkale的简易性,而并非是不足,从一个良好的设计习惯或架构上来看,有些常用功能是不需要提供的,如Redkale的HTTP服务不支持JSP, JSP其实算是一个落后的技术,现在是一个多样化终端的时代,终端不只局限于桌面程序和PC浏览器,还有原生App、混合式App、微信端、移动H5、提供第三方接口等各种形式的终端,这些都不是JSP能方便兼顾的,而HTTP+JSON作为通用性接口可以避免重复开发,模版引擎的功能加上各种强大的JS框架足以取代JSP。Redkale在功能上做了筛选,不会为了迎合主流而提供,而是以良好的设计思想为指导。这是Redkale的主导思维。
|
||||
|
||||
   <b>详情请访问:  <a href='https://redkale.org' target='_blank'>https://redkale.org</a></b>
|
||||
|
||||
   <b>基本文档:  <a href='https://redkale.org/articles.html' target='_blank'>https://redkale.org/articles.html</a></b>
|
||||
|
||||
   <b>欢迎加入Redkale QQ群: 527523235</b>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET APP_HOME=%~dp0
|
||||
|
||||
IF NOT EXIST "%APP_HOME%\conf\application.xml" SET APP_HOME=%~dp0..
|
||||
|
||||
java -DCMD=APIDOC -DAPP_HOME="%APP_HOME%" -classpath "%APP_HOME%"\lib\* org.redkale.boot.Application
|
||||
7
bin/apidoc.cmd
Normal file
7
bin/apidoc.cmd
Normal file
@@ -0,0 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET APP_HOME=%~dp0
|
||||
|
||||
IF NOT EXIST "%APP_HOME%\conf\application.xml" SET APP_HOME=%~dp0..
|
||||
|
||||
java -DAPP_HOME="%APP_HOME%" -classpath "%APP_HOME%"\lib\* org.redkale.boot.Application apidoc
|
||||
@@ -15,4 +15,4 @@ do
|
||||
done
|
||||
export CLASSPATH=$CLASSPATH:$lib
|
||||
echo "$APP_HOME"
|
||||
java -DCMD=APIDOC -DAPP_HOME="$APP_HOME" org.redkale.boot.Application
|
||||
java -DAPP_HOME="$APP_HOME" org.redkale.boot.Application apidoc
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET APP_HOME=%~dp0
|
||||
|
||||
|
||||
IF NOT EXIST "%APP_HOME%\conf\application.xml" SET APP_HOME=%~dp0..
|
||||
|
||||
java -DAPP_HOME="%APP_HOME%" -classpath "%APP_HOME%"\lib\* org.redkale.boot.Application
|
||||
|
||||
java -DAPP_HOME="%APP_HOME%" -classpath "%APP_HOME%"\lib\* org.redkale.boot.Application %*
|
||||
23
bin/redkale.sh
Normal file
23
bin/redkale.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LC_ALL="zh_CN.UTF-8"
|
||||
|
||||
APP_HOME=`dirname "$0"`
|
||||
|
||||
cd "$APP_HOME"/..
|
||||
|
||||
APP_HOME=`pwd`
|
||||
|
||||
if [ ! -f "$APP_HOME"/conf/application.xml ]; then
|
||||
APP_HOME="$APP_HOME"/..
|
||||
fi
|
||||
|
||||
lib="$APP_HOME"/lib
|
||||
for jar in `ls $APP_HOME/lib/*.jar`
|
||||
do
|
||||
lib=$lib:$jar
|
||||
done
|
||||
export CLASSPATH=$CLASSPATH:$lib
|
||||
|
||||
echo "$APP_HOME"
|
||||
java -DAPP_HOME="$APP_HOME" org.redkale.boot.Application $@ &
|
||||
@@ -4,6 +4,6 @@ SET APP_HOME=%~dp0
|
||||
|
||||
IF NOT EXIST "%APP_HOME%\conf\application.xml" SET APP_HOME=%~dp0..
|
||||
|
||||
call "%APP_HOME%\bin\shutdown.bat"
|
||||
call "%APP_HOME%\bin\shutdown.cmd"
|
||||
|
||||
call "%APP_HOME%\bin\start.bat"
|
||||
call "%APP_HOME%\bin\start.cmd"
|
||||
8
bin/start.cmd
Normal file
8
bin/start.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET APP_HOME=%~dp0
|
||||
|
||||
IF NOT EXIST "%APP_HOME%\conf\application.xml" SET APP_HOME=%~dp0..
|
||||
|
||||
java -server -DAPP_HOME="%APP_HOME%" -classpath "%APP_HOME%"\lib\* org.redkale.boot.Application
|
||||
|
||||
@@ -24,5 +24,5 @@ done
|
||||
export CLASSPATH=$CLASSPATH:$lib
|
||||
|
||||
echo "$APP_HOME"
|
||||
nohup java -DAPP_HOME="$APP_HOME" org.redkale.boot.Application > "$APP_HOME"/logs.out &
|
||||
nohup java -server -DAPP_HOME="$APP_HOME" org.redkale.boot.Application > "$APP_HOME"/logs.out &
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<application port="2121">
|
||||
|
||||
<!-- 详细配置说明见: http://redkale.org/redkale.html#redkale_confxml -->
|
||||
|
||||
<resources>
|
||||
|
||||
</resources>
|
||||
<application nodeid="10000" port="2020">
|
||||
|
||||
<server protocol="HTTP" port="6060">
|
||||
|
||||
<properties load="config.properties">
|
||||
<property name="system.property.redkale.convert.protobuf.enumtostring" value="true"/>
|
||||
</properties>
|
||||
|
||||
<server protocol="HTTP" port="5050">
|
||||
<request>
|
||||
<remoteaddr value="request.headers.X-RemoteAddress"/>
|
||||
</request>
|
||||
|
||||
|
||||
<response>
|
||||
<defcookie domain="" path="/"/>
|
||||
<addheader name="Access-Control-Allow-Origin" value="request.headers.Origin" />
|
||||
@@ -24,10 +21,9 @@
|
||||
|
||||
<filters autoload="true"/>
|
||||
|
||||
<rest path="/pipes" /> <!-- base指定的自定义HttpServlet子类必须标记@HttpUserType, 不设置base则视为没有当前用户信息设置 -->
|
||||
|
||||
<servlets path="/pipes" autoload="true" />
|
||||
<rest path="/pipes" />
|
||||
|
||||
<servlets path="/pipes" autoload="true" />
|
||||
</server>
|
||||
|
||||
</application>
|
||||
|
||||
2
conf/config.properties
Normal file
2
conf/config.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
#
|
||||
@@ -18,8 +18,8 @@ java.util.logging.FileHandler.level = FINER
|
||||
java.util.logging.FileHandler.limit = 10M
|
||||
java.util.logging.FileHandler.count = 20
|
||||
java.util.logging.FileHandler.encoding = UTF-8
|
||||
java.util.logging.FileHandler.pattern = ${APP_HOME}/logs-%m/log-%d.log
|
||||
java.util.logging.FileHandler.unusual = ${APP_HOME}/logs-%m/log-warnerr-%d.log
|
||||
java.util.logging.FileHandler.pattern = ${APP_HOME}/logs-%tY%tm/log-%tY%tm%td.log
|
||||
java.util.logging.FileHandler.unusual = ${APP_HOME}/logs-%tY%tm/log-warnerr-%tY%tm%td.log
|
||||
java.util.logging.FileHandler.append = true
|
||||
|
||||
java.util.logging.ConsoleHandler.level = FINEST
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
|
||||
|
||||
<persistence-unit name="" transaction-type="RESOURCE_LOCAL">
|
||||
<shared-cache-mode>ALL</shared-cache-mode>
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/center?autoReconnect=true&characterEncoding=utf8"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="1234"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
<!--
|
||||
<persistence-unit name="user.read" transaction-type="RESOURCE_LOCAL">
|
||||
<shared-cache-mode>ALL</shared-cache-mode>
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
|
||||
<property name="javax.persistence.jdbc.user" value="system"/>
|
||||
<property name="javax.persistence.jdbc.password" value="1234"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
<persistence-unit name="user.write" transaction-type="RESOURCE_LOCAL">
|
||||
<shared-cache-mode>ALL</shared-cache-mode>
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/center?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="1234"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
-->
|
||||
|
||||
</persistence>
|
||||
22
conf/source.properties
Normal file
22
conf/source.properties
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
############ DataSource @Resource(name="platf") ############
|
||||
#redkale.datasource[platf].url = jdbc:mysql://127.0.0.1:3306/platf?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
#redkale.datasource[platf].user = root
|
||||
#redkale.datasource[platf].password = 12345678
|
||||
### true: auto ddl;
|
||||
#redkale.datasource[platf].table-autoddl = true
|
||||
|
||||
############ DataSource @Resource(name="user") ############
|
||||
#redkale.datasource[user].read.url = jdbc:mysql://127.0.0.1:3306/user_r?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
#redkale.datasource[user].read.user = root
|
||||
#redkale.datasource[user].read.password = 12345678
|
||||
|
||||
#redkale.datasource[user].write.url = jdbc:mysql://127.0.0.1:3306/user_w?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
#redkale.datasource[user].write.user = root
|
||||
#redkale.datasource[user].write.password = 12345678
|
||||
|
||||
|
||||
############ CacheSource @Resource(name="usersession") ############
|
||||
#redkale.cachesource[usersession].node[0].url = redis://127.0.0.1:6363
|
||||
#redkale.cachesource[usersession].node[0].password = 12345678
|
||||
#redkale.cachesource[usersession].node[0].db = 0
|
||||
2
docs/agent-cluster.md
Normal file
2
docs/agent-cluster.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# 服务管理
|
||||
文档完善中……
|
||||
104
docs/agent-message.md
Normal file
104
docs/agent-message.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# 消息队列
|
||||
   MessageAgent是消息中心抽象接口。
|
||||
## 配置
|
||||
```xml
|
||||
<mq name="mymq" type="kafka">
|
||||
<servers value="127.0.0.1:9092"/>
|
||||
<consumer autoload="true"/>
|
||||
</mq>
|
||||
```
|
||||
|
||||
## 消费消息
|
||||
   通过```@ResourceConsumer```和```MessageConsumer```接口实现消费
|
||||
```java
|
||||
@ResourceConsumer(mq = "mymq", topics = "test_bean_topic")
|
||||
public class TestMessageConsumer implements MessageConsumer<TestBean> {
|
||||
|
||||
@Override
|
||||
public void init(AnyValue config) {
|
||||
System.out.println("执行 TestMessageConsumer.init");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageEvent<TestBean>[] events) {
|
||||
for (MessageEvent<TestBean> event : events) {
|
||||
System.out.println("消费消息, message: " + event.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy(AnyValue config) {
|
||||
System.out.println("执行 TestMessageConsumer.destroy");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
  通过Service里标记```@Messaged```的方法实现消费, 方法只能是```protected```或```public```, 不能是```final```、```static```。
|
||||
```java
|
||||
public class TestMessageService extends AbstractService {
|
||||
|
||||
@Messaged(mq = "mymq", topics = "test_bean_topic")
|
||||
protected void runMessage(MessageEvent<TestBean>[] events) {
|
||||
for (MessageEvent<TestBean> event : events) {
|
||||
System.out.println("消费消息, message: " + event.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
  通过```@Component```的Service里标记```@Messaged```的方法实现消费, 方法只能是```public```。
|
||||
```java
|
||||
@Component
|
||||
public final class TestMessageService extends AbstractService {
|
||||
|
||||
@Messaged(mq = "mymq", topics = "test_bean_topic")
|
||||
public int runMessage(MessageEvent<TestBean>[] events) {
|
||||
for (MessageEvent<TestBean> event : events) {
|
||||
System.out.println("消费消息, message: " + event.getMessage());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 生产消息
|
||||
  通过```@Component```的Service里标记```@Messaged```的方法实现消费, 方法只能是```public```。
|
||||
```java
|
||||
@Component
|
||||
public class TestMessageService extends AbstractService {
|
||||
|
||||
@ResourceProducer(mq = "mymq")
|
||||
private MessageProducer producer;
|
||||
|
||||
public void sendMessage() {
|
||||
TestBean bean = new TestBean(12345, "this is a message");
|
||||
System.out.println("生产消息: " + bean);
|
||||
producer.sendMessage("test_bean_topic", bean);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Topic管理
|
||||
  通过```MessageManager```操作topic。
|
||||
```java
|
||||
public class TestMessageManager extends AbstractService {
|
||||
|
||||
@Resource(name = "mymq")
|
||||
private MessageManager manager;
|
||||
|
||||
// 创建topic
|
||||
public void initTopic() {
|
||||
manager.createTopic("topic_1", "topic_2").join();
|
||||
}
|
||||
|
||||
// 删除topic
|
||||
public void deleteTopic() {
|
||||
manager.deleteTopic("topic_1", "topic_2").join();
|
||||
}
|
||||
|
||||
// 查询topic
|
||||
public void printTopic() {
|
||||
List<String> topics = manager.queryTopic().join();
|
||||
}
|
||||
}
|
||||
```
|
||||
2
docs/agent-properties.md
Normal file
2
docs/agent-properties.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# 配置中心
|
||||
文档完善中……
|
||||
123
docs/cached.md
Normal file
123
docs/cached.md
Normal file
@@ -0,0 +1,123 @@
|
||||
# 方法缓存
|
||||
  @Cached注解在Service的方法上,实现对方法结果进行缓存。
|
||||
     1、返回类型不能是```void```/```CompletableFuture<Void>```<br>
|
||||
     2、返回类型必须是可json序列化的 <br>
|
||||
     3、修饰必须是```protected```/```public``` <br>
|
||||
     4、修饰不能是```final```/```static``` <br>
|
||||
  本地缓存和远程缓存可同时设置,```expire```设置为0,表示永不过期, 支持异步方法(返回类型为```CompletableFuture```)。
|
||||
|
||||
## 属性说明
|
||||
|属性|默认值|说明|
|
||||
| --- | --- | --- |
|
||||
|name|未定义|缓存的名称|
|
||||
|key|未定义|缓存的key,支持参数动态组合,比如"key_#{id}"|
|
||||
|manager|空|缓存管理器名称, 不能含有':'、'#'、'@'字符|
|
||||
|localLimit|-1|本地缓存数量上限, 小于1表示无上限。 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.cache.limit}: 读取系统配置项 |
|
||||
|localExpire|-1|本地缓存过期时长, 0表示永不过期, -1表示不作本地缓存。 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.cache.expires}: 读取系统配置项 |
|
||||
|remoteExpire|-1|远程缓存过期时长, 0表示永不过期, -1表示不作远程缓存。 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.cache.expires}: 读取系统配置项 |
|
||||
|nullable|false|是否可以缓存null值|
|
||||
|timeUnit|```TimeUnit.SECONDS```|时间单位TimeUnit|
|
||||
|comment|未定义|备注描述|
|
||||
|mode|```LoadMode.ANY```|作用于Service模式,默认值为:ANY,作用于所有模式Service,<br> LOCAL: 表示远程模式的Service对象中的缓存功能不起作用|
|
||||
|
||||
## 基本用法
|
||||
  将结果进行本地缓存30秒且远程缓存60秒
|
||||
```java
|
||||
@Cached(name = "name", key = "name", localExpire = "30", remoteExpire = "60")
|
||||
public String getName() {
|
||||
return "haha";
|
||||
}
|
||||
```
|
||||
|
||||
  以参数code为key将结果进行本地缓存(时长由环境变量```env.cache.expire```配置,没配置采用默认值30秒)
|
||||
```java
|
||||
@Cached(name = "name", key = "#{code}", localExpire = "${env.cache.expire:30}")
|
||||
public CompletableFuture<String> getNameAsync(String code) {
|
||||
return redis.getStringAsync(code);
|
||||
}
|
||||
```
|
||||
|
||||
  以参数code+map.id为key将结果进行远程缓存60毫秒
|
||||
```java
|
||||
@Resource
|
||||
private CachedManager cachedManager;
|
||||
|
||||
//实时修改远程缓存的key值
|
||||
public void updateName(String code, Map<String, Long> map) {
|
||||
cachedManager.remoteSetString("name", code + "_" + map.get("id"), code + "-" + map, Duration.ofMillis(60));
|
||||
}
|
||||
|
||||
@Cached(name = "name", key = "#{code}_#{map.id}", remoteExpire = "60", timeUnit = TimeUnit.MILLISECONDS)
|
||||
public String getName(String code, Map<String, Long> map) {
|
||||
return code + "-" + map;
|
||||
}
|
||||
```
|
||||
|
||||
## 动态调整缓存时长
|
||||
  使用```@Resource```注入多个```CachedManager```
|
||||
```java
|
||||
|
||||
@Resource
|
||||
private CachedManager cachedManager;
|
||||
|
||||
@Cached(name = "name", key = "#{code}_#{map.id}", remoteExpire = "60", timeUnit = TimeUnit.MILLISECONDS)
|
||||
public String getName(String code, Map<String, Long> map) {
|
||||
return code + "-" + map;
|
||||
}
|
||||
|
||||
public void updateExpire() {
|
||||
Duration expire = Duration.ofMillis(600);
|
||||
cachedManager.acceptCachedAction("name", action -> {
|
||||
//将缓存时长改成600毫秒,并开启本地缓存
|
||||
action.setLocalExpire(expire);
|
||||
action.setRemoteExpire(expire);
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## 缓存配置
|
||||
```xml
|
||||
<!--
|
||||
全局Serivce的缓存设置,没配置该节点将自动创建一个。
|
||||
name: 缓存管理器的名称, 默认: ""
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
remote: 远程CacheSource的资源名
|
||||
broadcastable: 存在远程CacheSource时修改数据是否进行广播到其他集群服务中。默认: true
|
||||
-->
|
||||
<cached name="" enabled="true" remote="xxx" broadcastable="true"/>
|
||||
```
|
||||
|
||||
## 多缓存器
|
||||
```xml
|
||||
<cached name="" enabled="true" remote="redis_1" broadcastable="true"/>
|
||||
<cached name="backup" enabled="true" remote="redis_2" broadcastable="true"/>
|
||||
```
|
||||
|
||||
  使用```@Resource```注入多个```CachedManager```
|
||||
```java
|
||||
|
||||
//第一个缓存器
|
||||
@Resource
|
||||
private CachedManager cachedManager;
|
||||
|
||||
//第二个缓存器
|
||||
@Resource(name = "backup")
|
||||
private CachedManager cachedManager2;
|
||||
|
||||
//第一个缓存器实时修改远程缓存的key值
|
||||
public void updateName(String code, Map<String, Long> map) {
|
||||
cachedManager.remoteSetString("name", code + "_" + map.get("id"), code + "-" + map, Duration.ofMillis(60));
|
||||
}
|
||||
|
||||
//使用第一个缓存器
|
||||
@Cached(name = "name", key = "#{code}_#{map.id}", remoteExpire = "60", timeUnit = TimeUnit.MILLISECONDS)
|
||||
public String getName(String code, Map<String, Long> map) {
|
||||
return code + "-" + map;
|
||||
}
|
||||
|
||||
//使用第二个缓存器
|
||||
@Cached(manager = "backup", name = "name", key = "#{code}_#{map.id}_2", remoteExpire = "60", timeUnit = TimeUnit.MILLISECONDS)
|
||||
public String getName2(String code, Map<String, Long> map) {
|
||||
return code + "-" + map;
|
||||
}
|
||||
```
|
||||
58
docs/cachesource.md
Normal file
58
docs/cachesource.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# 缓存组件 CacheSource
|
||||
  ```CachedCacheSource```是框架主要的缓存组件,主要提供redis和内存两大实现,接口大部分与redis命令保持一致。
|
||||
|
||||
## 使用CacheSouce存放登录会话
|
||||
```java
|
||||
public class UserService implements Service {
|
||||
|
||||
//用户简单信息缓存
|
||||
private final Map<Integer, UserInfo> users = new ConcurrentHashMap<>();
|
||||
|
||||
//使用CacheSource必须要指明泛型
|
||||
@Resource(name = "usersessions")
|
||||
protected CacheSource sessions;
|
||||
|
||||
//登录
|
||||
public RetResult<UserInfo> login(LoginBean bean) { //bean.sessionid 在接入层进行赋值
|
||||
UserInfo user = null;
|
||||
// 登陆逻辑 user = ...
|
||||
users.put(user.getUserid(), user);
|
||||
sessions.setLong(600, bean.getSessionid(), user.getUserid()); //session过期时间设置为10分钟
|
||||
return new RetResult<>(user);
|
||||
}
|
||||
|
||||
//获取当前用户信息
|
||||
public UserInfo current(String sessionid) { //给HTTP的BaseServlet用
|
||||
Long userid = sessions.getexLong(sessionid, 600);
|
||||
return userid == null ? null : users.get(userid.intValue());
|
||||
}
|
||||
|
||||
//注销
|
||||
public void logout(String sessionid) {
|
||||
sessions.del(sessionid);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## source.properties 配置说明
|
||||
```
|
||||
|
||||
# usersession为@Resource.name值
|
||||
# type可以不用设置,框架会根据url判断使用哪个CacheSource实现类
|
||||
redkale.cachesource.usersession.type = org.redkalex.cache.redis.RedisCacheSource
|
||||
# 最大连接数
|
||||
redkale.cachesource.usersession.maxconns = 16
|
||||
# 节点地址
|
||||
redkale.cachesource.usersession.nodes = redis://127.0.0.1:6363
|
||||
# 节点密码
|
||||
redkale.cachesource.usersession.password = 12345678
|
||||
# 节点db
|
||||
redkale.cachesource.usersession.db = 0
|
||||
|
||||
#简化写法: 可以不用.node[0], 将参数都合并到url中
|
||||
redkale.cachesource.usersession.url = redis://user:123456@127.0.0.1:6363?db=0
|
||||
|
||||
@Resource.name=""的CacheSource
|
||||
redkale.cachesource.nodes = redis://127.0.0.1:6363
|
||||
redkale.cachesource.password = 12345678
|
||||
```
|
||||
463
docs/config.md
Normal file
463
docs/config.md
Normal file
@@ -0,0 +1,463 @@
|
||||
# 配置说明
|
||||
# application.xml 配置:
|
||||
```xml
|
||||
<!--
|
||||
文件说明:
|
||||
${APP_HOME} 指当前程序的根目录APP_HOME
|
||||
没注明唯一的节点可多个存在
|
||||
required: 被声明required的属性值不能为空
|
||||
-->
|
||||
<!--
|
||||
nodeid: int 进程的节点ID,用于分布式环境,一个系统中节点ID必须全局唯一,使用cluster时框架会进行唯一性校验
|
||||
name: 进程的名称,用于监控识别,命名规则: 字母、数字、下划线、短横、点
|
||||
address: 本地局域网的IP地址, 默认值为默认网卡的ip,当不使用默认值需要指定值,如192.168.1.22
|
||||
port: required 程序的管理Server的端口,用于关闭或者与监管系统进行数据交互
|
||||
lib: 加上额外的lib路径,多个路径用分号;隔开; 默认为空。 例如: ${APP_HOME}/lib/a.jar;${APP_HOME}/lib2/b.jar;
|
||||
-->
|
||||
<application nodeid="1000" port="6560" lib="">
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.3.0
|
||||
全局Serivce执行的线程池, Application.workExecutor, 没配置该节点将自动创建一个。
|
||||
threads: 线程数,默认值: CPU核数*10, 核数=2的情况下默认值为20。值为0表示不启用workExecutor,都在IO线程中运行。
|
||||
clients: client回调函数运行的线程池大小, 默认值: CPU核数*4
|
||||
-->
|
||||
<executor threads="4"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.8.0
|
||||
全局Serivce的定时任务设置,没配置该节点将自动创建一个。
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
-->
|
||||
<scheduled enabled="true"/>
|
||||
|
||||
<!--
|
||||
@since 2.8.0
|
||||
全局Serivce的缓存设置,没配置该节点将自动创建一个。
|
||||
name: 缓存管理器的名称, 默认: ""
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
remote: 远程CacheSource的资源名
|
||||
broadcastable: 存在远程CacheSource时修改数据是否进行广播到其他集群服务中。默认: true
|
||||
-->
|
||||
<cached name="" enabled="true" remote="xxx" broadcastable="true"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
第三方服务发现管理接口
|
||||
type: 类名,必须是org.redkale.cluster.ClusterAgent的子类
|
||||
waits: 注销服务后是否需要等待检查周期时间后再进行Service销毁,默认值为:false
|
||||
当一个Service进行服务注销后,不能立刻销毁Service,因为健康检测是有间隔时间差的,
|
||||
需要等待一个健康检测周期时间,让其他进程都更新完服务列表。
|
||||
如果使用MQ,可以设置为false,如果对服务健壮性要求高,建议设置为true
|
||||
protocols: 服务发现可以处理的协议, 默认值为: SNCP, 多个协议用分号;隔开
|
||||
ports: 服务发现可以处理的端口, 多个端口用分号;隔开
|
||||
ttls: 心跳频率,多少秒一次
|
||||
xxxx: 自定义的字段属性,例如:CacheClusterAgent有source字段; ConsulClusterAgent有apiurl字段;
|
||||
-->
|
||||
<cluster type="org.redkalex.cluster.consul.ConsulClusterAgent" waits="false" protocols="SNCP" ports="7070;7071" xxx="xxx" />
|
||||
|
||||
<!--
|
||||
MQ管理接口配置
|
||||
不同MQ节点所配置的MQ集群不能重复。
|
||||
MQ跟着协议走,所以mq的属性值需要被赋值在rest节点上, 由于SncpServlet是自动生成的,故SNCP协议下,mq属性值被赋值在service/services节点上
|
||||
name: 服务的名称,用于监控识别,多个mq节点时只能有一个name为空的节点,mq.name不能重复,命名规则: 字母、数字、下划线
|
||||
type: 实现类名,必须是org.redkale.mq.MessageAgent的子类
|
||||
threads: 线程数,为0表示使用workExecutor。默认: CPU核数, 核数=1的情况下默认值为2,JDK 21以上版本默认使用虚拟线程池
|
||||
rpcfirst:cluster和mq同名组件时,HttpRpcClient优先使用MQ,默认不优先走MQ。
|
||||
coder: MessageRecord的解析器类,必须是org.redkale.mq.MessageCoder<MessageRecord>的实现类,
|
||||
可对数据包进行加密解密,默认值:org.redkale.mq.MessageRecordCoder
|
||||
MQ节点下的子节点配置没有固定格式, 根据MessageAgent实现方的定义来配置
|
||||
-->
|
||||
<mq name="" type="org.redkalex.mq.kafka.KafkaMessageAgent" rpcfirst="false" threads="4">
|
||||
<servers value="127.0.0.1:9101"/>
|
||||
<!--
|
||||
加载所有的MessageConsumer实例;
|
||||
autoload="true" 默认值. 自动加载classpath下所有的MessageConsumer类
|
||||
autoload="false" 需要显著的指定MessageConsumer类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<consumer autoload="true" includes="" excludes=""/>
|
||||
<!--
|
||||
MQ实现方的配置项
|
||||
type: 配置项类型,值只能是consumer或producer
|
||||
-->
|
||||
<config type="consumer">
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</config>
|
||||
<config type="producer">
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</config>
|
||||
</mq>
|
||||
|
||||
<!--
|
||||
一个组包含多个node, 同一Service服务可以由多个进程提供,这些进程称为一个GROUP,且同一GROUP内的进程必须在同一机房或局域网内
|
||||
name: 服务组ID,长度不能超过11个字节. 默认为空字符串。 注意: name不能包含$符号。
|
||||
protocol: 值范围:UDP TCP, 默认TCP
|
||||
nodes: 多个node节点值; 例如:192.168.0.1:6060,192.168.0.2:6060
|
||||
注意: 一个node只能所属一个group。只要存在protocol=SNCP的Server节点信息, 就必须有group节点信息。
|
||||
-->
|
||||
<group name="" protocol="TCP" nodes="192.168.0.1:6060,192.168.0.2:6060">
|
||||
<!--
|
||||
需要将本地node的addr与port列在此处, 也可以直接用nodes属性。
|
||||
同一个<node>节点值只能存在一个<group>节点内,即同一个addr+port只能属于一个group。
|
||||
addr: required IP地址
|
||||
port: required 端口
|
||||
-->
|
||||
<node addr="127.0.0.1" port="7070"/>
|
||||
</group>
|
||||
|
||||
<!--
|
||||
Application启动的监听事件,可配置多个节点
|
||||
value: 类名,必须是ApplicationListener的子类
|
||||
-->
|
||||
<listener value="org.redkalex.xxx.XXXApplicationListener"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
全局的参数配置, 可以通过@Resource(name="property.xxxxxx") 进行注入<property>的信息, 被注解的字段类型只能是String、primitive class
|
||||
如果name是system.property.开头的值将会在进程启动时进行System.setProperty("yyyy", "YYYYYY")操作。
|
||||
如果name是mimetype.property.开头的值将会在进程启动时进行MimeType.add("yyyy", "YYYYYY")操作。
|
||||
先加载子节点property,再加载load文件, 最后加载agent的实现子类。
|
||||
load: 加载文件,多个用;隔开。
|
||||
其他属性: 供org.redkale.boot.PropertiesAgentProvider使用判断
|
||||
默认置入的system.property.的有:
|
||||
System.setProperty("redkale.convert.pool.size", "128");
|
||||
System.setProperty("redkale.convert.writer.buffer.defsize", "4096");
|
||||
|
||||
<properties>节点下也可包含非<property>节点.
|
||||
非<property>其节点可以通过@Resource(name="properties.xxxxxx")进行注入, 被注解的字段类型只能是AnyValue、AnyValue[]
|
||||
-->
|
||||
<properties load="config.properties">
|
||||
<property name="system.property.yyyy" value="YYYYYY"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</properties>
|
||||
|
||||
<!--
|
||||
protocol: required server所启动的协议,Redkale内置的有HTTP、SNCP、WATCH。协议均使用TCP实现; WATCH服务只能存在一个。
|
||||
name: 服务的名称,用于监控识别,一个配置文件中的server.name不能重复,命名规则: 字母、数字、下划线
|
||||
host: 服务所占address , 默认: 0.0.0.0
|
||||
port: required 服务所占端口
|
||||
root: 如果是web类型服务,则包含页面 默认:{APP_HOME}/root
|
||||
lib: server额外的class目录, 默认为${APP_HOME}/libs/*;
|
||||
charset: 文本编码, 默认: UTF-8
|
||||
backlog: 默认10K
|
||||
maxconns: 最大连接数, 小于1表示无限制, 默认: 0
|
||||
maxbody: request.body最大值, 默认: 256K
|
||||
bufferCapacity: ByteBuffer的初始化大小, TCP默认: 32K; (HTTP 2.0、WebSocket,必须要16k以上); UDP默认: 8K
|
||||
bufferPoolSize: ByteBuffer池的大小,默认: 线程数*4
|
||||
responsePoolSize: Response池的大小,默认: 1024
|
||||
aliveTimeoutSeconds: KeepAlive读操作超时秒数, 默认30, 0表示永久不超时; -1表示禁止KeepAlive
|
||||
readTimeoutSeconds: 读操作超时秒数, 默认0, 0表示永久不超时
|
||||
writeTimeoutSeconds: 写操作超时秒数, 默认0, 0表示永久不超时
|
||||
interceptor: 启动/关闭NodeServer时被调用的拦截器实现类,必须是org.redkale.boot.NodeInterceptor的子类,默认为null
|
||||
-->
|
||||
<server protocol="HTTP" host="127.0.0.1" port="6060" root="root" lib="">
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
builder: 创建SSLContext的实现类, 可自定义,必须是org.redkale.net.SSLBuilder的子类
|
||||
sslProvider: java.security.Provider自定义的实现类,如第三方: org.conscrypt.OpenSSLProvider、org.bouncycastle.jce.provider.BouncyCastleProvider
|
||||
jsseProvider: java.security.Provider自定义的实现类,如第三方: org.conscrypt.JSSEProvider、 org.bouncycastle.jce.provider.BouncyCastleJsseProvider
|
||||
protocol: TLS版本,默认值: TLS
|
||||
protocols: 设置setEnabledProtocols, 多个用,隔开 如: TLSv1.2,TLSv1.3
|
||||
clientAuth: WANT/NEED/NONE, 默认值: NONE
|
||||
ciphers: 设置setEnabledCipherSuites, 多个用,隔开 如: TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256
|
||||
keystorePass: KEY密码
|
||||
keystoreFile: KEY文件 .jks
|
||||
keystoreType: KEY类型, 默认值为JKS
|
||||
keystoreAlgorithm: KEY文件的algorithm, 默认值为SunX509
|
||||
truststorePass: TRUST密码
|
||||
truststoreFile: TRUST文件
|
||||
truststoreType: TRUST类型, 默认值为JKS
|
||||
truststoreAlgorithm: TRUST文件的algorithm, 默认值为SunX509
|
||||
-->
|
||||
<ssl builder=""/>
|
||||
|
||||
<!--
|
||||
加载所有的Service服务;
|
||||
在同一个进程中同一个name同一类型的Service将共用同一个实例
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Service类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
mq: 所属的MQ管理器,当 protocol == SNCP 时该值才有效, 存在该属性表示Service的SNCP协议采用消息总线代理模式
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
group: 所属组的节点, 不能指定多个group, 如果配置文件中存在多个SNCP协议的Server节点,需要显式指定group属性.
|
||||
当 protocol == SNCP 时 group表示当前Server与哪些节点组关联。
|
||||
当 protocol != SNCP 时 group只能是空或者一个group的节点值。
|
||||
特殊值"$remote", 视为通过第三方服务注册发现管理工具来获取远程模式的ip端口信息
|
||||
-->
|
||||
<services autoload="true" includes="" excludes="">
|
||||
|
||||
<!-- 显著加载指定的Service的接口类 -->
|
||||
<service value="com.xxx.XXX1Service"/>
|
||||
<!--
|
||||
name: 显式指定name,覆盖默认的空字符串值。 注意: name不能包含$符号。
|
||||
mq: 所属的MQ管理器,当 protocol == SNCP 时该值才有效, 存在该属性表示Service的SNCP协议采用消息总线代理模式
|
||||
group: 显式指定group,覆盖<services>节点的group默认值。
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<service value="com.xxx.XXX2Service" name="" group="xxx"/>
|
||||
<!-- 给Service增加配置属性 -->
|
||||
<service value="com.xxx.XXX1Service">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<!--
|
||||
加载所有的Filter服务;
|
||||
autoload="true" 默认值.
|
||||
autoload="false" 需要显著的指定Filter类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<filters autoload="true" includes="" excludes="">
|
||||
|
||||
<!--
|
||||
显著加载指定的Filter类
|
||||
value=: Filter类名。必须与Server的协议层相同,HTTP必须是HttpFilter
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<!-- 显著加载指定的Filter类 -->
|
||||
<filter value="com.xxx.XXX1Filter"/>
|
||||
|
||||
<!-- 给Filter增加配置属性 -->
|
||||
<filter value="com.xxx.XXX12Filter">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</filter>
|
||||
</filters>
|
||||
|
||||
<!--
|
||||
REST的核心配置项
|
||||
当Server为HTTP协议时, rest节点才有效。存在[rest]节点则Server启动时会加载REST服务, 节点可以多个,(WATCH协议不需要设置,系统会自动生成)
|
||||
path: servlet的ContextPath前缀 默认为空 【注: 开启MQ时,该字段失效】
|
||||
base: REST服务的BaseServlet,必须是 org.redkale.net.http.HttpServlet 的子类,且子类必须标记@HttpUserType。
|
||||
mq: 所属的MQ管理器, 存在该属性表示RestService的请求来自于消息总线 【注: 开启MQ时,path字段失效】
|
||||
autoload:默认值"true" 默认值. 加载当前server所能使用的Servce对象;
|
||||
includes:当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes:当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<rest path="/pipes" base="org.redkale.net.http.HttpServlet" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
value: Service类名,列出的表示必须被加载的Service对象
|
||||
ignore: 是否忽略,设置为true则不会加载该Service对象,默认值为false
|
||||
-->
|
||||
<service value="com.xxx.XXXXService"/>
|
||||
<!--
|
||||
value: WebSocket类名,列出的表示必须被加载且标记为@RestWebSocket的WebSocket对象
|
||||
ignore: 是否忽略,设置为true则不会加载该RestWebSocket对象,默认值为false
|
||||
-->
|
||||
<websocket value="com.xxx.XXXXRestWebSocket"/>
|
||||
</rest>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, request节点才有效。
|
||||
remoteaddr 节点: 替换请求方节点的IP地址, 通常请求方是由nginx等web静态服务器转发过的则需要配置该节点。
|
||||
且value值只能是以request.headers.开头,表示从request.headers中获取对应的header值。
|
||||
locale value值必须是request.headers.或request.parameters.开头。
|
||||
例如下面例子获取request.getRemoteAddr()值,如果header存在X-RemoteAddress值则返回X-RemoteAddress值,不存在返回getRemoteAddress()。
|
||||
-->
|
||||
<request>
|
||||
<remoteaddr value="request.headers.X-RemoteAddress"/>
|
||||
<locale value="request.headers.locale" />
|
||||
<rpc authenticator="org.redkale.net.http.HttpRpcAuthenticator的实现类"/>
|
||||
</request>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, response节点才有效。
|
||||
contenttype: plain值为调用finish时的ContentType; 默认值: text/plain; charset=utf-8
|
||||
json值为调用finishJson时的ContentType; 默认值: application/json; charset=utf-8
|
||||
defcookie 节点: 当response里输出的cookie没有指定domain 和path时,使用该节点的默认值。
|
||||
addheader、setheader 的value值以request.parameters.开头则表示从request.parameters中获取对应的parameter值
|
||||
addheader、setheader 的value值以request.headers.开头则表示从request.headers中获取对应的header值
|
||||
例如下面例子是在Response输出header时添加两个header(一个addHeader, 一个setHeader)。
|
||||
options 节点: 设置了该节点且auto=true,当request的method=OPTIONS自动设置addheader、setheader并返回200状态码
|
||||
date 节点: 设置了该节点且period有值(单位:毫秒);返回response会包含Date头信息,默认为period=0
|
||||
period=0表示实时获取当前时间;
|
||||
period<0表示不设置date;
|
||||
period>0表示定时获取时间; 设置1000表示每秒刷新Date时间
|
||||
-->
|
||||
<response>
|
||||
<content-type plain="text/plain; charset=utf-8" json="application/json; charset=utf-8"/>
|
||||
<defcookie domain="" path=""/>
|
||||
<addheader name="Access-Control-Allow-Origin" value="request.headers.Origin" /> <!-- 可多节点 -->
|
||||
<setheader name="Access-Control-Allow-Headers" value="request.headers.Access-Control-Request-Headers"/> <!-- 可多节点 -->
|
||||
<setheader name="Access-Control-Allow-Credentials" value="true"/>
|
||||
<options auto="true" />
|
||||
<date period="0" />
|
||||
</response>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,render才有效. 指定输出引擎的实现类
|
||||
value: 输出引擎的实现类, 必须是org.redkale.net.http.HttpRender的子类
|
||||
suffixs: 引擎文件名后缀,多个用;隔开,默认值为: .htel
|
||||
-->
|
||||
<render value="org.redkalex.htel.HttpTemplateRender" suffixs=".htel"/>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,ResourceServlet才有效. 默认存在一个有默认属性的resource-servlet节点
|
||||
webroot: web资源的根目录, 默认取server节点中的root值
|
||||
servlet: 静态资源HttpServlet的实现,默认使用HttpResourceServlet
|
||||
index : 启始页,默认值:index.html
|
||||
-->
|
||||
<resource-servlet webroot="root" index="index.html">
|
||||
<!--
|
||||
【节点在<resource-servlet>中唯一】
|
||||
资源缓存的配置, 默认存在一个含默认属性的caches节点
|
||||
limit: 资源缓存最大容量, 默认: 0, 为0表示不缓存, 单位可以是B、K、M、G,不区分大小写
|
||||
lengthmax: 可缓存的文件大小上限, 默认: 1M(超过1M的文件不会被缓存)
|
||||
watch: 是否监控缓存文件的变化, 默认为false,不监控
|
||||
-->
|
||||
<cache limit="0M" lengthmax="1M" watch="false"/>
|
||||
<!--
|
||||
支持类似nginx中的rewrite, 目前只支持静态资源对静态资源的跳转。
|
||||
type: 匹配的类型, 目前只支持location(匹配path), 默认: location
|
||||
match: 匹配的正则表达式
|
||||
forward: 需跳转后的资源链接
|
||||
例如下面例子是将/xxx-yyy.html的页面全部跳转到/xxx.html
|
||||
-->
|
||||
<rewrite type="location" match="^/([^-]+)-[^-\.]+\.html(.*)" forward="/$1.html"/>
|
||||
</resource-servlet>
|
||||
<!--
|
||||
加载所有的Servlet服务;
|
||||
path: servlet的ContextPath前缀 默认为空
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Servlet类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<servlets path="/pipes" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
显著加载指定的Servlet类
|
||||
value=: Servlet类名。必须与Server的协议层相同,HTTP必须是HttpServlet
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<servlet value="com.xxx.XXX1Servlet" />
|
||||
<servlet value="com.xxx.XXX2Servlet" />
|
||||
<servlet value="com.xxx.XXX3Servlet" >
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="yyyyyy" value="YYYYYYYY"/>
|
||||
</servlet>
|
||||
</servlets>
|
||||
</server>
|
||||
|
||||
<server protocol="SNCP" host="127.0.0.1" port="7070" root="root" lib="">
|
||||
<!-- 参数完全同上 -->
|
||||
<services autoload="true" includes="" excludes="" />
|
||||
</server>
|
||||
|
||||
</application>
|
||||
|
||||
```
|
||||
|
||||
# source.properties 配置:
|
||||
```properties
|
||||
|
||||
# CacheSource @Resource(name="usersession")
|
||||
# type可以不用设置,框架会根据url判断使用哪个CacheSource实现类
|
||||
redkale.cachesource.usersession.type = org.redkalex.cache.redis.RedisCacheSource
|
||||
# 最大连接数
|
||||
redkale.cachesource.usersession.maxconns = 16
|
||||
# 节点地址
|
||||
redkale.cachesource.usersession.nodes = redis://127.0.0.1:6363
|
||||
# 节点密码
|
||||
redkale.cachesource.usersession.password = 12345678
|
||||
# 节点db
|
||||
redkale.cachesource.usersession.db = 0
|
||||
|
||||
#简化写法: 可以不用.node[0], 将参数都合并到url中
|
||||
redkale.cachesource.usersession.url = redis://user:123456@127.0.0.1:6363?db=0
|
||||
|
||||
|
||||
# DataSource @Resource(name="platf")
|
||||
# type可以不用设置,框架会根据url判断使用哪个DataSource实现类,默认值: org.redkale.source.DataJdbcSource
|
||||
redkale.datasource.platf.type = org.redkale.source.DataJdbcSource
|
||||
# 是否开启缓存(标记为@Cacheable的Entity类),值目前只支持两种: ALL: 所有开启缓存。 NONE: 关闭所有缓存, 非NONE字样统一视为ALL
|
||||
redkale.datasource.platf.cachemode = ALL
|
||||
# 是否自动建表当表不存在的时候, 目前只支持mysql、postgres, 默认为false
|
||||
redkale.datasource.platf.table-autoddl = false
|
||||
# 用户
|
||||
redkale.datasource.platf.user = root
|
||||
# 密码
|
||||
redkale.datasource.platf.password = 12345678
|
||||
# 多个URL用;隔开,如分布式SearchSource需要配多个URL
|
||||
redkale.datasource.platf.url = jdbc:mysql://127.0.0.1:3306/platf?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
# 最大连接数,默认值:CPU数
|
||||
redkale.datasource.platf.maxconns = 16
|
||||
# 包含的SQL模板,相当于反向LIKE,不同的JDBC驱动的SQL语句不一样,Redkale内置了MySQL的语句
|
||||
redkale.datasource.platf.contain-sqltemplate = LOCATE(#{keystr}, #{column}) > 0
|
||||
# 包含的SQL模板,相当于反向LIKE,不同的JDBC驱动的SQL语句不一样,Redkale内置了MySQL的语句
|
||||
redkale.datasource.platf.notcontain-sqltemplate = LOCATE(#{keystr}, #{column}) = 0
|
||||
# 复制表结构的SQL模板,Redkale内置了MySQL的语句
|
||||
redkale.datasource.platf.tablenotexist-sqlstates = 42000;42S02
|
||||
# 复制表结构的SQL模板,Redkale内置了MySQL的语句
|
||||
redkale.datasource.platf.tablecopy-sqltemplate = CREATE TABLE IF NOT EXISTS #{newtable} LIKE #{oldtable}
|
||||
|
||||
|
||||
# DataSource 读写分离
|
||||
redkale.datasource.platf.read.url = jdbc:mysql://127.0.0.1:3306/platf_r?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
redkale.datasource.platf.read.user = root
|
||||
redkale.datasource.platf.read.password = 12345678
|
||||
|
||||
redkale.datasource.platf.write.url = jdbc:mysql://127.0.0.1:3306/platf_w?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
redkale.datasource.platf.write.user = root
|
||||
redkale.datasource.platf.write.password = 12345678
|
||||
```
|
||||
|
||||
# logging.properties 配置:
|
||||
```properties
|
||||
|
||||
handlers = java.util.logging.ConsoleHandler,java.util.logging.FileHandler
|
||||
.handlers = java.util.logging.ConsoleHandler,java.util.logging.FileHandler
|
||||
|
||||
############################################################
|
||||
.level = FINE
|
||||
|
||||
sun.level = INFO
|
||||
java.level = INFO
|
||||
javax.level = INFO
|
||||
com.sun.level = INFO
|
||||
|
||||
#java.util.logging.FileHandler.level = FINE
|
||||
|
||||
java.util.logging.FileHandler.limit = 20M
|
||||
java.util.logging.FileHandler.count = 100
|
||||
java.util.logging.FileHandler.encoding = UTF-8
|
||||
java.util.logging.FileHandler.pattern = ${APP_HOME}/logs-%tY%tm/log-%tY%tm%td.log
|
||||
#java.util.logging.FileHandler.unusual 属性表示将 WARNING、SEVERE 级别的日志复制写入单独的文件中
|
||||
java.util.logging.FileHandler.unusual = ${APP_HOME}/logs-%tY%tm/log-warnerr-%tY%tm%td.log
|
||||
#需要屏蔽消息内容的正则表达式
|
||||
java.util.logging.FileHandler.denyregx =
|
||||
java.util.logging.FileHandler.append = true
|
||||
|
||||
#java.util.logging.ConsoleHandler.level = FINE
|
||||
|
||||
#将日志写进SearchSource, 必须指定source资源名,在source.properties中定义
|
||||
#java.util.logging.SearchHandler.source = platfsearch
|
||||
#指定写进SearchSource的表名,默认值为log-record
|
||||
#java.util.logging.SearchHandler.tag = log-${APP_NAME}-%tY%tm%td
|
||||
```
|
||||
|
||||
# yaml配置:
|
||||
  application和source的配置文件支持yaml格式,需要依赖第三方包, 默认的yaml配置文件名为 application.yml、source.yml。
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkalex</groupId>
|
||||
<artifactId>redkale-plugins</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
```
|
||||
442
docs/convert.md
Normal file
442
docs/convert.md
Normal file
@@ -0,0 +1,442 @@
|
||||
# 序列化
|
||||
  Convert提供Java对象的序列化与反序列化功能。支持JSON、PROTOBUF两种格式化。 两种格式使用方式完全一样,其性能都大幅度超过其他JSON框架。同时JSON内置于HTTP服务中,PROTOBUF也是SNCP协议数据序列化的基础。
|
||||
## 基本API
|
||||
  JSON序列化其操作类主要是JsonConvert,配置类主要是JsonFactory、ConvertColumn。JsonFactory采用同ClassLoader类似的双亲委托方式设计。
|
||||
JsonConvert 序列化encode方法:
|
||||
```java
|
||||
public String convertTo(Object value);
|
||||
|
||||
public String convertTo(Type type, Object value);
|
||||
|
||||
public byte[] convertToBytes(Type type, Object value);
|
||||
|
||||
public void convertTo(OutputStream out, Type type, Object value);
|
||||
|
||||
public ByteBuffer[] convertTo(Supplier<ByteBuffer> supplier, Type type, Object value);
|
||||
|
||||
public void convertTo(JsonWriter writer, Type type, Object value);
|
||||
```
|
||||
JsonConvert 反序列化decode方法:
|
||||
```java
|
||||
public <T> T convertFrom(Type type, String text);
|
||||
|
||||
public <T> T convertFrom(Type type, InputStream in);
|
||||
|
||||
public <T> T convertFrom(Type type, ByteBuffer... buffers);
|
||||
|
||||
public <T> T convertFrom(Type type, JsonReader reader);
|
||||
|
||||
public Object[] convertFrom(Type[] types, String text);
|
||||
|
||||
// 返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final String text);
|
||||
|
||||
// 返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final InputStream in);
|
||||
```
|
||||
## JSON基本用法
|
||||
```java
|
||||
@Data
|
||||
public class UserRecord {
|
||||
|
||||
private int userid;
|
||||
|
||||
private String username = "";
|
||||
|
||||
private String password = "";
|
||||
|
||||
public UserRecord() {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
UserRecord user = new UserRecord();
|
||||
user.setUserid(100);
|
||||
user.setUsername("redkalename");
|
||||
user.setPassword("123456");
|
||||
final JsonConvert convert = JsonConvert.root();
|
||||
String json = convert.convertTo(user);
|
||||
System.out.println(json); //应该是 {"password":"123456","userid":100,"username":"redkalename"}
|
||||
UserRecord user2 = convert.convertFrom(UserRecord.class, json);
|
||||
//应该也是 {"password":"123456","userid":100,"username":"redkalename"}
|
||||
System.out.println(convert.convertTo(user2));
|
||||
|
||||
/**
|
||||
* 以下功能是为了屏蔽password字段。
|
||||
* 等价于 public String getPassword() 加上 @ConvertColumn :
|
||||
*
|
||||
* @ConvertColumn(ignore = true, type = ConvertType.JSON)
|
||||
* public String getPassword() {
|
||||
* return password;
|
||||
* }
|
||||
**/
|
||||
final JsonFactory childFactory = JsonFactory.root().createChild();
|
||||
childFactory.register(UserRecord.class, true, "password"); //屏蔽掉password字段使其不输出
|
||||
childFactory.reloadCoder(UserRecord.class); //重新加载Coder使之覆盖父Factory的配置
|
||||
final JsonConvert childConvert = childFactory.getConvert();
|
||||
json = childConvert.convertTo(user);
|
||||
System.out.println(json); //应该是 {"userid":100,"username":"redkalename"}
|
||||
user2 = childConvert.convertFrom(UserRecord.class, json);
|
||||
//应该也是 {"userid":100,"username":"redkalename"}
|
||||
System.out.println(childConvert.convertTo(user2));
|
||||
}
|
||||
```
|
||||
  在Redkale里存在默认的JsonConvert、ProtobufConvert对象。 只需在所有Service、Servlet中增加依赖注入资源。
|
||||
```java
|
||||
public class XXXService implements Service {
|
||||
|
||||
@Resource
|
||||
private JsonConvert jsonConvert;
|
||||
|
||||
@Resource
|
||||
private ProtobufConvert protobufConvert;
|
||||
}
|
||||
|
||||
public class XXXServlet extends HttpServlet {
|
||||
|
||||
@Resource
|
||||
private JsonConvert jsonConvert;
|
||||
|
||||
@Resource
|
||||
private ProtobufConvert protobufConvert;
|
||||
|
||||
}
|
||||
```
|
||||
   同一类型数据通过设置新的JsonFactory可以有不同的输出。
|
||||
```java
|
||||
@Data
|
||||
public class UserSimpleInfo {
|
||||
|
||||
private int userid;
|
||||
|
||||
private String username = "";
|
||||
|
||||
@ConvertColumn(ignore = true, type = ConvertType.JSON)
|
||||
private long regtime; //注册时间
|
||||
|
||||
@ConvertColumn(ignore = true, type = ConvertType.JSON)
|
||||
private String regaddr = ""; //注册IP
|
||||
|
||||
}
|
||||
|
||||
public class UserInfoServlet extends HttpBaseServlet {
|
||||
|
||||
@Resource
|
||||
private UserSerice service;
|
||||
|
||||
@Resource
|
||||
private JsonFactory jsonRootFactory;
|
||||
|
||||
@Resource
|
||||
private JsonConvert detailConvert;
|
||||
|
||||
@Override
|
||||
public void init(HttpContext context, AnyValue config) {
|
||||
final JsonFactory childFactory = jsonRootFactory.createChild();
|
||||
childFactory.register(UserSimpleInfo.class, false, "regtime", "regaddr"); //允许输出注册时间与注册地址
|
||||
childFactory.reloadCoder(UserSimpleInfo.class); //重新加载Coder使之覆盖父Factory的配置
|
||||
this.detailConvert = childFactory.getConvert();
|
||||
}
|
||||
|
||||
// 获取他人基本信息
|
||||
@HttpMapping(url = "/user/info/")
|
||||
public void info(HttpRequest req, HttpResponse resp) throws IOException {
|
||||
int userid = Integer.parseInt(req.getRequstURILastPath());
|
||||
UserSimpleInfo user = service.findUserInfo(userid);
|
||||
resp.finishJson(user); // 不包含用户的注册时间和注册地址字段信息
|
||||
}
|
||||
|
||||
//获取用户自己的信息
|
||||
@HttpMapping(url = "/user/myinfo")
|
||||
public void mydetail(HttpRequest req, HttpResponse resp) throws IOException {
|
||||
int userid = req.currentUser().getUserid(); //获取当前用户ID
|
||||
UserSimpleInfo user = service.findUserInfo(userid);
|
||||
resp.finishJson(detailConvert, user); // 包含用户的注册时间和注册地址字段信息
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
  Convert 支持带参数构造函数。
|
||||
|
||||
    1. public 带参数的构造函数加上 @ConstructorParameters 注解:
|
||||
```java
|
||||
public class UserRecord {
|
||||
|
||||
private int userid;
|
||||
|
||||
private String username = "";
|
||||
|
||||
private String password = "";
|
||||
|
||||
@ConstructorParameters({"userid", "username", "password"})
|
||||
public UserRecord(int userid, String username, String password) {
|
||||
this.userid = userid;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public int getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
}
|
||||
```
|
||||
    2. 自定义Creator:
|
||||
```java
|
||||
public class UserRecord {
|
||||
|
||||
private int userid;
|
||||
|
||||
private String username = "";
|
||||
|
||||
private String password = "";
|
||||
|
||||
UserRecord(int userid, String username, String password) {
|
||||
this.userid = userid;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public int getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义Creator方法。
|
||||
* 1) 方法名可以随意。
|
||||
* 2) 方法必须是static。
|
||||
* 3)方法的参数必须为空。
|
||||
* 4)方法的返回类型必须是Creator。
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static Creator<UserRecord> creator() {
|
||||
return new Creator<UserRecord>() {
|
||||
@Override
|
||||
@ConstructorParameters({"userid", "username", "password"}) //带参数的构造函数必须有ConstructorParameters注解
|
||||
public UserRecord create(Object... params) {
|
||||
int userid = (params[0] == null ? 0 : (Integer) params[0]);
|
||||
return new UserRecord(userid, (String) params[1], (String) params[2]);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
  通常JavaBean类默认有个public空参数的构造函数,因此大部分情况下不要自定义Creator,其实只要不是private的空参数构造函数Convert都能自动支持(其他的框架都仅支持public的构造函数),只有仅含private的构造函数才需要自定义Creator。带参数的构造函数就需要标记@ConstructorParameters,常见于Immutable Object。
|
||||
|
||||
## 自定义
|
||||
  Convert 支持自定义Decode、Encode。
|
||||
|
||||
    1. 通过ConvertFactory显式的注册:
|
||||
```java
|
||||
public class FileSimpleCoder<R extends Reader, W extends Writer> extends SimpledCoder<R, W, File> {
|
||||
|
||||
public static final FileSimpleCoder instance = new FileSimpleCoder();
|
||||
|
||||
@Override
|
||||
public void convertTo(W out, File value) {
|
||||
out.writeString(value == null ? null : value.getPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
public File convertFrom(R in) {
|
||||
String path = in.readString();
|
||||
return path == null ? null : new File(path);
|
||||
}
|
||||
}
|
||||
|
||||
JsonFactory.root().register(File.class, FileSimpleCoder.instance);
|
||||
|
||||
ProtobufFactory.root().register(File.class, FileSimpleCoder.instance);
|
||||
```
|
||||
    2. 通过JavaBean类自定义静态方法自动加载:
|
||||
```java
|
||||
public class InnerCoderEntity {
|
||||
|
||||
private final String val;
|
||||
|
||||
private final int id;
|
||||
|
||||
private InnerCoderEntity(int id, String value) {
|
||||
this.id = id;
|
||||
this.val = value;
|
||||
}
|
||||
|
||||
public static InnerCoderEntity create(int id, String value) {
|
||||
return new InnerCoderEntity(id, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法提供给Convert组件自动加载。
|
||||
* 1) 方法名可以随意。
|
||||
* 2) 方法必须是static
|
||||
* 3)方法的参数有且只能有一个, 且必须是org.redkale.convert.ConvertFactory或子类。
|
||||
* —3.1) 参数类型为org.redkale.convert.ConvertFactory 表示适合JSON,PROTOBUF。
|
||||
* —3.2) 参数类型为org.redkale.convert.json.JsonFactory 表示仅适合JSON。
|
||||
* —3.3) 参数类型为org.redkale.convert.pb.ProtobufFactory 表示仅适合PROTOBUF。
|
||||
* 4)方法的返回类型必须是 Decodeable/Encodeable/SimpledCoder
|
||||
* 若返回类型不是SimpledCoder, 就必须提供两个方法: 一个返回Decodeable 一个返回 Encodeable。
|
||||
*
|
||||
* @param factory
|
||||
* @return
|
||||
*/
|
||||
private static SimpledCoder<Reader, Writer, InnerCoderEntity> createConvertCoder(final ConvertFactory factory) {
|
||||
return new SimpledCoder<Reader, Writer, InnerCoderEntity>() {
|
||||
|
||||
//必须与EnMember[] 顺序一致
|
||||
private final DeMember[] deMembers = new DeMember[]{
|
||||
DeMember.create(factory, InnerCoderEntity.class, "id"),
|
||||
DeMember.create(factory, InnerCoderEntity.class, "val")};
|
||||
|
||||
//必须与DeMember[] 顺序一致
|
||||
private final EnMember[] enMembers = new EnMember[]{
|
||||
EnMember.create(factory, InnerCoderEntity.class, "id"),
|
||||
EnMember.create(factory, InnerCoderEntity.class, "val")};
|
||||
|
||||
@Override
|
||||
public void convertTo(Writer out, InnerCoderEntity value) {
|
||||
if (value == null) {
|
||||
out.writeObjectNull(InnerCoderEntity.class);
|
||||
return;
|
||||
}
|
||||
out.writeObjectB(value);
|
||||
for (EnMember member : enMembers) {
|
||||
out.writeObjectField(member, value);
|
||||
}
|
||||
out.writeObjectE(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InnerCoderEntity convertFrom(Reader in) {
|
||||
if (!in.readObjectB(this)) {
|
||||
return null;
|
||||
}
|
||||
int index = 0;
|
||||
final Object[] params = new Object[deMembers.length];
|
||||
while (in.hasNext()) {
|
||||
DeMember member = in.readFieldName(deMembers); //读取字段名
|
||||
in.readBlank(); //读取字段名与字段值之间的间隔符,JSON则是跳过冒号:
|
||||
if (member == null) {
|
||||
in.skipValue(); //跳过不存在的字段的值, 一般不会发生
|
||||
} else {
|
||||
params[index++] = member.read(in);
|
||||
}
|
||||
}
|
||||
in.readObjectE();
|
||||
return InnerCoderEntity.create(params[0] == null ? 0 : (Integer) params[0], (String) params[1]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getVal() {
|
||||
return val;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonConvert.root().convertTo(this);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## RestConvert
|
||||
  ```@RestConvert```、```@RestConvertCoder```是针对```@RestService```接口进行自定义序列化注解
|
||||
```java
|
||||
@Data
|
||||
public class RestConvertItem {
|
||||
|
||||
private long createTime;
|
||||
|
||||
@ConvertColumn(ignore = true)
|
||||
private String aesKey;
|
||||
}
|
||||
|
||||
@Data
|
||||
public class RestConvertBean {
|
||||
|
||||
private int id;
|
||||
|
||||
private boolean enable;
|
||||
|
||||
private String name;
|
||||
|
||||
private RestConvertItem content;
|
||||
}
|
||||
|
||||
//将boolean类型值转换成0/1的int值
|
||||
public class RestConvertBoolCoder<R extends Reader, W extends Writer> extends SimpledCoder<R, W, Boolean> {
|
||||
|
||||
@Override
|
||||
public void convertTo(W out, Boolean value) {
|
||||
out.writeInt(value == null || !value ? 0 : 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean convertFrom(R in) {
|
||||
return in.readInt() == 1;
|
||||
}
|
||||
}
|
||||
|
||||
@RestService(name = "test", autoMapping = true)
|
||||
public class RestConvertService extends AbstractService {
|
||||
|
||||
//输出: {"content":{"createTime":100},"enable":true,"id":123,"name":"haha"}
|
||||
public RestConvertBean load1() {
|
||||
return createBean();
|
||||
}
|
||||
|
||||
//输出: {"content":{"aesKey":"keykey","createTime":100},"enable":true,"id":123,"name":"haha"}
|
||||
//aesKey字段也会被输出
|
||||
@RestConvert(type = RestConvertItem.class, skipIgnore = true)
|
||||
public RestConvertBean load2() {
|
||||
return createBean();
|
||||
}
|
||||
|
||||
//输出: {"id":123}
|
||||
//只输出id字段
|
||||
@RestConvert(type = RestConvertBean.class, onlyColumns = "id")
|
||||
public RestConvertBean load3() {
|
||||
return createBean();
|
||||
}
|
||||
|
||||
//输出: {"content":{"createTime":100},"enable":1,"id":123,"name":"haha"}
|
||||
//enable字段输出1,而不是true
|
||||
@RestConvertCoder(type = RestConvertBean.class, field = "enable", coder = RestConvertBoolCoder.class)
|
||||
public RestConvertBean load4() {
|
||||
return createBean();
|
||||
}
|
||||
|
||||
private RestConvertBean createBean() {
|
||||
RestConvertBean bean = new RestConvertBean();
|
||||
bean.setId(123);
|
||||
bean.setName("haha");
|
||||
bean.setEnable(true);
|
||||
RestConvertItem item = new RestConvertItem();
|
||||
item.setCreateTime(100);
|
||||
item.setAesKey("keykey");
|
||||
bean.setContent(item);
|
||||
return bean;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
195
docs/datasource.md
Normal file
195
docs/datasource.md
Normal file
@@ -0,0 +1,195 @@
|
||||
# DB数据源
|
||||
   DataSource是数据层操作的抽象接口,不仅用于关系型数据库,还支持内存、Mongodb、ElasticSearch等数据源,redkale内置了内存版DataSource,官方扩展包```redkale-plugins```提供了Mongodb、ElasticSearch的实现。<br>
|
||||
   DataSource几乎所有操作都提供同步与异步两种方法,对性能要求高的可以采用异步方式,例如使用vertx实现的DataSqlSource。
|
||||
## 注解说明
|
||||
|注解类名 | 功能描述|
|
||||
| --- | --- |
|
||||
|@Column |标记字段,与JPA用法一致 |
|
||||
|@Entity |标记实体类,与JPA用法一致 |
|
||||
|@Id |标记主键字段,与JPA用法一致 |
|
||||
|@Table |标记表的别名,与JPA用法一致 |
|
||||
|@Transient |标记是否为表对应的字段,与JPA用法一致 |
|
||||
|@VirtualEntity |用于非数据库表对应的Entity类,且仅用于开启缓存模式的DataSource |
|
||||
|@DistributeTable |标记表进行分表分库存储, 与DistributeTableStrategy接口结合使用 |
|
||||
|@FilterColumn |用于FilterBean过滤类的字段设置 |
|
||||
|@FilterJoinColumn |用于FilterBean过滤类的关联表字段设置 |
|
||||
|@FilterGroup | 用于FilterBean过滤类的过滤条件分组设置 |
|
||||
|@FilterOrs | 用于FilterBean字段间的与或关系 |
|
||||
|
||||
## 操作方法
|
||||
|系列方法 | 功能描述|
|
||||
| --- | --- |
|
||||
|insert |插入实体 |
|
||||
|delete |删除实体 |
|
||||
|update |更新实体 |
|
||||
|updateColumn |更新数据的部分字段 |
|
||||
|find |查找单个对象 |
|
||||
|queryList |查询对象的List集合 |
|
||||
|querySheet |查询对象的Sheet页式集合 |
|
||||
|getNumberXXX |统计查询,用于查询字段的总和、最大值、平均值等数据 |
|
||||
|queryColumnXXX |单个字段数据查询和字段的统计查询 |
|
||||
|nativeXXX |直接运行SQL语句,用于复杂的关联查询与更新(仅限DataSqlSource) |
|
||||
|
||||
## 配置数据源
|
||||
```properties
|
||||
redkale.datasource.platf.url = jdbc:mysql://127.0.0.1:3306/platf?serverTimezone=UTC&characterEncoding=utf8
|
||||
redkale.datasource.platf.user = root
|
||||
redkale.datasource.platf.password = pwd123
|
||||
```
|
||||
|
||||
## pom依赖
|
||||
   使用jdbc驱动:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>8.2.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
   异步场景可使用vertx-mysql-client实现, 需要依赖官方扩展包 ```redkale-plugins```:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkalex</groupId>
|
||||
<artifactId>redkale-plugins</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-mysql-client</artifactId>
|
||||
<version>4.5.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## 增删改查
|
||||
```java
|
||||
@Data
|
||||
@Table(name = "t_account")
|
||||
public class Account {
|
||||
//男
|
||||
public static final short GENDER_MALE = 1;
|
||||
|
||||
//女
|
||||
public static final short GENDER_FEMALE = 2;
|
||||
|
||||
@Id
|
||||
@Column(name = "account_id")
|
||||
private String accountid;
|
||||
|
||||
@Column(name = "account_name")
|
||||
private String accountName;
|
||||
|
||||
private int age;
|
||||
|
||||
private short gender;
|
||||
|
||||
private String remark;
|
||||
|
||||
@Column(name = "create_time", updatable = false)
|
||||
private long createTime;
|
||||
}
|
||||
```
|
||||
|
||||
  新增实体对象:
|
||||
```java
|
||||
@Resource(name = "platf")
|
||||
private DataSource source;
|
||||
|
||||
public void insertTest() {
|
||||
//新增单个
|
||||
Account account = new Account();
|
||||
account.setAccountid("account1");
|
||||
account.setAccountName("Hello");
|
||||
account.setCreateTime(System.currentTimeMillis());
|
||||
source.insert(account);
|
||||
|
||||
//异步新增多个
|
||||
Account a1 = new Account();
|
||||
a1.setAccountid("account1");
|
||||
a1.setAccountName("Hello1");
|
||||
a1.setCreateTime(System.currentTimeMillis());
|
||||
Account a2 = new Account();
|
||||
a2.setAccountid("account2");
|
||||
a2.setAccountName("Hello2");
|
||||
a2.setCreateTime(System.currentTimeMillis());
|
||||
source.insertAsync(a1, a2);
|
||||
}
|
||||
```
|
||||
|
||||
  删除实体:
|
||||
```java
|
||||
//根据主键值删除
|
||||
Account account = new Account();
|
||||
account.setAccountid("account1");
|
||||
source.delete(account);
|
||||
|
||||
//过滤删除, 删除16以下男生
|
||||
//等价sql: DELETE FROM t_account WHERE age < 16 AND gender = 1;
|
||||
source.delete(Account.class, FilterNodes.lt(Account::getAge, 16).and("gender", GENDER_MALE));
|
||||
```
|
||||
|
||||
  修改实体对象:
|
||||
```java
|
||||
//Lambda方式,根据主键更新单个字段
|
||||
source.updateColumn(Account.class, "account1", Account::getRemark, "新备注");
|
||||
|
||||
//Lambda方式,根据主键更新多个字段
|
||||
//等价sql: UPDATE t_account SET account_name='新名称', remark='新备注', age=age+2 WHERE account_id='account1';
|
||||
source.updateColumn(Account.class, "account1",
|
||||
ColumnValue.set(Account::getAccountName, "新名称"),
|
||||
ColumnValue.set(Account::getRemark, "新备注"),
|
||||
ColumnValue.inc(Account::getAge, 2)); //年龄+2
|
||||
|
||||
//根据主键更新多个字段
|
||||
Account account = new Account();
|
||||
account.setAccountid("account1");
|
||||
account.setAccountName("新名称");
|
||||
account.setRemark("新备注");
|
||||
source.updateColumn(account, "accountName", "remark");
|
||||
//或者
|
||||
//等价sql: UPDATE t_account SET account_name='新名称', remark='新备注' WHERE account_id='account1';
|
||||
source.updateColumn(account, Account::getAccountName, Account::getRemark);
|
||||
|
||||
//根据主键更新整个对象
|
||||
Account one = new Account();
|
||||
one.setAccountid("account1");
|
||||
one.setAccountName("Hello1");
|
||||
one.setCreateTime(System.currentTimeMillis());
|
||||
source.update(one); //createTime不会被更新,因字段设置了@Column(updatable=false)
|
||||
|
||||
//过滤更新
|
||||
//等价sql: UPDATE t_account SET remark = '不满16岁是青少年' WHERE age < 16;
|
||||
source.updateColumn(Account.class, FilterNodes.lt(Account::getAge, 16),
|
||||
ColumnValue.set(Account::getRemark, "不满16岁是青少年"));
|
||||
```
|
||||
|
||||
  批量操作:
|
||||
```java
|
||||
Account a1 = new Account();
|
||||
a1.setAccountid("account1");
|
||||
a1.setAccountName("Hello1");
|
||||
a1.setCreateTime(System.currentTimeMillis());
|
||||
|
||||
//事务性批量操作
|
||||
DataBatch batch = DataBatch.create()
|
||||
.insert(a1)
|
||||
.updateColumn(Account.class, "account1", ColumnValue.set(Account::getRemark, "不满16岁是青少年"))
|
||||
.delete(Account.class, FilterNodes.lt(Account::getAge, 16).and("gender", GENDER_MALE));
|
||||
source.batch(batch);
|
||||
```
|
||||
|
||||
  查询实体对象:
|
||||
```java
|
||||
//主键查询
|
||||
//等价sql: SELECT * FROM t_account WHERE account_id = 'account1';
|
||||
Account account = source.find(Account.class, "account1");
|
||||
|
||||
//等价sql: SELECT * FROM t_account WHERE account_name = 'Hello' AND age = 18 LIMIT 1;
|
||||
Account one = source.find(Account.class, FilterNodes.eq(Account::getAccountName, "Hello").and(Account::getAge, 18));
|
||||
|
||||
//等价sql: SELECT * FROM t_account WHERE account_name = 'Hello' OR age = 18;
|
||||
FilterNode filter = FilterNodes.eq(Account::getAccountName, "Hello").or(Account::getAge, 18);
|
||||
List<Account> list = source.queryList(Account.class, filter);
|
||||
|
||||
```
|
||||
2
docs/faq.md
Normal file
2
docs/faq.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# FAQ
|
||||
文档完善中……
|
||||
1
docs/http.md
Normal file
1
docs/http.md
Normal file
@@ -0,0 +1 @@
|
||||
文档完善中……
|
||||
BIN
docs/images/hello-console.png
Normal file
BIN
docs/images/hello-console.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
BIN
docs/images/home-dir.png
Normal file
BIN
docs/images/home-dir.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
docs/images/logo.png
Normal file
BIN
docs/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
1
docs/locked.md
Normal file
1
docs/locked.md
Normal file
@@ -0,0 +1 @@
|
||||
文档完善中……
|
||||
40
docs/native-image.md
Normal file
40
docs/native-image.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# 使用native-image
|
||||
   Redkale支持GraalVM的native-image, 由于Redkale使用了大量的asm动态生成代码,而native-image不支持动态字节码,因此需要使用```redkale-maven-plugin```执行预编译,提前生成动态字节码进行打包。
|
||||
|
||||
## 安装GraalVM
|
||||
```
|
||||
下载地址: https://www.graalvm.org/downloads/
|
||||
```
|
||||
|
||||
## 安装native-image
|
||||
```
|
||||
install native-image
|
||||
```
|
||||
|
||||
## 配置pom
|
||||
```xml
|
||||
<plugin>
|
||||
<groupId>org.redkale.maven.plugins</groupId>
|
||||
<artifactId>redkale-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<configuration>
|
||||
<nativeimageArgs>
|
||||
<arg>--no-fallback</arg>
|
||||
</nativeimageArgs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>redkale-compile</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
```
|
||||
|
||||
## native-image编译
|
||||
```
|
||||
native-image -H:+ReportExceptionStackTraces --report-unsupported-elements-at-runtime -jar xxx.jar
|
||||
```
|
||||
62
docs/quick-start.md
Normal file
62
docs/quick-start.md
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
# 安装
|
||||
使用maven:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkale</groupId>
|
||||
<artifactId>redkale</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
```
|
||||
如果工程需要用到Redis、Kafka、Elasticsearch、SQL模板、模板引擎等,可使用redkale的官方插件:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkalex</groupId>
|
||||
<artifactId>redkale-plugins</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
# 创建工程
|
||||
在IDE中使用ant或maven方式创建工程,增加redkale的依赖。下载解压
|
||||
|
||||
  
|
||||
|
||||
并覆盖到工程目录下。
|
||||
* bin: 存放启动/关闭脚本(start.sh、shutdown.sh、redkale.sh等)
|
||||
* conf : 存放服务器所需配置文件:
|
||||
*    application.xml: 服务配置文件 (必需);
|
||||
*    logging.properties:日志配置文件 (可选);
|
||||
*    source.properties: 数据库配置文件 (可选);
|
||||
* lib : 存放服务所依赖jar
|
||||
* logs : logging.properties配置中默认的日志存放目录。
|
||||
|
||||
|
||||
# Hello World
|
||||
|
||||
演示工程, 编写HelloService:
|
||||
```java
|
||||
package org.redkalex.example;
|
||||
|
||||
import org.redkale.net.http.*;
|
||||
import org.redkale.service.Service;
|
||||
|
||||
@RestService(autoMapping = true)
|
||||
public class HelloService implements Service {
|
||||
|
||||
public String sayHello() {
|
||||
return "Hello World!";
|
||||
}
|
||||
|
||||
public String hi(String name) {
|
||||
return "Hi, " + name + "!";
|
||||
}
|
||||
}
|
||||
```
|
||||
运行结果:
|
||||
|
||||
  
|
||||
|
||||
# 进一步阅读
|
||||
* 详细的配置说明看[这里](config.md)。
|
||||
* 数据源[这里](source.md)
|
||||
85
docs/scheduled.md
Normal file
85
docs/scheduled.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# 定时任务
|
||||
  @Scheduled注解在Service的方法上,实现对方法结果进行定时运行。方法必须是无参数或者```ScheduledEvent```参数。
|
||||
|
||||
## 属性说明
|
||||
|属性|默认值|说明|
|
||||
| --- | --- | --- |
|
||||
|name|未定义|名称, 可用于第三方实现的定时任务组件的key, 比如xxl-job的任务标识|
|
||||
|cron|未定义|cron表达式,也可以使用常量值: <br>  @yearly、@annually、@monthly、@weekly、<br>  @daily、@midnight、@hourly、@minutely <br>  @1m、@2m、@3m、@5m、@10m、@15m、@30m <br>  @1h、@2h、@3h、@6h <br>  ${env.scheduled.cron}: 读取系统配置项|
|
||||
|zone|未定义|时区,```cron```有值才有效, 例如: "Asia/Shanghai"|
|
||||
|fixedDelay|-1|延迟时间,负数为无效值,支持参数配置、乘法表达式和对象字段值 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.scheduled.fixedDelay}: 读取系统配置项 <br> 值大于0且fixedRate小于0则使用 ScheduledThreadPoolExecutor.scheduleWithFixedDelay |
|
||||
|fixedRate|-1|周期时间,负数为无效值,支持参数配置、乘法表达式和对象字段值 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.scheduled.fixedRate}: 读取系统配置项 <br> 值大于0且fixedRate小于0则使用 ScheduledThreadPoolExecutor.scheduleAtFixedRate |
|
||||
|initialDelay|-1|起始延迟时间,负数为无效值,支持参数配置、乘法表达式和对象字段值 <br> 参数值支持方式:<br>  100: 设置数值 <br>  ${env.scheduled.initialDelay}: 读取系统配置项 <br> 值大于0且fixedRate和fixedDelay小于0则使用 ScheduledThreadPoolExecutor.schedule |
|
||||
|timeUnit|```TimeUnit.SECONDS```|时间单位TimeUnit|
|
||||
|comment|未定义|备注描述|
|
||||
|mode|```LoadMode.LOCAL```|作用于Service模式,默认值为:LOCAL,<br> LOCAL: 表示远程模式的Service对象中的定时任务不起作用|
|
||||
|
||||
## 基本用法
|
||||
  每秒执行
|
||||
```java
|
||||
@Scheduled(cron = "0/1 * * * * ?")
|
||||
public void task1() {
|
||||
System.out.println(Times.nowMillis() + "执行一次");
|
||||
}
|
||||
```
|
||||
|
||||
  <b>数值配置</b>, 系统启动后延迟10分钟后每60分钟执行一次,
|
||||
```java
|
||||
@Scheduled(fixedDelay = "10", fixedRate = "60", timeUnit = TimeUnit.MINUTES)
|
||||
private void task3() {
|
||||
System.out.println(Times.nowMillis() + "执行一次");
|
||||
}
|
||||
```
|
||||
|
||||
  <b>环境配置</b>, 定时间隔时间由环境变量```env.scheduled.fixedRate```配置,没配置采用默认值60秒)
|
||||
```java
|
||||
@Scheduled(fixedRate = "${env.scheduled.fixedRate:60}")
|
||||
public String task2() {
|
||||
System.out.println(Times.nowMillis() + "执行一次");
|
||||
return "";
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 基本配置
|
||||
```xml
|
||||
<!--
|
||||
全局Serivce的定时任务设置,没配置该节点将自动创建一个。
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
-->
|
||||
<scheduled enabled="true"/>
|
||||
```
|
||||
|
||||
|
||||
## 使用Xxl-Job
|
||||
  Scheduled可以采用第三方实现, 官方扩展包```redkale-plugins```提供了xxl-job实现,且不依赖xxl-job包。
|
||||
|
||||
### pom依赖
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.redkalex</groupId>
|
||||
<artifactId>redkale-plugins</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 配置文件
|
||||
```xml
|
||||
<scheduled enabled="true">
|
||||
<xxljob addresses="http://localhost:8080/xxl-job-admin"
|
||||
executorName="redkale-examples"
|
||||
ip="127.0.0.1" <!-- 可选 -->
|
||||
port="5678" <!-- 可选 -->
|
||||
accessToken="default_token" />
|
||||
</scheduled>
|
||||
```
|
||||
|
||||
### 使用方法
|
||||
```java
|
||||
@Scheduled(name = "testTask")
|
||||
public void runTask(ScheduledEvent event) {
|
||||
System.out.println("xxl-job参数param: " + event.getString("param"));
|
||||
System.out.println("xxl-job参数index: " + event.getInteger("index"));
|
||||
System.out.println("xxl-job参数total: " + event.getInteger("total"));
|
||||
}
|
||||
```
|
||||
64
docs/service.md
Normal file
64
docs/service.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Service组件
|
||||
  Service是Redkale最核心的组件,主要处理业务逻辑和操作数据层。Service实例分两种模式: <b>本地模式</b>和<b>远程模式</b>。其模式由```conf/application.xml```文件来配置。开发人员在调用过程中通常不需要区分Service实例是哪种模式。 <br/>
|
||||
  并不是Sevice都能进行本地和远程模式切换, 以下情况的Service不能转成远程模式:
|
||||
     1、类被修饰为```final``` <br>
|
||||
     2、类被标记```@Local``` <br>
|
||||
     3、类被标记```@Component``` <br>
|
||||
|
||||
  Redkale进程启动时扫描可加载的Service实现类,根据配置文件配置的模式采用```ASM```技术动态生成相应的Service临时类进行实例化,并注册到ResourceFactory同其他Service、Servlet依赖注入。
|
||||
|
||||
## Service使用类型
|
||||
|类型|使用注解|场景说明|
|
||||
| --- | --- | --- |
|
||||
|默认加载|```@AutoLoad```或无注解|默认的Service会自动加载并初始化,且会自动生成对应协议层Servlet|
|
||||
|依赖加载|```@AutoLoad(false)```|此类Service只有被其他服务依赖或者显式的配置时才会被初始化,<br> 主要用于工具类功能服务, <br> 比如```DataSource```、```CacheSource```|
|
||||
|本地模式|```@Local```|此类Service无论配不配成远程模式,都不会转成远程模式,<br>主要用于功能依赖本地环境或者参数无法序列化的服务|
|
||||
|组件模式|```@Component```|此类Service不会被动态生成协议层Servlet,<br>主要用于无需提供对进程外提供接口的服务,<br> 比如```DataSource```、```CacheSource```的实现|
|
||||
# 用法
|
||||
```java
|
||||
@RestService(comment = "用户服务模块")
|
||||
public class UserService implements Service {
|
||||
|
||||
@Resource(name = "platf")
|
||||
private DataSource source;
|
||||
|
||||
//请求url: /user/updatePwd?bean={}
|
||||
@RestMapping(auth = true, methods = "POST", comment = "更改密码(只能POST请求)")
|
||||
public RetResult<String> updatePwd(@RestUserid long userid, UserPwdBean bean) {
|
||||
//逻辑处理
|
||||
return RetResult.success();
|
||||
}
|
||||
|
||||
//请求url: /user/updateIntro?intro=xxx
|
||||
@RestMapping(auth = true, comment = "更新用户介绍")
|
||||
public RetResult<String> updateIntro(@RestUserid long userid, String intro) {
|
||||
intro = Utility.orElse(intro, ""); //为null则用""
|
||||
//更新数据库
|
||||
source.updateColumn(UserDetail.class, userid, UserDetail::getIntro, intro);
|
||||
return RetResult.success();
|
||||
}
|
||||
|
||||
//请求url: /user/updateGender?gender=1
|
||||
@RestMapping(auth = true, comment = "修改用户性别(异步方法)")
|
||||
public CompletableFuture<RetResult<String>> updateGender(@RestUserid long userid, short gender) {
|
||||
if (gender != GENDER_MALE && gender != GENDER_FEMALE) {
|
||||
return RetCodes.retResultFuture(RET_USER_GENDER_ILLEGAL);
|
||||
}
|
||||
//更新数据库
|
||||
return source.updateColumnAsync(UserDetail.class, userid, UserDetail::getGender, gender)
|
||||
.thenApply(v -> RetResult.success());
|
||||
}
|
||||
}
|
||||
```
|
||||
  ```@RestUserid int userid```为当前用户Id, 值是在BaseServlet里进行设置,userid可以是String、long、int类型。
|
||||
|
||||
## 远程模式Service
|
||||
  远程Servie其实是提供RPC接口,需要配置文件中显式配置才可使用远程模式。
|
||||
```xml
|
||||
<group name="remote-A" nodes="192.168.10.11:6060,192.168.10.22:7070"/>
|
||||
|
||||
<server protocol="HTTP" host="0.0.0.0" port="8080">
|
||||
<services autoload="true" group="remote-A"/>
|
||||
<service name="" value="org.redkale.demo.user.UserService" group="remote-A"/>
|
||||
</server>
|
||||
```
|
||||
1
docs/sncp.md
Normal file
1
docs/sncp.md
Normal file
@@ -0,0 +1 @@
|
||||
文档完善中……
|
||||
108
docs/sqlsource.md
Normal file
108
docs/sqlsource.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# DataSqlSource数据源
|
||||
  ```DataSqlSource```是```DataSource```的SQL扩展类,增强了对原生SQL的操作。
|
||||
|
||||
## SQL模板
|
||||
  Redkale中的SQL模板与Mybatis里的SQL模板用法类似, 最大区别在于不需要写很多```if/else```判断语句,也不用写xml文件, 框架会根据参数存在与否动态生成sql语句, 查询结果时下划线式sql字段名和驼峰式类字段名会自动匹配。
|
||||
```sql
|
||||
SELECT * FROM user WHERE user_id IN #{bean.userIds} OR user_name = #{bean.userName}
|
||||
```
|
||||
  当bean.userIds=null,bean.userName='hello'时,sql语句转换成:
|
||||
```sql
|
||||
SELECT * FROM user WHERE user_name = 'hello'
|
||||
```
|
||||
  当bean.userIds=[1,2,3],bean.userName=null时,sql语句转换成:
|
||||
```sql
|
||||
SELECT * FROM user WHERE user_id IN (1,2,3)
|
||||
```
|
||||
  IN或者NOT IN语句当参数不为null而是空数组或者空List会进行特殊处理,IN语句会转化成```1=1```, NOT IN语句会转化成```1=2```。 当bean.userIds=空数组,bean.userName='hello'时,sql语句转换成:
|
||||
```sql
|
||||
SELECT * FROM user WHERE 1=2 OR user_name = 'hello'
|
||||
```
|
||||
  参数支持默认值,用逗号隔开,非String参数类型主要指定数据类型,目前支持(int)、(long)、(short)、(float)、(double), 参数不存在会使用默认值aaa:
|
||||
```sql
|
||||
DELETE FROM user WHERE user_name = #{bean.userName,aaa}
|
||||
```
|
||||
  IN参数也支持默认值:
|
||||
```sql
|
||||
DELETE FROM user WHERE type IN #{types,(1, 2, 3)}
|
||||
DELETE FROM user WHERE type IN (1, 2, #{type, (int)3})
|
||||
DELETE FROM user WHERE user_name IN #{name, ('aa','bb','cc')}
|
||||
DELETE FROM user WHERE user_name ('aa', 'bb', #{type,cc})
|
||||
```
|
||||
  有些场景要求参数是必需的,就需要使用##{}来校验参数是否必需。
|
||||
```sql
|
||||
DELETE FROM user WHERE user_name = ##{bean.userName}
|
||||
```
|
||||
  当bean=null或者bean.userName=null时,执行sql会报错 ```Missing parameter bean.userName```
|
||||
|
||||
  Service调用原生SQL模板示例:
|
||||
```java
|
||||
public class ForumInfoService extends AbstractService {
|
||||
|
||||
//查询单个记录的sql
|
||||
private static final String findSql = "SELECT f.forum_groupid, s.forum_section_color "
|
||||
+ "FROM forum_info f, forum_section s "
|
||||
+ " WHERE f.forumid = s.forumid AND "
|
||||
+ "s.forum_sectionid = #{bean.forumSectionid} AND "
|
||||
+ "f.forumid = #{bean.forumid} AND s.forum_section_color = #{bean.forumSectionColor}";
|
||||
|
||||
//查询列表记录的sql
|
||||
private static final String querySql = "SELECT f.forum_groupid, s.forum_section_color "
|
||||
+ "FROM forum_info f, forum_section s "
|
||||
+ " WHERE f.forumid = s.forumid AND "
|
||||
+ "s.forum_sectionid = #{bean.forumSectionid} AND "
|
||||
+ "f.forumid = #{bean.forumid} AND s.forum_section_color = #{bean.forumSectionColor}";
|
||||
|
||||
@Resource
|
||||
private DataSqlSource source;
|
||||
|
||||
public ForumResult findForumResultOne(ForumBean bean) {
|
||||
return source.nativeQueryOne(ForumResult.class, findSql, Map.of("bean", bean));
|
||||
}
|
||||
|
||||
public CompletableFuture<List<ForumResult>> queryForumResultListAsync(ForumBean bean) {
|
||||
return source.nativeQueryListAsync(ForumResult.class, querySql, Map.of("bean", bean));
|
||||
}
|
||||
|
||||
//翻页查询
|
||||
public Sheet<ForumResult> queryForumResult(RowBound bound, ForumBean bean){
|
||||
return source.nativeQuerySheet(ForumResult.class, querySql, round, Map.of("bean", bean));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## DataSqlMapper
|
||||
  DataSqlMapper与MyBatis里的Mapper用法类似,且都支持异步方法。
|
||||
```java
|
||||
public interface ForumInfoMapper extends BaseMapper<ForumInfo> {
|
||||
|
||||
@Sql("SELECT f.forum_groupid, s.forum_section_color "
|
||||
+ "FROM forum_info f, forum_section s "
|
||||
+ "WHERE f.forumid = s.forumid "
|
||||
+ "AND s.forum_sectionid = #{bean.forumSectionid} "
|
||||
+ "AND f.forumid = #{bean.forumid} "
|
||||
+ "AND s.forum_section_color = #{bean.forumSectionColor}")
|
||||
public ForumResult findForumResultOne(ForumBean bean);
|
||||
|
||||
@Sql("SELECT f.forum_groupid, s.forum_section_color "
|
||||
+ "FROM forum_info f, forum_section s "
|
||||
+ "WHERE f.forumid = s.forumid AND "
|
||||
+ "s.forum_sectionid = #{bean.forumSectionid} "
|
||||
+ "AND f.forumid = #{bean.forumid} "
|
||||
+ "AND s.forum_section_color = #{bean.forumSectionColor}")
|
||||
public CompletableFuture<ForumResult> findForumResultOneAsync(ForumBean bean);
|
||||
|
||||
//翻页查询
|
||||
@Sql("SELECT f.forum_groupid, s.forum_section_color "
|
||||
+ "FROM forum_info f, forum_section s "
|
||||
+ " WHERE f.forumid = s.forumid AND "
|
||||
+ "s.forum_sectionid = #{bean.forumSectionid} AND "
|
||||
+ "f.forumid = #{bean.forumid} AND s.forum_section_color = #{bean.forumSectionColor}")
|
||||
public Sheet<ForumResult> queryForumResult(RowBound bound, ForumBean bean);
|
||||
|
||||
@Sql("UPDATE forum_section s "
|
||||
+ " SET s.forum_sectionid = '' "
|
||||
+ " WHERE s.forum_section_color = ##{bean.forumSectionColor}")
|
||||
public int updateForumResult(@Param("bean") ForumBean bean0);
|
||||
}
|
||||
```
|
||||
1
docs/watch.md
Normal file
1
docs/watch.md
Normal file
@@ -0,0 +1 @@
|
||||
文档完善中……
|
||||
1
docs/websocket.md
Normal file
1
docs/websocket.md
Normal file
@@ -0,0 +1 @@
|
||||
文档完善中……
|
||||
@@ -1 +1 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jarĬ<EFBFBD>Ϸ<EFBFBD><EFBFBD>ڴ˴<EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jarĬ<EFBFBD>Ϸ<EFBFBD><EFBFBD>ڴ˴<EFBFBD>
|
||||
18
my/gitrun.sh
Normal file
18
my/gitrun.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LC_ALL="zh_CN.UTF-8"
|
||||
|
||||
rm -fr redkale
|
||||
|
||||
rm -fr src
|
||||
rm -fr bin
|
||||
rm -fr conf
|
||||
|
||||
git clone https://github.com/redkale/redkale.git
|
||||
|
||||
cp -fr redkale/src ./
|
||||
cp -fr redkale/bin ./
|
||||
cp -fr redkale/conf ./
|
||||
|
||||
mvn clean
|
||||
mvn deploy
|
||||
204
my/pom.xml
204
my/pom.xml
@@ -1,94 +1,169 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.redkale</groupId>
|
||||
<artifactId>redkale</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://redkale.org</url>
|
||||
<name>RedkaleProject</name>
|
||||
<url>https://redkale.org</url>
|
||||
<description>redkale -- java framework</description>
|
||||
<version>1.6.2</version>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
|
||||
<junit.version>5.9.0</junit.version>
|
||||
<maven-jar-plugin.version>3.4.0</maven-jar-plugin.version>
|
||||
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
|
||||
<maven-source-plugin.version>3.2.0</maven-source-plugin.version>
|
||||
<maven-assembly-plugin.version>3.7.0</maven-assembly-plugin.version>
|
||||
<nexus-staging-plugin.version>1.7.0</nexus-staging-plugin.version>
|
||||
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
|
||||
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
|
||||
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
|
||||
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
|
||||
<palantir-java-format.version>2.46.0</palantir-java-format.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache 2</name>
|
||||
<url>http://www.apache.org/licenses/</url>
|
||||
<url>https://www.apache.org/licenses/</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License</comments>
|
||||
</license>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>Redkale</id>
|
||||
<name>redkale</name>
|
||||
<email>redkale@qq.com</email>
|
||||
<url>http://redkale.org</url>
|
||||
<url>https://redkale.org</url>
|
||||
<roles>
|
||||
<role>Project Manager</role>
|
||||
<role>Architect</role>
|
||||
</roles>
|
||||
<organization>redkale</organization>
|
||||
<organizationUrl>http://redkale.org</organizationUrl>
|
||||
<organizationUrl>https://redkale.org</organizationUrl>
|
||||
<properties>
|
||||
<dept>No</dept>
|
||||
</properties>
|
||||
<timezone>8</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
<name>Redkale</name>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/redkale/redkale</url>
|
||||
<connection>scm:git:git@github.com/redkale/redkale.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:redkale/redkale.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
<system>GitHub Issues</system>
|
||||
<url>https://github.com/redkale/redkale/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<configuration>
|
||||
<compilerArgument>-parameters</compilerArgument>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<compilerArguments>
|
||||
<verbose />
|
||||
</compilerArguments>
|
||||
</configuration>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- 需要注释掉, 否则会生成native-image配置信息
|
||||
<plugin>
|
||||
<groupId>org.redkale.maven.plugins</groupId>
|
||||
<artifactId>redkale-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>redkale-compile</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
<manifest>
|
||||
<mainClass>org.redkale.boot.Application</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<forkMode>once</forkMode>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>${maven-failsafe-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>${maven-gpg-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
@@ -96,13 +171,17 @@
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<signer>bc</signer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -111,10 +190,11 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -122,16 +202,16 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${maven-assembly-plugin.version}</version>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>assembly.xml</descriptor>
|
||||
<descriptor>my/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
@@ -144,8 +224,56 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>${nexus-staging-plugin.version}</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${spotless-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<lineEndings>UNIX</lineEndings>
|
||||
<formats>
|
||||
<format>
|
||||
<includes>
|
||||
<include>src/**/java/**/*.java</include>
|
||||
</includes>
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
<indent>
|
||||
<spaces>true</spaces>
|
||||
<spacesPerTab>4</spacesPerTab>
|
||||
</indent>
|
||||
</format>
|
||||
</formats>
|
||||
<java>
|
||||
<palantirJavaFormat>
|
||||
<version>${palantir-java-format.version}</version>
|
||||
<style>PALANTIR</style>
|
||||
<formatJavadoc>true</formatJavadoc>
|
||||
</palantirJavaFormat>
|
||||
</java>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<phase>compile</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
<EFBFBD><EFBFBD>Ŀ¼<EFBFBD>µ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sonatypeʱʹ<EFBFBD>ã<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD>Ŀ¼<EFBFBD>µ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sonatypeʱʹ<EFBFBD>ã<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
ʹ<EFBFBD><EFBFBD>gpg<EFBFBD><EFBFBD><EFBFBD><EFBFBD>sonatype<EFBFBD><EFBFBD>Կ:
|
||||
|
||||
1<EFBFBD><EFBFBD> gpg <20>C-gen-key
|
||||
2<EFBFBD><EFBFBD> gpg --keyserver keys.openpgp.org --send-keys <20><><EFBFBD>Ĺ<EFBFBD>Կ(һ<><D2BB>ʮ<EFBFBD><CAAE><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD>DE346FA5)
|
||||
<20><>ʾ<EFBFBD><CABE> gpg: <20>ӹ<EFBFBD>Կ<EFBFBD><D4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>Server indicated a failure <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<!--
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -92,6 +93,7 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
-->
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
196
pom.xml
Normal file
196
pom.xml
Normal file
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.redkale</groupId>
|
||||
<artifactId>redkale</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>RedkaleProject</name>
|
||||
<url>https://redkale.org</url>
|
||||
<description>redkale -- java framework</description>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
|
||||
<junit.version>5.9.0</junit.version>
|
||||
<jmh.version>1.37</jmh.version>
|
||||
<maven-jar-plugin.version>3.4.0</maven-jar-plugin.version>
|
||||
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
|
||||
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
|
||||
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
|
||||
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
|
||||
<palantir-java-format.version>2.46.0</palantir-java-format.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache 2</name>
|
||||
<url>https://www.apache.org/licenses/</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>Redkale</id>
|
||||
<name>redkale</name>
|
||||
<email>redkale@qq.com</email>
|
||||
<url>https://redkale.org</url>
|
||||
<roles>
|
||||
<role>Project Manager</role>
|
||||
<role>Architect</role>
|
||||
</roles>
|
||||
<organization>redkale</organization>
|
||||
<organizationUrl>https://redkale.org</organizationUrl>
|
||||
<properties>
|
||||
<dept>No</dept>
|
||||
</properties>
|
||||
<timezone>8</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/redkale/redkale</url>
|
||||
<connection>scm:git:git@github.com/redkale/redkale.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:redkale/redkale.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- must commented, otherwise native-image information will be generated
|
||||
<plugin>
|
||||
<groupId>org.redkale.maven.plugins</groupId>
|
||||
<artifactId>redkale-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>redkale-compile</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
<manifest>
|
||||
<mainClass>org.redkale.boot.Application</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<forkMode>once</forkMode>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>${maven-failsafe-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${spotless-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<lineEndings>UNIX</lineEndings>
|
||||
<formats>
|
||||
<format>
|
||||
<includes>
|
||||
<include>src/**/java/**/*.java</include>
|
||||
</includes>
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
<indent>
|
||||
<spaces>true</spaces>
|
||||
<spacesPerTab>4</spacesPerTab>
|
||||
</indent>
|
||||
</format>
|
||||
</formats>
|
||||
<java>
|
||||
<palantirJavaFormat>
|
||||
<version>${palantir-java-format.version}</version>
|
||||
<style>PALANTIR</style>
|
||||
<formatJavadoc>true</formatJavadoc>
|
||||
</palantirJavaFormat>
|
||||
</java>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<phase>compile</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,313 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
文件说明:
|
||||
${APP_HOME} 指当前程序的根目录APP_HOME
|
||||
没注明唯一的节点可多个存在
|
||||
required: 被声明required的属性值不能为空
|
||||
|
||||
group
|
||||
/ / \ \
|
||||
/ / \ \
|
||||
/ / \ \
|
||||
node1 node2 node3 node4
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
serviceid1 serviceid2
|
||||
/ \ / \
|
||||
serviceid1_name1 serviceid1_name2 serviceid2_name1 serviceid2_name2
|
||||
-->
|
||||
<!--
|
||||
address: 本地局域网的IP地址, 默认值为默认网卡的ip,当不使用默认值需要指定值,如192.168.1.22
|
||||
port: required 程序的管理Server的端口,用于关闭或者与监管系统进行数据交互
|
||||
lib: 加上额外的lib路径,多个路径用分号;隔开; 默认为空。 例如: ${APP_HOME}/lib/a.jar;${APP_HOME}/lib2/b.jar;
|
||||
-->
|
||||
<application port="6560" lib="">
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
所有服务所需的资源
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
transport节点只能有一个,用于配置所有Transport的池参数,没配置该节点将自动创建一个。
|
||||
threads: 线程总数, 默认: <group>节点数*CPU核数*2
|
||||
bufferCapacity: ByteBuffer的初始化大小, 默认: 32K;
|
||||
bufferPoolSize: ByteBuffer池的大小,默认: 线程总数*4
|
||||
readTimeoutSeconds: TCP读取超时秒数, 默认为6秒, 为0表示无超时限制
|
||||
writeTimeoutSeconds: TCP写入超时秒数, 默认为6秒, 为0表示无超时限制
|
||||
strategy: 远程请求的负载均衡策略, 必须是org.redkale.net.TransportStrategy的实现类
|
||||
-->
|
||||
<transport bufferCapacity="32K" bufferPoolSize="32" threads="32" readTimeoutSeconds="6" writeTimeoutSeconds="6"/>
|
||||
|
||||
<!--
|
||||
一个组包含多个node, 同一Service服务可以由多个进程提供,这些进程称为一个GROUP,且同一GROUP内的进程必须在同一机房或局域网内
|
||||
一个group节点对应一个 Transport 对象。
|
||||
name: 服务组ID,长度不能超过11个字节. 默认为空字符串。 注意: name不能包含$符号。
|
||||
protocol:值范围:UDP TCP, 默认TCP
|
||||
subprotocol: 子协议,预留字段。默认值为空
|
||||
注意: 一个node只能所属一个group。只要存在protocol=SNCP的Server节点信息, 就必须有group节点信息。
|
||||
-->
|
||||
<group name="" protocol="TCP">
|
||||
<!--
|
||||
需要将本地node的addr与port列在此处。
|
||||
同一个<node>节点值只能存在一个<group>节点内,即同一个addr+port只能属于一个group。
|
||||
addr: required IP地址
|
||||
port: required 端口
|
||||
-->
|
||||
<node addr="127.0.0.1" port="7070"/>
|
||||
</group>
|
||||
|
||||
<!--
|
||||
全局的数据源设置, 可以是CacheSource、DataSource, JDBC的DataSource通常通过persistence.xml配置,此处多用于CacheSource的配置
|
||||
name: 资源名,用于依赖注入。
|
||||
value:类名,必须是CacheSource或DataSource的子类,且必须实现Service接口。如果是DataSource.class,系统自动映射成DataJdbcSource.class
|
||||
groups: 指定groups。
|
||||
xxx: 其他属性与子节点通过Service.init方法传入的AnyValue获取。
|
||||
-->
|
||||
<source name="redis" value="org.redkalex.cache.RedisCacheSource" xxx="16">
|
||||
<node addr="127.0.0.1" port="7070"/>
|
||||
</source>
|
||||
|
||||
<!--
|
||||
Application启动的监听事件,可配置多个节点
|
||||
value: 类名,必须是ApplicationListener的子类
|
||||
-->
|
||||
<listener value="org.redkalex.xxx.XXXApplicationListener"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
全局的参数配置, 可以通过@Resource(name="property.xxxxxx") 进行注入<property>的信息, 被注解的字段类型只能是String、primitive class
|
||||
如果name是system.property.开头的值将会在进程启动时进行System.setProperty("yyyy", "YYYYYY")操作。
|
||||
如果name是mimetype.property.开头的值将会在进程启动时进行MimeType.add("yyyy", "YYYYYY")操作。
|
||||
load: 加载文件,多个用;隔开。
|
||||
默认置入的system.property.的有:
|
||||
System.setProperty("net.transport.poolmaxconns", "100");
|
||||
System.setProperty("net.transport.pinginterval", "30");
|
||||
System.setProperty("net.transport.checkinterval", "30");
|
||||
System.setProperty("convert.json.tiny", "true");
|
||||
System.setProperty("convert.bson.tiny", "true");
|
||||
System.setProperty("convert.json.pool.size", "128");
|
||||
System.setProperty("convert.bson.pool.size", "128");
|
||||
System.setProperty("convert.json.writer.buffer.defsize", "4096");
|
||||
System.setProperty("convert.bson.writer.buffer.defsize", "4096");
|
||||
|
||||
<properties>节点下也可包含非<property>节点.
|
||||
非<property>其节点可以通过@Resource(name="properties.xxxxxx")进行注入, 被注解的字段类型只能是AnyValue、AnyValue[]
|
||||
-->
|
||||
<properties load="config.properties">
|
||||
<property name="system.property.yyyy" value="YYYYYY"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</properties>
|
||||
|
||||
</resources>
|
||||
<!--
|
||||
protocol: required server所启动的协议,Redkale内置的有HTTP、SNCP、WATCH。协议均使用TCP实现; WATCH服务只能存在一个。
|
||||
name: 服务的名称,用于监控识别,一个配置文件中的server.name不能重复,命名规则: 字母、数字、下划线
|
||||
host: 服务所占address , 默认: 0.0.0.0
|
||||
port: required 服务所占端口
|
||||
root: 如果是web类型服务,则包含页面 默认:{APP_HOME}/root
|
||||
lib: server额外的class目录, 默认为${APP_HOME}/libs/*;
|
||||
excludelibs: 排除lib.path与excludes中的正则表达式匹配的路径, 多个正则表达式用分号;隔开
|
||||
charset: 文本编码, 默认: UTF-8
|
||||
backlog: 默认10K
|
||||
threads: 线程数, 默认: CPU核数*2,最小8个
|
||||
maxconns:最大连接数, 小于1表示无限制, 默认: 0
|
||||
maxbody: request.body最大值, 默认: 64K
|
||||
bufferCapacity: ByteBuffer的初始化大小, TCP默认: 32K; (HTTP 2.0、WebSocket,必须要16k以上); UDP默认: 1350B
|
||||
bufferPoolSize: ByteBuffer池的大小,默认: 线程数*4
|
||||
responsePoolSize: Response池的大小,默认: 线程数*2
|
||||
aliveTimeoutSeconds: KeepAlive读操作超时秒数, 默认30, 0表示永久不超时; -1表示禁止KeepAlive
|
||||
readTimeoutSeconds: 读操作超时秒数, 默认0, 表示永久不超时
|
||||
writeTimeoutSeconds: 写操作超时秒数, 默认0, 表示永久不超时
|
||||
netimpl: ProtocolServer的实现类。TCP情况下值可以是aio或nio,默认值为aio;UDP情况下值可以是bio,默认值为bio;
|
||||
interceptor: 启动/关闭NodeServer时被调用的拦截器实现类,必须是org.redkale.boot.NodeInterceptor的子类,默认为null
|
||||
-->
|
||||
<server protocol="HTTP" host="127.0.0.1" port="6060" root="root" lib="">
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
value: 创建SSLContext的实现类, 可自定义,必须是org.redkale.net.SSLCreator的子类
|
||||
clientauth: true/false/want
|
||||
keystorepass: KEY密码
|
||||
keystorefile: KEY文件
|
||||
truststorepass: TRUST密码
|
||||
truststorefile: TRUST文件
|
||||
-->
|
||||
<ssl creator=""/>
|
||||
|
||||
<!--
|
||||
加载所有的Service服务;
|
||||
在同一个进程中同一个name同一类型的Service将共用同一个实例
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Service类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
groups: 所属组的节点,多个节点值用;隔开,如果配置文件中存在多个SNCP协议的Server节点,需要显式指定group属性.
|
||||
当 protocol == SNCP 时 group表示当前Server与哪些节点组关联。
|
||||
当 protocol != SNCP 时 group只能是空或者一个group的节点值,不能为多个节点值。
|
||||
-->
|
||||
<services autoload="true" includes="" excludes="">
|
||||
|
||||
<!-- 显著加载指定的Service的接口类 -->
|
||||
<service value="com.xxx.XXX1Service"/>
|
||||
<!--
|
||||
name: 显式指定name,覆盖默认的空字符串值。 注意: name不能包含$符号。
|
||||
groups: 显式指定groups,覆盖<services>节点的groups默认值。
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<service value="com.xxx.XXX2Service" name="" groups="xxx;yyy"/>
|
||||
<!-- 给Service增加配置属性 -->
|
||||
<service value="com.xxx.XXX1Service">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<!--
|
||||
加载所有的Filter服务;
|
||||
autoload="true" 默认值.
|
||||
autoload="false" 需要显著的指定Filter类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<filters autoload="true" includes="" excludes="">
|
||||
|
||||
<!--
|
||||
显著加载指定的Filter类
|
||||
value=: Filter类名。必须与Server的协议层相同,HTTP必须是HttpFilter
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<!-- 显著加载指定的Filter类 -->
|
||||
<filter value="com.xxx.XXX1Filter"/>
|
||||
|
||||
<!-- 给Filter增加配置属性 -->
|
||||
<filter value="com.xxx.XXX12Filter">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</filter>
|
||||
</filters>
|
||||
|
||||
<!--
|
||||
REST的核心配置项
|
||||
当Server为HTTP协议时, rest节点才有效。存在[rest]节点则Server启动时会加载REST服务, 节点可以多个,(WATCH协议不需要设置,系统会自动生成)
|
||||
path: servlet的ContextPath前缀 默认为空
|
||||
base: REST服务的BaseServlet,必须是 org.redkale.net.http.HttpServlet 的子类,且子类必须标记@HttpUserType。
|
||||
autoload:默认值"true" 默认值. 加载当前server所能使用的Servce对象;
|
||||
includes:当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes:当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<rest path="/pipes" base="org.redkale.net.http.HttpServlet" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
value: Service类名,列出的表示必须被加载的Service对象
|
||||
ignore: 是否忽略,设置为true则不会加载该Service对象,默认值为false
|
||||
-->
|
||||
<service value="com.xxx.XXXXService"/>
|
||||
<!--
|
||||
value: WebSocket类名,列出的表示必须被加载且标记为@RestWebSocket的WebSocket对象
|
||||
ignore: 是否忽略,设置为true则不会加载该RestWebSocket对象,默认值为false
|
||||
-->
|
||||
<websocket value="com.xxx.XXXXRestWebSocket"/>
|
||||
</rest>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, request节点才有效。
|
||||
remoteaddr 节点: 替换请求方节点的IP地址, 通常请求方是由nginx等web静态服务器转发过的则需要配置该节点。
|
||||
且value值只能是以request.headers.开头,表示从request.headers中获取对应的header值。
|
||||
例如下面例子获取request.getRemoteAddr()值,如果header存在X-RemoteAddress值则返回X-RemoteAddress值,不存在返回getRemoteAddress()。
|
||||
-->
|
||||
<request>
|
||||
<remoteaddr value="request.headers.X-RemoteAddress"/>
|
||||
</request>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, response节点才有效。
|
||||
contenttype: plain值为调用finish时的ContentType; 默认值: text/plain; charset=utf-8
|
||||
json值为调用finishJson时的ContentType; 默认值: application/json; charset=utf-8
|
||||
defcookie 节点: 当response里输出的cookie没有指定domain 和path时,使用该节点的默认值。
|
||||
如果addheader、setheader 的value值以request.parameters.开头则表示从request.parameters中获取对应的parameter值
|
||||
如果addheader、setheader 的value值以request.headers.开头则表示从request.headers中获取对应的header值
|
||||
例如下面例子是在Response输出header时添加两个header(一个addHeader, 一个setHeader)。
|
||||
options 节点: 设置了该节点且auto=true,当request的method=OPTIONS自动设置addheader、setheader并返回200状态码
|
||||
date 节点: 设置了该节点且period有值(单位:毫秒);返回response会包含Date头信息,默认为period=0
|
||||
period=0表示实时获取当前时间;
|
||||
period<0表示不设置date;
|
||||
period>0表示定时获取时间; 设置1000表示每秒刷新Date时间
|
||||
-->
|
||||
<response>
|
||||
<contenttype plain="text/plain; charset=utf-8" json="application/json; charset=utf-8"/>
|
||||
<defcookie domain="" path=""/>
|
||||
<addheader name="Access-Control-Allow-Origin" value="request.headers.Origin" />
|
||||
<setheader name="Access-Control-Allow-Headers" value="request.headers.Access-Control-Request-Headers"/>
|
||||
<setheader name="Access-Control-Allow-Credentials" value="true"/>
|
||||
<options auto="true" />
|
||||
<date period="0" />
|
||||
</response>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,render才有效. 指定输出引擎的实现类
|
||||
value: 输出引擎的实现类, 必须是org.redkale.net.http.HttpRender的子类
|
||||
-->
|
||||
<render value="org.redkalex.htel.HttpTemplateRender"/>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,ResourceServlet才有效. 默认存在一个有默认属性的resource-servlet节点
|
||||
webroot: web资源的根目录, 默认取server节点中的root值
|
||||
servlet: 静态资源HttpServlet的实现,默认使用HttpResourceServlet
|
||||
index : 启始页,默认值:index.html
|
||||
-->
|
||||
<resource-servlet webroot="root" index="index.html">
|
||||
<!--
|
||||
【节点在<resource-servlet>中唯一】
|
||||
资源缓存的配置, 默认存在一个含默认属性的caches节点
|
||||
limit: 资源缓存最大容量, 默认: 0, 为0表示不缓存, 单位可以是B、K、M、G,不区分大小写
|
||||
lengthmax: 可缓存的文件大小上限, 默认: 1M(超过1M的文件不会被缓存)
|
||||
watch: 是否监控缓存文件的变化, 默认为false,不监控
|
||||
-->
|
||||
<cache limit="0M" lengthmax="1M" watch="false"/>
|
||||
<!--
|
||||
支持类似nginx中的rewrite, 目前只支持静态资源对静态资源的跳转。
|
||||
type: 匹配的类型, 目前只支持location(匹配requestURI), 默认: location
|
||||
match: 匹配的正则表达式
|
||||
forward: 需跳转后的资源链接
|
||||
例如下面例子是将/xxx-yyy.html的页面全部跳转到/xxx.html
|
||||
-->
|
||||
<rewrite type="location" match="^/([^-]+)-[^-\.]+\.html(.*)" forward="/$1.html"/>
|
||||
</resource-servlet>
|
||||
<!--
|
||||
加载所有的Servlet服务;
|
||||
path: servlet的ContextPath前缀 默认为空
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Servlet类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<servlets path="/pipes" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
显著加载指定的Servlet类
|
||||
value=: Servlet类名。必须与Server的协议层相同,HTTP必须是HttpServlet
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<servlet value="com.xxx.XXX1Servlet" />
|
||||
<servlet value="com.xxx.XXX2Servlet" />
|
||||
<servlet value="com.xxx.XXX3Servlet" >
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="yyyyyy" value="YYYYYYYY"/>
|
||||
</servlet>
|
||||
</servlets>
|
||||
</server>
|
||||
|
||||
<server protocol="SNCP" host="127.0.0.1" port="7070" root="root" lib="">
|
||||
<!-- 参数完全同上 -->
|
||||
<services autoload="true" includes="" excludes="" />
|
||||
</server>
|
||||
</application>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- 其配置算是标准的JPA配置文件的缩略版 -->
|
||||
<persistence>
|
||||
<!-- 系统基本库 -->
|
||||
<persistence-unit name="demouser">
|
||||
<properties>
|
||||
<!--
|
||||
DataSource的实现类,没有设置默认为org.redkale.source.DataJdbcSource的实现,使用常规基于JDBC的数据库驱动一般无需设置
|
||||
-->
|
||||
<property name="javax.persistence.datasource" value="org.redkale.source.DataJdbcSource"/>
|
||||
<!--
|
||||
是否开启缓存(标记为@Cacheable的Entity类),值目前只支持两种: ALL: 所有开启缓存。 NONE: 关闭所有缓存, 非NONE字样统一视为ALL
|
||||
-->
|
||||
<property name="javax.persistence.cachemode" value="ALL"/>
|
||||
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://127.0.0.1:3306/dbuser?characterEncoding=utf8"/>
|
||||
<!--
|
||||
javax.persistence.jdbc.driver在JPA的值是JDBC驱动,Redkale有所不同,值应该是javax.sql.DataSource的子类。
|
||||
为了兼容用户习惯,Redkale内置常见JDBC驱动到javax.sql.DataSource的映射关系:
|
||||
org.mariadb.jdbc.Driver —————— org.mariadb.jdbc.MySQLDataSource
|
||||
org.postgresql.Driver —————— org.postgresql.ds.PGConnectionPoolDataSource
|
||||
com.mysql.jdbc.Driver —————— com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
|
||||
com.mysql.cj.jdbc.Driver —————— com.mysql.cj.jdbc.MysqlConnectionPoolDataSource
|
||||
oracle.jdbc.driver.OracleDriver —————— oracle.jdbc.pool.OracleConnectionPoolDataSource
|
||||
com.microsoft.sqlserver.jdbc.SQLServerDriver —————— com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
|
||||
org.h2.Driver —————— org.h2.jdbcx.JdbcDataSource
|
||||
因此 com.mysql.jdbc.Driver 会被自动转换成 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
|
||||
并且如果JDBC驱动是以上几个版本,javax.persistence.jdbc.driver属性都可以省略,Redkale会根据javax.persistence.jdbc.url的值来识别驱动
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.source" value="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"/>
|
||||
-->
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="123456"/>
|
||||
|
||||
<!-- 最大连接数,默认值:CPU数*16 -->
|
||||
<property name="javax.persistence.connections.limit" value="32"/>
|
||||
|
||||
<!-- 包含的SQL模板,相当于反向LIKE,不同的JDBC驱动的SQL语句不一样,Redkale内置了MySQL的语句 -->
|
||||
<property name="javax.persistence.contain.sqltemplate" value="LOCATE(${keystr}, ${column}) > 0"/>
|
||||
<property name="javax.persistence.notcontain.sqltemplate" value="LOCATE(${keystr}, ${column}) = 0"/>
|
||||
|
||||
<!-- 复制表结构的SQL模板,Redkale内置了MySQL的语句 -->
|
||||
<property name="javax.persistence.tablenotexist.sqlstates" value="42000;42S02"/>
|
||||
<property name="javax.persistence.tablecopy.sqltemplate" value="CREATE TABLE ${newtable} LIKE ${oldtable}"/>
|
||||
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
<!-- IM消息库 -->
|
||||
<persistence-unit name="demoim">
|
||||
<properties>
|
||||
<!-- jdbc:mysql://127.0.0.1:3306/dbim?autoReconnect=true&autoReconnectForPools=true&characterEncoding=utf8 -->
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://127.0.0.1:3306/dbim?characterEncoding=utf8"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="123456"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
</persistence>
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Resource {
|
||||
public enum AuthenticationType {
|
||||
CONTAINER,
|
||||
APPLICATION
|
||||
}
|
||||
public String name() default "";
|
||||
|
||||
public Class<?> type() default Object.class;
|
||||
public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
|
||||
public boolean shareable() default true;
|
||||
public String description() default "";
|
||||
public String mappedName() default "";
|
||||
|
||||
public String lookup() default "";
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/** *****************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
***************************************************************************** */
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Specifies whether an entity should be cached if caching is enabled
|
||||
* when the value of the <code>persistence.xml</code> caching element
|
||||
* is <code>ENABLE_SELECTIVE</code> or <code>DISABLE_SELECTIVE</code>.
|
||||
* The value of the <code>Cacheable</code> annotation is inherited by
|
||||
* subclasses; it can be overridden by specifying
|
||||
* <code>Cacheable</code> on a subclass.
|
||||
*
|
||||
* <p>
|
||||
* <code>Cacheable(false)</code> means that the entity and its state must
|
||||
* not be cached by the provider.
|
||||
*
|
||||
* @since Java Persistence 2.0
|
||||
*/
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Cacheable {
|
||||
|
||||
/**
|
||||
* (Optional) Whether or not the entity should be cached.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean value() default true;
|
||||
|
||||
/**
|
||||
* (Optional) 定时自动更新缓存的周期秒数,为0表示不做定时更新, 大于0表示每经过interval秒后会自动从数据库中拉取数据更新Cache
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int interval() default 0;
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
/** *****************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
***************************************************************************** */
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies the mapped column for a persistent property or field.
|
||||
* If no <code>Column</code> annotation is specified, the default values apply.
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* Example 1:
|
||||
*
|
||||
* @Column(name="DESC", nullable=false, length=512)
|
||||
* public String getDescription() { return description; }
|
||||
*
|
||||
* Example 2:
|
||||
*
|
||||
* @Column(name="DESC",
|
||||
* columnDefinition="CLOB NOT NULL",
|
||||
* table="EMP_DETAIL")
|
||||
* @Lob
|
||||
* public String getDescription() { return description; }
|
||||
*
|
||||
* Example 3:
|
||||
*
|
||||
* @Column(name="ORDER_COST", updatable=false, precision=12, scale=2)
|
||||
* public BigDecimal getCost() { return cost; }
|
||||
*
|
||||
* </pre></blockquote>
|
||||
*
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Column {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the column. Defaults to
|
||||
* the property or field name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The comment of the column.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is a unique key. This is a
|
||||
* shortcut for the <code>UniqueConstraint</code> annotation at the table
|
||||
* level and is useful for when the unique key constraint
|
||||
* corresponds to only a single column. This constraint applies
|
||||
* in addition to any constraint entailed by primary key mapping and
|
||||
* to constraints specified at the table level.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean unique() default false;
|
||||
|
||||
/**
|
||||
* (Optional) Whether the database column is nullable.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean nullable() default true;
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is included in SQL INSERT
|
||||
* statements generated by the persistence provider.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean insertable() default true;
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is included in SQL UPDATE
|
||||
* statements generated by the persistence provider.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean updatable() default true;
|
||||
|
||||
/**
|
||||
* (Optional) The name of the table that contains the column.
|
||||
* If absent the column is assumed to be in the primary table.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String table() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The column length. (Applies only if a
|
||||
* string-valued column is used.)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int length() default 255;
|
||||
|
||||
/**
|
||||
* (Optional) The precision for a decimal (exact numeric)
|
||||
* column. (Applies only if a decimal column is used.)
|
||||
* Value must be set by developer if used when generating
|
||||
* the DDL for the column.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int precision() default 0;
|
||||
|
||||
/**
|
||||
* (Optional) The scale for a decimal (exact numeric) column.
|
||||
* (Applies only if a decimal column is used.)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int scale() default 0;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
******************************************************************************/
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Documented;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies that the class is an entity. This annotation is applied to the
|
||||
* entity class.
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Documented
|
||||
@Target(TYPE)
|
||||
@Retention(RUNTIME)
|
||||
public @interface Entity {
|
||||
|
||||
/**
|
||||
* (Optional) The entity name. Defaults to the unqualified
|
||||
* name of the entity class. This name is used to refer to the
|
||||
* entity in queries. The name must not be a reserved literal
|
||||
* in the Java Persistence query language.
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The comment of the entity.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
******************************************************************************/
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies the primary key of an entity.
|
||||
* The field or property to which the <code>Id</code> annotation is applied
|
||||
* should be one of the following types: any Java primitive type;
|
||||
* any primitive wrapper type;
|
||||
* <code>String</code>;
|
||||
* <code>java.util.Date</code>;
|
||||
* <code>java.sql.Date</code>;
|
||||
* <code>java.math.BigDecimal</code>;
|
||||
* <code>java.math.BigInteger</code>.
|
||||
*
|
||||
* <p>The mapped column for the primary key of the entity is assumed
|
||||
* to be the primary key of the primary table. If no <code>Column</code> annotation
|
||||
* is specified, the primary key column name is assumed to be the name
|
||||
* of the primary key property or field.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Id
|
||||
* public Long getId() { return id; }
|
||||
* </pre>
|
||||
*
|
||||
* @see Column
|
||||
* see GeneratedValue
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
|
||||
public @interface Id {}
|
||||
@@ -1,69 +0,0 @@
|
||||
/** *****************************************************************************
|
||||
* Copyright (c) 2011 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
*
|
||||
***************************************************************************** */
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Used in schema generation to specify creation of an index.
|
||||
* <p>
|
||||
* Note that it is not necessary to specify an index for a primary key,
|
||||
* as the primary key index will be created automatically.
|
||||
*
|
||||
* <p>
|
||||
* The syntax of the <code>columnList</code> element is a
|
||||
* <code>column_list</code>, as follows:
|
||||
*
|
||||
* <pre>
|
||||
* column::= index_column [,index_column]*
|
||||
* index_column::= column_name [ASC | DESC]
|
||||
* </pre>
|
||||
*
|
||||
* <p>
|
||||
* If <code>ASC</code> or <code>DESC</code> is not specified,
|
||||
* <code>ASC</code> (ascending order) is assumed.
|
||||
*
|
||||
* @since Java Persistence 2.1
|
||||
*
|
||||
*/
|
||||
@Target({})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Index {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the index; defaults to a provider-generated name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Required) The names of the columns to be included in the index,
|
||||
* in order.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String columnList();
|
||||
|
||||
/**
|
||||
* (Optional) Whether the index is unique.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean unique() default false;
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
/** *****************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
***************************************************************************** */
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies the primary table for the annotated entity. Additional
|
||||
* tables may be specified using SecondaryTable or SecondaryTables annotation.
|
||||
*
|
||||
* <p>
|
||||
* If no <code>Table</code> annotation is specified for an entity
|
||||
* class, the default values apply.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Entity
|
||||
* @Table(name="CUST", schema="RECORDS")
|
||||
* public class Customer { ... }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Target(TYPE)
|
||||
@Retention(RUNTIME)
|
||||
public @interface Table {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the table.
|
||||
* <p>
|
||||
* Defaults to the entity name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/** (Optional) The catalog of the table.
|
||||
* <p>
|
||||
* Defaults to the default catalog.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String catalog() default "";
|
||||
|
||||
/**
|
||||
* (Optional) Unique constraints that are to be placed on
|
||||
* the table. These are only used if table generation is in
|
||||
* effect. These constraints apply in addition to any constraints
|
||||
* specified by the <code>Column</code> and <code>JoinColumn</code>
|
||||
* annotations and constraints entailed by primary key mappings.
|
||||
* <p>
|
||||
* Defaults to no additional constraints.
|
||||
* @return UniqueConstraint[]
|
||||
*/
|
||||
UniqueConstraint[] uniqueConstraints() default {};
|
||||
|
||||
/**
|
||||
* (Optional) Indexes for the table. These are only used if
|
||||
* table generation is in effect. Note that it is not necessary
|
||||
* to specify an index for a primary key, as the primary key
|
||||
* index will be created automatically.
|
||||
*
|
||||
* @return indexes
|
||||
* @since Java Persistence 2.1
|
||||
*/
|
||||
Index[] indexes() default {};
|
||||
|
||||
String comment() default "";
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
******************************************************************************/
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies that the property or field is not persistent. It is used
|
||||
* to annotate a property or field of an entity class, mapped
|
||||
* superclass, or embeddable class.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Entity
|
||||
* public class Employee {
|
||||
* @Id int id;
|
||||
* @Transient User currentUser;
|
||||
* ...
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
|
||||
public @interface Transient {}
|
||||
@@ -1,56 +0,0 @@
|
||||
/** *****************************************************************************
|
||||
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
|
||||
* which accompanies this distribution.
|
||||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
* and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* Contributors:
|
||||
* Linda DeMichiel - Java Persistence 2.1
|
||||
* Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
***************************************************************************** */
|
||||
package javax.persistence;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies that a unique constraint is to be included in
|
||||
* the generated DDL for a primary or secondary table.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
* @Entity
|
||||
* @Table(
|
||||
* name="EMPLOYEE",
|
||||
* uniqueConstraints=
|
||||
* @UniqueConstraint(columnNames={"EMP_ID", "EMP_NAME"})
|
||||
* )
|
||||
* public class Employee { ... }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
*/
|
||||
@Target({})
|
||||
@Retention(RUNTIME)
|
||||
public @interface UniqueConstraint {
|
||||
|
||||
/** (Optional) Constraint name. A provider-chosen name will be chosen
|
||||
* if a name is not specified.
|
||||
*
|
||||
* @return String
|
||||
* @since Java Persistence 2.0
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/** (Required) An array of the column names that make up the constraint.
|
||||
*
|
||||
* @return String[]
|
||||
*/
|
||||
String[] columnNames();
|
||||
}
|
||||
110
src/main/java/META-INF/apidoc-template.html
Normal file
110
src/main/java/META-INF/apidoc-template.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"><title>接口文档(apidoc生成)</title>
|
||||
<style type="text/css">
|
||||
body {text-align: center;margin:auto;}
|
||||
a{text-decoration: none;}
|
||||
.table {margin: auto;border-collapse: collapse;border-spacing: 0;display: block;width: 100%;overflow: auto;word-break: normal;word-break: keep-all;}
|
||||
.table td,.table th{padding: 0.2rem 0.8rem 0.2rem 0.8rem;border: 1px solid #aaa;}
|
||||
.table td {text-align: left;}
|
||||
.s {font-size: 0.8rem; vertical-align: middle;}
|
||||
.subtable {border-spacing: 0;border: 0;margin:0;}
|
||||
.subtable td{border: 0;padding: 0 0 0 10px;}
|
||||
.typetable {border-spacing: 0;border: 0;margin:0;}
|
||||
.typetable td{border: 0;padding: 2px 20px 2px 10px;}
|
||||
.typetable .l{border-bottom: 1px solid red;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
var createhtml = function (jsoncontent) {
|
||||
var classmap = jsoncontent.types;
|
||||
var html = [];
|
||||
html.push('<div style="width:' + Math.floor(window.screen.width * 0.9) + 'px;margin:0 auto;text-align: center;">');
|
||||
html.push('<br/><br/><table class="table" align="center">');
|
||||
for (var i = 0; i < jsoncontent.servers.length; i++) {
|
||||
var servlets = jsoncontent.servers[i].servlets;
|
||||
if (servlets.length && (servlets[0].comment || "").indexOf("【") === 0) {
|
||||
servlets.sort(function (a, b) {
|
||||
return a.comment > b.comment ? -1 : (a.comment == b.comment ? 0 : 1);
|
||||
});
|
||||
}
|
||||
for (var j = 0; j < servlets.length; j++) {
|
||||
var servlet = servlets[j];
|
||||
if (html.length > 2) html.push(' <tr><th colspan="5" style="border-bottom:0;"> </th></tr>');
|
||||
html.push(' <tr><th colspan="5" style="border-top:' + ((html.length > 2) ? 0 : 1) + ';">' + (servlet.comment || '未知模块') + '</th></tr>');
|
||||
html.push(' <tr><th>请求URL</th><th>描 述</th><th>鉴 权</th><th>参 数 <span style="font-size:12px;">(粗体: 必填项; 红色: Header; 蓝色: Cookie)</span></th><th>输 出</th></tr>');
|
||||
for (var k = 0; k < servlet.mappings.length; k++) {
|
||||
var action = servlet.mappings[k];
|
||||
html.push(' <tr>');
|
||||
html.push('<td style="color:#ff00ff;">' + action.url + '</td>');
|
||||
html.push('<td>' + action.comment + '</td>');
|
||||
html.push('<td class="s" style="width:80px;">模块ID: ' + servlet.moduleid + '<br/>操作ID: ' + action.actionid + '<br/>需鉴权: ' + (action.auth ? '<font style="font-weight:bold;color:green;">true</font>' : '<font color=red>false</font>') + '</td>');
|
||||
var paramshtml = [];
|
||||
paramshtml.push('<table class="subtable">');
|
||||
for (var p = 0; p < action.params.length; p++) {
|
||||
var param = action.params[p];
|
||||
var t = param.type.substring(param.type.lastIndexOf('.') + 1);
|
||||
if (classmap[param.type.replace('[]', '')]) {
|
||||
t = '<a href="#' + param.type.replace('[]', '') + '">' + t + '</a>';
|
||||
}
|
||||
if (param.name == '&') {
|
||||
paramshtml.push('<tr><td style="font-size:12px;">内置 </td><td> ' + t + '</td><td> 当前用户</td></tr>');
|
||||
} else {
|
||||
var w = param.required ? "font-weight:bold;" : "";
|
||||
var c = ' style="' + w + '"';
|
||||
if (param.style == "HEADER") c = ' style="color:red;' + w + '"';
|
||||
if (param.style == "COOKIE") c = ' style="color:blue;' + w + '"';
|
||||
paramshtml.push('<tr><td ' + c + '> ' + param.name + ' </td><td> ' + t + '</td><td> ' + param.comment + '</td></tr>');
|
||||
}
|
||||
}
|
||||
paramshtml.push('</table>');
|
||||
html.push('<td class="s" style="padding:0 5px;">' + paramshtml.join('') + '</td>');
|
||||
var rs = [];
|
||||
rs.push(action.result.replace(/</g, "<").replace(/>/g, ">").replace(/([a-zA-Z0-9_\$]+\.)+/g, ""));
|
||||
var results = action.results || [];
|
||||
for (var r = 0; r < results.length; r++) {
|
||||
rs.push('<a href="#' + results[r].replace('[]', '') + '">' + results[r].replace(/([a-zA-Z0-9_\$]+\.)+/g, "") + '</a>');
|
||||
}
|
||||
html.push('<td>' + rs.join("<br/>") + '</td>');
|
||||
html.push('</tr>');
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var type in classmap) {
|
||||
html.push(' <tr><th colspan="5" style="border-bottom:0;"> </th></tr>');
|
||||
html.push(' <tr id="' + type + '"><th colspan="5" style="border-top:0;">' + type + '</th></tr>');
|
||||
html.push(' <tr><td colspan="5"><table class="typetable">');
|
||||
for (var fieldname in classmap[type]) {
|
||||
var field = classmap[type][fieldname];
|
||||
var t = field.type.replace(/</g, "<").replace(/>/g, ">").replace(/\$/g, ".").replace(/([a-zA-Z0-9_\$]+\.)+/g, "");
|
||||
if (t == 'boolean' || t == 'short' || t == 'int' || t == 'long' || t == 'float' || t == 'double'
|
||||
|| t == 'boolean[]' || t == 'short[]' || t == 'int[]' || t == 'long[]' || t == 'float[]' || t == 'double[]') {
|
||||
t = '<font color=blue>' + t + '</font>';
|
||||
} else if (t == 'String' || t == 'String[]' || t == 'LongRange' || t.indexOf('Map<') === 0) {
|
||||
t = '<font color=red>' + t + '</font>';
|
||||
}
|
||||
var c = (field.comment || '');
|
||||
if (field.primary) {
|
||||
c = '【主键】 ' + c;
|
||||
} else if (!field.updatable) {
|
||||
c = '【只读】 ' + c;
|
||||
}
|
||||
html.push(' <tr class="l"><td>' + fieldname + '</td><td>' + t + '</td><td colspan="2">' + c + '</td></tr>');
|
||||
}
|
||||
html.push(' </table></td></tr>');
|
||||
}
|
||||
html.push('</table><br/><br/><br/>');
|
||||
html.push('</div>');
|
||||
return html.join('');
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var jsoncontent = '#{content}'; //这里必须要用单引号引起来
|
||||
document.write(createhtml(jsoncontent));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
43
src/main/java/META-INF/application-template.properties
Normal file
43
src/main/java/META-INF/application-template.properties
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
redkale.nodeid = 1000
|
||||
redkale.port = 6560
|
||||
redkale.lib = ./
|
||||
|
||||
#\u3010executor\u8282\u70b9\u5168\u5c40\u552f\u4e00\u3011
|
||||
redkale.executor.threads = 4
|
||||
redkale.executor.hash = false
|
||||
|
||||
#\u3010cluster\u8282\u70b9\u5168\u5c40\u552f\u4e00\u3011
|
||||
redkale.cluster.type = org.redkalex.cluster.consul.ConsulClusterAgent
|
||||
redkale.cluster.waits= = false
|
||||
redkale.cluster.protocols = SNCP
|
||||
redkale.cluster.ports = 7070;7071
|
||||
|
||||
redkale.mq[0].name =
|
||||
redkale.mq[0].type = org.redkalex.mq.kafka.KafkaMessageAgent
|
||||
redkale.mq[0].servers.value = 127.0.0.1:9101
|
||||
|
||||
redkale.group[0].name =
|
||||
redkale.group[0].protocol = TCP
|
||||
redkale.group[0].node[0].addr = 127.0.0.1
|
||||
redkale.group[0].node[0].port = 7070
|
||||
|
||||
redkale.listener[0].value = org.redkalex.xxx.XXXApplicationListener
|
||||
|
||||
#\u3010properties\u8282\u70b9\u5168\u5c40\u552f\u4e00\u3011
|
||||
redkale.properties.load = config.properties
|
||||
redkale.properties.property[0].name = system.property.yyyy
|
||||
redkale.properties.property[0].value = YYYYYY
|
||||
redkale.properties.property[1].name = xxxxxxx
|
||||
redkale.properties.property[1].value = YYYYYY
|
||||
|
||||
redkale.server[0].protocol = HTTP
|
||||
redkale.server[0].host = 127.0.0.1
|
||||
redkale.server[0].port = 6060
|
||||
redkale.server[0].root = root
|
||||
redkale.server[0].lib =
|
||||
|
||||
#\u3010ssl\u8282\u70b9\u5728<server>\u4e2d\u552f\u4e00\u3011
|
||||
redkale.server[0].ssl.build = org.redkale.net.SSLBuilder\u5b50\u7c7b
|
||||
|
||||
redkale.server[0].services[0].autoload = true
|
||||
369
src/main/java/META-INF/application-template.xml
Normal file
369
src/main/java/META-INF/application-template.xml
Normal file
@@ -0,0 +1,369 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
文件说明:
|
||||
${APP_HOME} 指当前程序的根目录APP_HOME
|
||||
没注明唯一的节点可多个存在
|
||||
required: 被声明required的属性值不能为空
|
||||
|
||||
group
|
||||
/ / \ \
|
||||
/ / \ \
|
||||
/ / \ \
|
||||
node1 node2 node3 node4
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
/ \
|
||||
serviceid1 serviceid2
|
||||
/ \ / \
|
||||
serviceid1_name1 serviceid1_name2 serviceid2_name1 serviceid2_name2
|
||||
-->
|
||||
<!--
|
||||
nodeid: int 进程的节点ID,用于分布式环境,一个系统中节点ID必须全局唯一,使用cluster时框架会进行唯一性校验
|
||||
name: 进程的名称,用于监控识别,命名规则: 字母、数字、下划线、短横、点
|
||||
address: 本地局域网的IP地址, 默认值为默认网卡的ip,当不使用默认值需要指定值,如192.168.1.22
|
||||
port: required 程序的管理Server的端口,用于关闭或者与监管系统进行数据交互
|
||||
lib: 加上额外的lib路径,多个路径用分号;隔开; 默认为空。 例如: ${APP_HOME}/lib/a.jar;${APP_HOME}/lib2/b.jar;
|
||||
-->
|
||||
<application nodeid="1000" port="6560" lib="">
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.3.0
|
||||
全局Serivce执行的线程池, Application.workExecutor, 没配置该节点将自动创建一个。
|
||||
threads: 线程数,默认值: CPU核数*10, 核数=2的情况下默认值为20。值为0表示不启用workExecutor,都在IO线程中运行。
|
||||
clients: client回调函数运行的线程池大小, 默认值: CPU核数*4
|
||||
-->
|
||||
<executor threads="4"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.8.0
|
||||
全局Serivce的定时任务设置,没配置该节点将自动创建一个。
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
-->
|
||||
<scheduled enabled="true"/>
|
||||
|
||||
<!--
|
||||
@since 2.8.0
|
||||
全局Serivce的缓存设置,没配置该节点将自动创建一个。
|
||||
name: 缓存管理器的名称, 默认: ""
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
remote: 远程CacheSource的资源名
|
||||
broadcastable: 存在远程CacheSource时修改数据是否进行广播到其他集群服务中。默认: true
|
||||
-->
|
||||
<cached name="" enabled="true" remote="xxx" broadcastable="true"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
第三方服务发现管理接口
|
||||
type: 类名,必须是org.redkale.cluster.ClusterAgent的子类
|
||||
waits: 注销服务后是否需要等待检查周期时间后再进行Service销毁,默认值为:false
|
||||
当一个Service进行服务注销后,不能立刻销毁Service,因为健康检测是有间隔时间差的,
|
||||
需要等待一个健康检测周期时间,让其他进程都更新完服务列表。
|
||||
如果使用MQ,可以设置为false,如果对服务健壮性要求高,建议设置为true
|
||||
protocols: 服务发现可以处理的协议, 默认值为: SNCP, 多个协议用分号;隔开
|
||||
ports: 服务发现可以处理的端口, 多个端口用分号;隔开
|
||||
ttls: 心跳频率,多少秒一次
|
||||
xxxx: 自定义的字段属性,例如:CacheClusterAgent有source字段; ConsulClusterAgent有apiurl字段;
|
||||
-->
|
||||
<cluster type="org.redkalex.cluster.consul.ConsulClusterAgent" waits="false" protocols="SNCP" ports="7070;7071" xxx="xxx" />
|
||||
|
||||
<!--
|
||||
MQ管理接口配置
|
||||
不同MQ节点所配置的MQ集群不能重复。
|
||||
MQ跟着协议走,所以mq的属性值需要被赋值在rest节点上, 由于SncpServlet是自动生成的,故SNCP协议下,mq属性值被赋值在service/services节点上
|
||||
name: 服务的名称,用于监控识别,多个mq节点时只能有一个name为空的节点,mq.name不能重复,命名规则: 字母、数字、下划线
|
||||
type: 实现类名,必须是org.redkale.mq.MessageAgent的子类
|
||||
threads:线程数,为0表示使用workExecutor。默认: CPU核数, 核数=1的情况下默认值为2,JDK 21以上版本默认使用虚拟线程池
|
||||
rpc:cluster和mq同名组件时,HttpRpcClient优先使用MQ,默认不优先走MQ。
|
||||
coder: MessageRecord的解析器类,必须是org.redkale.mq.MessageCoder<MessageRecord>的实现类,
|
||||
可对数据包进行加密解密,默认值:org.redkale.mq.MessageRecordCoder
|
||||
MQ节点下的子节点配置没有固定格式, 根据MessageAgent实现方的定义来配置
|
||||
-->
|
||||
<mq name="" type="org.redkalex.mq.kafka.KafkaMessageAgent" rpc="false" threads="4">
|
||||
<servers value="127.0.0.1:9101"/>
|
||||
<!--
|
||||
加载所有的MessageConsumer实例;
|
||||
autoload="true" 默认值. 自动加载classpath下所有的MessageConsumer类
|
||||
autoload="false" 需要显著的指定MessageConsumer类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<consumer autoload="true" includes="" excludes=""/>
|
||||
<!--
|
||||
MQ实现方的配置项
|
||||
type: 配置项类型,值只能是consumer或producer
|
||||
-->
|
||||
<config type="consumer">
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</config>
|
||||
<config type="producer">
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</config>
|
||||
</mq>
|
||||
|
||||
<!--
|
||||
一个组包含多个node, 同一Service服务可以由多个进程提供,这些进程称为一个GROUP,且同一GROUP内的进程必须在同一机房或局域网内
|
||||
name: 服务组ID,长度不能超过11个字节. 默认为空字符串。 注意: name不能包含$符号。
|
||||
protocol: 值范围:UDP TCP, 默认TCP
|
||||
nodes: 多个node节点值; 例如:192.168.0.1:6060,192.168.0.2:6060
|
||||
注意: 一个node只能所属一个group。只要存在protocol=SNCP的Server节点信息, 就必须有group节点信息。
|
||||
-->
|
||||
<group name="" protocol="TCP" nodes="192.168.0.1:6060,192.168.0.2:6060">
|
||||
<!--
|
||||
需要将本地node的addr与port列在此处, 也可以直接用nodes属性。
|
||||
同一个<node>节点值只能存在一个<group>节点内,即同一个addr+port只能属于一个group。
|
||||
addr: required IP地址
|
||||
port: required 端口
|
||||
-->
|
||||
<node addr="127.0.0.1" port="7070"/>
|
||||
</group>
|
||||
|
||||
<!--
|
||||
Application启动的监听事件,可配置多个节点
|
||||
value: 类名,必须是ApplicationListener的子类
|
||||
-->
|
||||
<listener value="org.redkalex.xxx.XXXApplicationListener"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】
|
||||
全局的参数配置, 可以通过@Resource(name="property.xxxxxx") 进行注入<property>的信息, 被注解的字段类型只能是String、primitive class
|
||||
如果name是system.property.开头的值将会在进程启动时进行System.setProperty("yyyy", "YYYYYY")操作。
|
||||
如果name是mimetype.property.开头的值将会在进程启动时进行MimeType.add("yyyy", "YYYYYY")操作。
|
||||
先加载子节点property,再加载load文件, 最后加载agent的实现子类。
|
||||
load: 加载文件,多个用;隔开。
|
||||
其他属性: 供org.redkale.boot.PropertiesAgentProvider使用判断
|
||||
默认置入的system.property.的有:
|
||||
System.setProperty("redkale.convert.pool.size", "128");
|
||||
System.setProperty("redkale.convert.writer.buffer.defsize", "4096");
|
||||
|
||||
<properties>节点下也可包含非<property>节点.
|
||||
非<property>其节点可以通过@Resource(name="properties.xxxxxx")进行注入, 被注解的字段类型只能是AnyValue、AnyValue[]
|
||||
-->
|
||||
<properties load="config.properties">
|
||||
<property name="system.property.yyyy" value="YYYYYY"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</properties>
|
||||
|
||||
<!--
|
||||
protocol: required server所启动的协议,Redkale内置的有HTTP、SNCP、WATCH。协议均使用TCP实现; WATCH服务只能存在一个。
|
||||
name: 服务的名称,用于监控识别,一个配置文件中的server.name不能重复,命名规则: 字母、数字、下划线
|
||||
host: 服务所占address , 默认: 0.0.0.0
|
||||
port: required 服务所占端口
|
||||
root: 如果是web类型服务,则包含页面 默认:{APP_HOME}/root
|
||||
lib: server额外的class目录, 默认为${APP_HOME}/libs/*;
|
||||
charset: 文本编码, 默认: UTF-8
|
||||
backlog: 默认10K
|
||||
maxConns: 最大连接数, 小于1表示无限制, 默认: 0
|
||||
maxHeader: request.header最大值, 默认: 16K
|
||||
maxBody: request.body最大值, 默认: 256K
|
||||
bufferCapacity: ByteBuffer的初始化大小, TCP默认: 32K; (HTTP 2.0、WebSocket,必须要16k以上); UDP默认: 8K
|
||||
bufferPoolSize: ByteBuffer池的大小,默认: 线程数*4
|
||||
responsePoolSize: Response池的大小,默认: 1024
|
||||
aliveTimeoutSeconds: KeepAlive读操作超时秒数, 默认30, 0表示永久不超时; -1表示禁止KeepAlive
|
||||
readTimeoutSeconds: 读操作超时秒数, 默认0, 0表示永久不超时
|
||||
writeTimeoutSeconds: 写操作超时秒数, 默认0, 0表示永久不超时
|
||||
interceptor: 启动/关闭NodeServer时被调用的拦截器实现类,必须是org.redkale.boot.NodeInterceptor的子类,默认为null
|
||||
-->
|
||||
<server protocol="HTTP" host="127.0.0.1" port="6060" root="root" lib="">
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
builder: 创建SSLContext的实现类, 可自定义,必须是org.redkale.net.SSLBuilder的子类
|
||||
sslProvider: java.security.Provider自定义的实现类,如第三方: org.conscrypt.OpenSSLProvider、org.bouncycastle.jce.provider.BouncyCastleProvider
|
||||
jsseProvider: java.security.Provider自定义的实现类,如第三方: org.conscrypt.JSSEProvider、 org.bouncycastle.jce.provider.BouncyCastleJsseProvider
|
||||
protocol: TLS版本,默认值: TLS
|
||||
protocols: 设置setEnabledProtocols, 多个用,隔开 如: TLSv1.2,TLSv1.3
|
||||
clientAuth: WANT/NEED/NONE, 默认值: NONE
|
||||
ciphers: 设置setEnabledCipherSuites, 多个用,隔开 如: TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256
|
||||
keystorePass: KEY密码
|
||||
keystoreFile: KEY文件 .jks
|
||||
keystoreType: KEY类型, 默认值为JKS
|
||||
keystoreAlgorithm: KEY文件的algorithm, 默认值为SunX509
|
||||
truststorePass: TRUST密码
|
||||
truststoreFile: TRUST文件
|
||||
truststoreType: TRUST类型, 默认值为JKS
|
||||
truststoreAlgorithm: TRUST文件的algorithm, 默认值为SunX509
|
||||
-->
|
||||
<ssl builder=""/>
|
||||
|
||||
<!--
|
||||
加载所有的Service服务;
|
||||
在同一个进程中同一个name同一类型的Service将共用同一个实例
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Service类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
mq: 所属的MQ管理器,当 protocol == SNCP 时该值才有效, 存在该属性表示Service的SNCP协议采用消息总线代理模式
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
group: 所属组的节点, 不能指定多个group, 如果配置文件中存在多个SNCP协议的Server节点,需要显式指定group属性.
|
||||
当 protocol == SNCP 时 group表示当前Server与哪些节点组关联。
|
||||
当 protocol != SNCP 时 group只能是空或者一个group的节点值。
|
||||
特殊值"$remote", 视为通过第三方服务注册发现管理工具来获取远程模式的ip端口信息
|
||||
-->
|
||||
<services autoload="true" includes="" excludes="">
|
||||
|
||||
<!-- 显著加载指定的Service的接口类 -->
|
||||
<service value="com.xxx.XXX1Service"/>
|
||||
<!--
|
||||
name: 显式指定name,覆盖默认的空字符串值。 注意: name不能包含$符号。
|
||||
mq: 所属的MQ管理器,当 protocol == SNCP 时该值才有效, 存在该属性表示Service的SNCP协议采用消息总线代理模式
|
||||
group: 显式指定group,覆盖<services>节点的group默认值。
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<service value="com.xxx.XXX2Service" name="" group="xxx"/>
|
||||
<!-- 给Service增加配置属性 -->
|
||||
<service value="com.xxx.XXX1Service">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<!--
|
||||
加载所有的Filter服务;
|
||||
autoload="true" 默认值.
|
||||
autoload="false" 需要显著的指定Filter类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<filters autoload="true" includes="" excludes="">
|
||||
|
||||
<!--
|
||||
显著加载指定的Filter类
|
||||
value=: Filter类名。必须与Server的协议层相同,HTTP必须是HttpFilter
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<!-- 显著加载指定的Filter类 -->
|
||||
<filter value="com.xxx.XXX1Filter"/>
|
||||
|
||||
<!-- 给Filter增加配置属性 -->
|
||||
<filter value="com.xxx.XXX12Filter">
|
||||
<!-- property值在public void init(AnyValue conf)方法中可以通过AnyValue properties=conf.getAnyValue("properties")获取 -->
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
</filter>
|
||||
</filters>
|
||||
|
||||
<!--
|
||||
REST的核心配置项
|
||||
当Server为HTTP协议时, rest节点才有效。存在[rest]节点则Server启动时会加载REST服务, 节点可以多个,(WATCH协议不需要设置,系统会自动生成)
|
||||
path: servlet的ContextPath前缀 默认为空 【注: 开启MQ时,该字段失效】
|
||||
base: REST服务的BaseServlet,必须是 org.redkale.net.http.HttpServlet 的子类,且子类必须标记@HttpUserType。
|
||||
mq: 所属的MQ管理器, 存在该属性表示RestService的请求来自于消息总线 【注: 开启MQ时,path字段失效】
|
||||
autoload:默认值"true" 默认值. 加载当前server所能使用的Servce对象;
|
||||
includes:当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
excludes:当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;隔开
|
||||
-->
|
||||
<rest path="/pipes" base="org.redkale.net.http.HttpServlet" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
value: Service类名,列出的表示必须被加载的Service对象
|
||||
ignore: 是否忽略,设置为true则不会加载该Service对象,默认值为false
|
||||
-->
|
||||
<service value="com.xxx.XXXXService"/>
|
||||
<!--
|
||||
value: WebSocket类名,列出的表示必须被加载且标记为@RestWebSocket的WebSocket对象
|
||||
ignore: 是否忽略,设置为true则不会加载该RestWebSocket对象,默认值为false
|
||||
-->
|
||||
<websocket value="com.xxx.XXXXRestWebSocket"/>
|
||||
</rest>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, request节点才有效。
|
||||
remoteaddr 节点: 替换请求方节点的IP地址, 通常请求方是由nginx等web静态服务器转发过的则需要配置该节点。
|
||||
且value值只能是以request.headers.开头,表示从request.headers中获取对应的header值, 多个header用逗号隔开。
|
||||
locale value值必须是request.headers.或request.parameters.开头。
|
||||
例如下面例子获取request.getRemoteAddr()值,如果header存在X-RemoteAddress值则返回X-RemoteAddress值,不存在返回getRemoteAddress()。
|
||||
-->
|
||||
<request>
|
||||
<remoteaddr value="request.headers.X-RemoteAddress,X-Forwarded-For"/>
|
||||
<locale value="request.headers.locale" />
|
||||
<rpc authenticator="org.redkale.net.http.HttpRpcAuthenticator的实现类"/>
|
||||
</request>
|
||||
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时, response节点才有效。
|
||||
contenttype: plain值为调用finish时的ContentType; 默认值: text/plain; charset=utf-8
|
||||
json值为调用finishJson时的ContentType; 默认值: application/json; charset=utf-8
|
||||
defcookie 节点: 当response里输出的cookie没有指定domain 和path时,使用该节点的默认值。
|
||||
addheader、setheader 的value值以request.parameters.开头则表示从request.parameters中获取对应的parameter值
|
||||
addheader、setheader 的value值以request.headers.开头则表示从request.headers中获取对应的header值
|
||||
例如下面例子是在Response输出header时添加两个header(一个addHeader, 一个setHeader)。
|
||||
options 节点: 设置了该节点且auto=true,当request的method=OPTIONS自动设置addheader、setheader并返回200状态码
|
||||
date 节点: 设置了该节点且period有值(单位:毫秒);返回response会包含Date头信息,默认为period=0
|
||||
period=0表示实时获取当前时间;
|
||||
period<0表示不设置date;
|
||||
period>0表示定时获取时间; 设置1000表示每秒刷新Date时间
|
||||
-->
|
||||
<response>
|
||||
<content-type plain="text/plain; charset=utf-8" json="application/json; charset=utf-8"/>
|
||||
<defcookie domain="" path=""/>
|
||||
<addheader name="Access-Control-Allow-Origin" value="request.headers.Origin" /> <!-- 可多节点 -->
|
||||
<setheader name="Access-Control-Allow-Headers" value="request.headers.Access-Control-Request-Headers"/> <!-- 可多节点 -->
|
||||
<setheader name="Access-Control-Allow-Credentials" value="true"/>
|
||||
<options auto="true" />
|
||||
<date period="0" />
|
||||
</response>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,render才有效. 指定输出引擎的实现类
|
||||
value: 输出引擎的实现类, 必须是org.redkale.net.http.HttpRender的子类
|
||||
suffixs: 引擎文件名后缀,多个用;隔开,默认值为: .htel
|
||||
-->
|
||||
<render value="org.redkalex.htel.HttpTemplateRender" suffixs=".htel"/>
|
||||
<!--
|
||||
【节点在<server>中唯一】
|
||||
当Server为HTTP协议时,ResourceServlet才有效. 默认存在一个有默认属性的resource-servlet节点
|
||||
webroot: web资源的根目录, 默认取server节点中的root值
|
||||
servlet: 静态资源HttpServlet的实现,默认使用HttpResourceServlet
|
||||
index : 启始页,默认值:index.html
|
||||
-->
|
||||
<resource-servlet webroot="root" index="index.html">
|
||||
<!--
|
||||
【节点在<resource-servlet>中唯一】
|
||||
资源缓存的配置, 默认存在一个含默认属性的caches节点
|
||||
limit: 资源缓存最大容量, 默认: 0, 为0表示不缓存, 单位可以是B、K、M、G,不区分大小写
|
||||
lengthmax: 可缓存的文件大小上限, 默认: 1M(超过1M的文件不会被缓存)
|
||||
watch: 是否监控缓存文件的变化, 默认为false,不监控
|
||||
-->
|
||||
<cache limit="0M" lengthmax="1M" watch="false"/>
|
||||
<!--
|
||||
支持类似nginx中的rewrite, 目前只支持静态资源对静态资源的跳转。
|
||||
type: 匹配的类型, 目前只支持location(匹配path), 默认: location
|
||||
match: 匹配的正则表达式
|
||||
forward: 需跳转后的资源链接
|
||||
例如下面例子是将/xxx-yyy.html的页面全部跳转到/xxx.html
|
||||
-->
|
||||
<rewrite type="location" match="^/([^-]+)-[^-\.]+\.html(.*)" forward="/$1.html"/>
|
||||
</resource-servlet>
|
||||
<!--
|
||||
加载所有的Servlet服务;
|
||||
path: servlet的ContextPath前缀 默认为空
|
||||
autoload="true" 默认值. 自动加载classpath下所有的Servlet类
|
||||
autoload="false" 需要显著的指定Service类
|
||||
includes: 当autoload="true", 拉取类名与includes中的正则表达式匹配的类, 多个正则表达式用分号;或者逗号,隔开
|
||||
excludes: 当autoload="true", 排除类名与excludes中的正则表达式匹配的类, 多个正则表达式用分号;或者逗号,隔开
|
||||
-->
|
||||
<servlets path="/pipes" autoload="true" includes="" excludes="">
|
||||
<!--
|
||||
显著加载指定的Servlet类
|
||||
value=: Servlet类名。必须与Server的协议层相同,HTTP必须是HttpServlet
|
||||
ignore: 是否禁用, 默认为false。
|
||||
-->
|
||||
<servlet value="com.xxx.XXX1Servlet" />
|
||||
<servlet value="com.xxx.XXX2Servlet" />
|
||||
<servlet value="com.xxx.XXX3Servlet" >
|
||||
<property name="xxxxxx" value="XXXXXXXX"/>
|
||||
<property name="yyyyyy" value="YYYYYYYY"/>
|
||||
</servlet>
|
||||
</servlets>
|
||||
</server>
|
||||
|
||||
<server protocol="SNCP" host="127.0.0.1" port="7070" root="root" lib="">
|
||||
<!-- 参数完全同上 -->
|
||||
<services autoload="true" includes="" excludes="" />
|
||||
</server>
|
||||
|
||||
</application>
|
||||
@@ -15,11 +15,16 @@ com.sun.level = INFO
|
||||
java.util.logging.FileHandler.limit = 20M
|
||||
java.util.logging.FileHandler.count = 100
|
||||
java.util.logging.FileHandler.encoding = UTF-8
|
||||
java.util.logging.FileHandler.pattern = ${APP_HOME}/logs-%m/log-%d.log
|
||||
java.util.logging.FileHandler.pattern = ${APP_HOME}/logs-%tY%tm/log-%tY%tm%td.log
|
||||
#java.util.logging.FileHandler.unusual \u5c5e\u6027\u8868\u793a\u5c06 WARNING\u3001SEVERE \u7ea7\u522b\u7684\u65e5\u5fd7\u590d\u5236\u5199\u5165\u5355\u72ec\u7684\u6587\u4ef6\u4e2d
|
||||
java.util.logging.FileHandler.unusual = ${APP_HOME}/logs-%m/log-warnerr-%d.log
|
||||
java.util.logging.FileHandler.unusual = ${APP_HOME}/logs-%tY%tm/log-warnerr-%tY%tm%td.log
|
||||
#\u9700\u8981\u5c4f\u853d\u6d88\u606f\u5185\u5bb9\u7684\u6b63\u5219\u8868\u8fbe\u5f0f
|
||||
java.util.logging.FileHandler.denyreg =
|
||||
java.util.logging.FileHandler.denyregex =
|
||||
java.util.logging.FileHandler.append = true
|
||||
|
||||
#java.util.logging.ConsoleHandler.level = FINE
|
||||
|
||||
#\u5c06\u65e5\u5fd7\u5199\u8fdbSearchSource, \u5fc5\u987b\u6307\u5b9asource\u8d44\u6e90\u540d\uff0c\u5728source.properties\u4e2d\u5b9a\u4e49
|
||||
#java.util.logging.SearchHandler.source = platfsearch
|
||||
#\u6307\u5b9a\u5199\u8fdbSearchSource\u7684\u8868\u540d\uff0c\u9ed8\u8ba4\u503c\u4e3alog-record
|
||||
#java.util.logging.SearchHandler.tag = log-${APP_NAME}-%tY%tm%td
|
||||
50
src/main/java/META-INF/source-template.properties
Normal file
50
src/main/java/META-INF/source-template.properties
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
# CacheSource @Resource(name="usersession")
|
||||
# type\u53ef\u4ee5\u4e0d\u7528\u8bbe\u7f6e\uff0c\u6846\u67b6\u4f1a\u6839\u636eurl\u5224\u65ad\u4f7f\u7528\u54ea\u4e2aCacheSource\u5b9e\u73b0\u7c7b
|
||||
redkale.cachesource.usersession.type = org.redkalex.cache.redis.RedisCacheSource
|
||||
# \u6700\u5927\u8fde\u63a5\u6570
|
||||
redkale.cachesource.usersession.maxconns = 16
|
||||
# \u8282\u70b9\u5730\u5740
|
||||
redkale.cachesource.usersession.nodes = redis://127.0.0.1:6363
|
||||
# \u8282\u70b9\u5bc6\u7801
|
||||
redkale.cachesource.usersession.password = 12345678
|
||||
# \u8282\u70b9db
|
||||
redkale.cachesource.usersession.db = 0
|
||||
|
||||
#\u7b80\u5316\u5199\u6cd5: \u53ef\u4ee5\u4e0d\u7528.node[0], \u5c06\u53c2\u6570\u90fd\u5408\u5e76\u5230url\u4e2d
|
||||
redkale.cachesource.usersession.url = redis://user:123456@127.0.0.1:6363?db=0
|
||||
|
||||
|
||||
# DataSource @Resource(name="platf")
|
||||
# type\u53ef\u4ee5\u4e0d\u7528\u8bbe\u7f6e\uff0c\u6846\u67b6\u4f1a\u6839\u636eurl\u5224\u65ad\u4f7f\u7528\u54ea\u4e2aDataSource\u5b9e\u73b0\u7c7b\uff0c\u9ed8\u8ba4\u503c: org.redkale.source.DataJdbcSource
|
||||
redkale.datasource.platf.type = org.redkale.source.DataJdbcSource
|
||||
# \u662f\u5426\u5f00\u542f\u7f13\u5b58(\u6807\u8bb0\u4e3a@Cacheable\u7684Entity\u7c7b)\uff0c\u503c\u76ee\u524d\u53ea\u652f\u6301\u4e24\u79cd\uff1a ALL: \u6240\u6709\u5f00\u542f\u7f13\u5b58\u3002 NONE: \u5173\u95ed\u6240\u6709\u7f13\u5b58\uff0c \u975eNONE\u5b57\u6837\u7edf\u4e00\u89c6\u4e3aALL
|
||||
redkale.datasource.platf.cachemode = ALL
|
||||
# \u662f\u5426\u81ea\u52a8\u5efa\u8868\u5f53\u8868\u4e0d\u5b58\u5728\u7684\u65f6\u5019\uff0c \u76ee\u524d\u53ea\u652f\u6301mysql\u3001postgres\uff0c \u9ed8\u8ba4\u4e3afalse
|
||||
redkale.datasource.platf.table-autoddl = false
|
||||
# \u7528\u6237
|
||||
redkale.datasource.platf.user = root
|
||||
# \u5bc6\u7801
|
||||
redkale.datasource.platf.password = 12345678
|
||||
# \u591a\u4e2aURL\u7528;\u9694\u5f00\uff0c\u5982\u5206\u5e03\u5f0fSearchSource\u9700\u8981\u914d\u591a\u4e2aURL
|
||||
redkale.datasource.platf.url = jdbc:mysql://127.0.0.1:3306/platf?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
# \u6700\u5927\u8fde\u63a5\u6570\uff0c\u9ed8\u8ba4\u503c\uff1aCPU\u6570
|
||||
redkale.datasource.platf.maxconns = 16
|
||||
# \u5305\u542b\u7684SQL\u6a21\u677f\uff0c\u76f8\u5f53\u4e8e\u53cd\u5411LIKE\uff0c\u4e0d\u540c\u7684JDBC\u9a71\u52a8\u7684SQL\u8bed\u53e5\u4e0d\u4e00\u6837\uff0cRedkale\u5185\u7f6e\u4e86MySQL\u7684\u8bed\u53e5
|
||||
redkale.datasource.platf.contain-sqltemplate = LOCATE(#{keystr}, #{column}) > 0
|
||||
# \u5305\u542b\u7684SQL\u6a21\u677f\uff0c\u76f8\u5f53\u4e8e\u53cd\u5411LIKE\uff0c\u4e0d\u540c\u7684JDBC\u9a71\u52a8\u7684SQL\u8bed\u53e5\u4e0d\u4e00\u6837\uff0cRedkale\u5185\u7f6e\u4e86MySQL\u7684\u8bed\u53e5
|
||||
redkale.datasource.platf.notcontain-sqltemplate = LOCATE(#{keystr}, #{column}) = 0
|
||||
# \u590d\u5236\u8868\u7ed3\u6784\u7684SQL\u6a21\u677f\uff0cRedkale\u5185\u7f6e\u4e86MySQL\u7684\u8bed\u53e5
|
||||
redkale.datasource.platf.tablenotexist-sqlstates = 42000;42S02
|
||||
# \u590d\u5236\u8868\u7ed3\u6784\u7684SQL\u6a21\u677f\uff0cRedkale\u5185\u7f6e\u4e86MySQL\u7684\u8bed\u53e5
|
||||
redkale.datasource.platf.tablecopy-sqltemplate = CREATE TABLE IF NOT EXISTS #{newtable} LIKE #{oldtable}
|
||||
|
||||
|
||||
# DataSource \u8bfb\u5199\u5206\u79bb
|
||||
redkale.datasource.platf.read.url = jdbc:mysql://127.0.0.1:3306/platf_r?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
redkale.datasource.platf.read.user = root
|
||||
redkale.datasource.platf.read.password = 12345678
|
||||
|
||||
redkale.datasource.platf.write.url = jdbc:mysql://127.0.0.1:3306/platf_w?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&serverTimezone=UTC&characterEncoding=utf8
|
||||
redkale.datasource.platf.write.user = root
|
||||
redkale.datasource.platf.write.password = 12345678
|
||||
@@ -1,33 +1,39 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 值越大,优先级越高
|
||||
*
|
||||
* @since Common Annotations 1.2
|
||||
*/
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Priority {
|
||||
int value();
|
||||
}
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 值越大,优先级越高
|
||||
*
|
||||
* @see org.redkale.annotation.Priority
|
||||
* @since Common Annotations 1.2
|
||||
* @deprecated replace by {@link org.redkale.annotation.Priority}
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Priority {
|
||||
|
||||
/**
|
||||
* 优先级值
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int value();
|
||||
}
|
||||
83
src/main/java/javax/annotation/Resource.java
Normal file
83
src/main/java/javax/annotation/Resource.java
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
* @see org.redkale.annotation.Resource
|
||||
* @deprecated replace by {@link org.redkale.annotation.Resource}
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Resource {
|
||||
|
||||
// /**
|
||||
// * AuthenticationType
|
||||
// */
|
||||
// @Deprecated
|
||||
// public enum AuthenticationType {
|
||||
// /**
|
||||
// * @deprecated
|
||||
// */
|
||||
// CONTAINER,
|
||||
// /**
|
||||
// * @deprecated
|
||||
// */
|
||||
// APPLICATION
|
||||
// }
|
||||
//
|
||||
/**
|
||||
* 资源名称
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String name() default "";
|
||||
|
||||
/**
|
||||
* 依赖注入的类型
|
||||
*
|
||||
* @return Class
|
||||
*/
|
||||
public Class<?> type() default Object.class;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return AuthenticationType
|
||||
// */
|
||||
// @Deprecated
|
||||
// public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return boolean
|
||||
// */
|
||||
// @Deprecated
|
||||
// public boolean shareable() default true;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return String
|
||||
// */
|
||||
// @Deprecated
|
||||
// public String description() default "";
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return String
|
||||
// */
|
||||
// @Deprecated
|
||||
// public String mappedName() default "";
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return String
|
||||
// */
|
||||
// @Deprecated
|
||||
// public String lookup() default "";
|
||||
}
|
||||
58
src/main/java/javax/persistence/Cacheable.java
Normal file
58
src/main/java/javax/persistence/Cacheable.java
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies whether an entity should be cached if caching is enabled when the value of the <code>persistence.xml</code>
|
||||
* caching element is <code>ENABLE_SELECTIVE</code> or <code>DISABLE_SELECTIVE</code>. The value of the <code>Cacheable
|
||||
* </code> annotation is inherited by subclasses; it can be overridden by specifying <code>Cacheable</code> on a
|
||||
* subclass.
|
||||
*
|
||||
* <p><code>Cacheable(false)</code> means that the entity and its state must not be cached by the provider.
|
||||
*
|
||||
* @since Java Persistence 2.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Cacheable}
|
||||
* @see org.redkale.persistence.Cacheable
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Cacheable {
|
||||
|
||||
/**
|
||||
* (Optional) Whether or not the entity should be cached.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean value() default true;
|
||||
|
||||
/**
|
||||
* (Optional) 定时自动更新缓存的周期秒数,为0表示不做定时更新, 大于0表示每经过interval秒后会自动从数据库中拉取数据更新Cache
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int interval() default 0;
|
||||
|
||||
/**
|
||||
* DataSource是否直接返回对象的真实引用, 而不是copy一份
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean direct() default false;
|
||||
}
|
||||
147
src/main/java/javax/persistence/Column.java
Normal file
147
src/main/java/javax/persistence/Column.java
Normal file
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies the mapped column for a persistent property or field. If no <code>Column</code> annotation is specified,
|
||||
* the default values apply.
|
||||
*
|
||||
* <blockquote>
|
||||
*
|
||||
* <pre>
|
||||
* Example 1:
|
||||
*
|
||||
* @Column(name="DESC", nullable=false, length=512)
|
||||
* public String getDescription() { return description; }
|
||||
*
|
||||
* Example 2:
|
||||
*
|
||||
* @Column(name="DESC",
|
||||
* columnDefinition="CLOB NOT NULL",
|
||||
* table="EMP_DETAIL")
|
||||
* @Lob
|
||||
* public String getDescription() { return description; }
|
||||
*
|
||||
* Example 3:
|
||||
*
|
||||
* @Column(name="ORDER_COST", updatable=false, precision=12, scale=2)
|
||||
* public BigDecimal getCost() { return cost; }
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Column}
|
||||
* @see org.redkale.persistence.Column
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Column {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the column. Defaults to the property or field name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The comment of the column.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is a unique key. This is a shortcut for the <code>UniqueConstraint</code>
|
||||
* annotation at the table level and is useful for when the unique key constraint corresponds to only a single
|
||||
* column. This constraint applies in addition to any constraint entailed by primary key mapping and to constraints
|
||||
* specified at the table level.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean unique() default false;
|
||||
|
||||
/**
|
||||
* (Optional) Whether the database column is required.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean nullable() default true;
|
||||
|
||||
/**
|
||||
* for OpenAPI Specification 3
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String example() default "";
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is included in SQL INSERT statements generated by the persistence provider.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean insertable() default true;
|
||||
|
||||
/**
|
||||
* (Optional) Whether the column is included in SQL UPDATE statements generated by the persistence provider.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean updatable() default true;
|
||||
|
||||
/**
|
||||
* (Optional) The name of the table that contains the column. If absent the column is assumed to be in the primary
|
||||
* table.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
@Deprecated
|
||||
String table() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The column length. (Applies only if a string-valued column is used.) if type==String and length ==
|
||||
* 65535 then sqltype is TEXT <br>
|
||||
* if type==String and length <= 16777215 then sqltype is MEDIUMTEXT <br>
|
||||
* if type==String and length > 16777215 then sqltype is LONGTEXT <br>
|
||||
* if type==byte[] and length <= 65535 then sqltype is BLOB <br>
|
||||
* if type==byte[] and length <= 16777215 then sqltype is MEDIUMBLOB <br>
|
||||
* if type==byte[] and length > 16777215 then sqltype is LONGBLOB <br>
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int length() default 255;
|
||||
|
||||
/**
|
||||
* (Optional) The precision for a decimal (exact numeric) column. (Applies only if a decimal column is used.) Value
|
||||
* must be set by developer if used when generating the DDL for the column.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int precision() default 0;
|
||||
|
||||
/**
|
||||
* (Optional) The scale for a decimal (exact numeric) column. (Applies only if a decimal column is used.)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int scale() default 0;
|
||||
}
|
||||
49
src/main/java/javax/persistence/Entity.java
Normal file
49
src/main/java/javax/persistence/Entity.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies that the class is an entity. This annotation is applied to the entity class.
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Entity}
|
||||
* @see org.redkale.persistence.Entity
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target(TYPE)
|
||||
@Retention(RUNTIME)
|
||||
public @interface Entity {
|
||||
|
||||
/**
|
||||
* (Optional) The entity name. Defaults to the unqualified name of the entity class. This name is used to refer to
|
||||
* the entity in queries. The name must not be a reserved literal in the Java Persistence query language.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The comment of the entity.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
}
|
||||
46
src/main/java/javax/persistence/Id.java
Normal file
46
src/main/java/javax/persistence/Id.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies the primary key of an entity. The field or property to which the <code>Id</code> annotation is applied
|
||||
* should be one of the following types: any Java primitive type; any primitive wrapper type; <code>String</code>;
|
||||
* <code>java.util.Date</code>; <code>java.sql.Date</code>; <code>java.math.BigDecimal</code>; <code>
|
||||
* java.math.BigInteger</code>.
|
||||
*
|
||||
* <p>The mapped column for the primary key of the entity is assumed to be the primary key of the primary table. If no
|
||||
* <code>Column</code> annotation is specified, the primary key column name is assumed to be the name of the primary key
|
||||
* property or field.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Id
|
||||
* public Long getId() { return id; }
|
||||
* </pre>
|
||||
*
|
||||
* @see Column see GeneratedValue
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Id}
|
||||
* @see org.redkale.persistence.Id
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Id {}
|
||||
64
src/main/java/javax/persistence/Index.java
Normal file
64
src/main/java/javax/persistence/Index.java
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2011 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Used in schema generation to specify creation of an index.
|
||||
*
|
||||
* <p>Note that it is not necessary to specify an index for a primary key, as the primary key index will be created
|
||||
* automatically.
|
||||
*
|
||||
* <p>The syntax of the <code>columnList</code> element is a <code>column_list</code>, as follows:
|
||||
*
|
||||
* <pre>
|
||||
* column::= index_column [,index_column]*
|
||||
* index_column::= column_name [ASC | DESC]
|
||||
* </pre>
|
||||
*
|
||||
* <p>If <code>ASC</code> or <code>DESC</code> is not specified, <code>ASC</code> (ascending order) is assumed.
|
||||
*
|
||||
* @since Java Persistence 2.1
|
||||
* @deprecated replace by {@link org.redkale.persistence.Index}
|
||||
* @see org.redkale.persistence.Index
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Index {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the index; defaults to a provider-generated name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Required) The names of the columns to be included in the index, in order.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String columnList();
|
||||
|
||||
/**
|
||||
* (Optional) Whether the index is unique.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean unique() default false;
|
||||
}
|
||||
88
src/main/java/javax/persistence/Table.java
Normal file
88
src/main/java/javax/persistence/Table.java
Normal file
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies the primary table for the annotated entity. Additional tables may be specified using SecondaryTable or
|
||||
* SecondaryTables annotation.
|
||||
*
|
||||
* <p>If no <code>Table</code> annotation is specified for an entity class, the default values apply.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Entity
|
||||
* @Table(name="CUST", schema="RECORDS")
|
||||
* public class Customer { ... }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Table}
|
||||
* @see org.redkale.persistence.Table
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target(TYPE)
|
||||
@Retention(RUNTIME)
|
||||
public @interface Table {
|
||||
|
||||
/**
|
||||
* (Optional) The name of the table.
|
||||
*
|
||||
* <p>Defaults to the entity name.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Optional) The catalog of the table.
|
||||
*
|
||||
* <p>Defaults to the default catalog.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String catalog() default "";
|
||||
|
||||
/**
|
||||
* (Optional) Unique constraints that are to be placed on the table. These are only used if table generation is in
|
||||
* effect. These constraints apply in addition to any constraints specified by the <code>Column</code> and <code>
|
||||
* JoinColumn</code> annotations and constraints entailed by primary key mappings.
|
||||
*
|
||||
* <p>Defaults to no additional constraints.
|
||||
*
|
||||
* @return UniqueConstraint[]
|
||||
*/
|
||||
UniqueConstraint[] uniqueConstraints() default {};
|
||||
|
||||
/**
|
||||
* (Optional) Indexes for the table. These are only used if table generation is in effect. Note that it is not
|
||||
* necessary to specify an index for a primary key, as the primary key index will be created automatically.
|
||||
*
|
||||
* @return indexes
|
||||
* @since Java Persistence 2.1
|
||||
*/
|
||||
Index[] indexes() default {};
|
||||
|
||||
/**
|
||||
* comment
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
}
|
||||
43
src/main/java/javax/persistence/Transient.java
Normal file
43
src/main/java/javax/persistence/Transient.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies that the property or field is not persistent. It is used to annotate a property or field of an entity
|
||||
* class, mapped superclass, or embeddable class.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
*
|
||||
* @Entity
|
||||
* public class Employee {
|
||||
* @Id int id;
|
||||
* @Transient User currentUser;
|
||||
* ...
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.Transient}
|
||||
* @see org.redkale.persistence.Transient
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Transient {}
|
||||
57
src/main/java/javax/persistence/UniqueConstraint.java
Normal file
57
src/main/java/javax/persistence/UniqueConstraint.java
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* ***************************************************************************** Copyright (c) 2008 - 2013 Oracle
|
||||
* Corporation. All rights reserved.
|
||||
*
|
||||
* <p>This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Eclipse Distribution License v. 1.0 which accompanies this distribution. The Eclipse Public License is available
|
||||
* at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* <p>Contributors: Linda DeMichiel - Java Persistence 2.1 Linda DeMichiel - Java Persistence 2.0
|
||||
*
|
||||
* <p>****************************************************************************
|
||||
*/
|
||||
package javax.persistence;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Specifies that a unique constraint is to be included in the generated DDL for a primary or secondary table.
|
||||
*
|
||||
* <pre>
|
||||
* Example:
|
||||
* @Entity
|
||||
* @Table(
|
||||
* name="EMPLOYEE",
|
||||
* uniqueConstraints=
|
||||
* @UniqueConstraint(columnNames={"EMP_ID", "EMP_NAME"})
|
||||
* )
|
||||
* public class Employee { ... }
|
||||
* </pre>
|
||||
*
|
||||
* @since Java Persistence 1.0
|
||||
* @deprecated replace by {@link org.redkale.persistence.UniqueConstraint}
|
||||
* @see org.redkale.persistence.UniqueConstraint
|
||||
*/
|
||||
@Deprecated(since = "2.8.0")
|
||||
@Target({})
|
||||
@Retention(RUNTIME)
|
||||
public @interface UniqueConstraint {
|
||||
|
||||
/**
|
||||
* (Optional) Constraint name. A provider-chosen name will be chosen if a name is not specified.
|
||||
*
|
||||
* @return String
|
||||
* @since Java Persistence 2.0
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* (Required) An array of the column names that make up the constraint.
|
||||
*
|
||||
* @return String[]
|
||||
*/
|
||||
String[] columnNames();
|
||||
}
|
||||
54
src/main/java/module-info.java
Normal file
54
src/main/java/module-info.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* see: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
module org.redkale {
|
||||
requires java.base;
|
||||
requires java.logging;
|
||||
requires java.net.http;
|
||||
requires java.sql;
|
||||
requires jdk.unsupported; // sun.misc.Unsafe
|
||||
|
||||
exports org.redkale.annotation;
|
||||
exports org.redkale.boot;
|
||||
exports org.redkale.boot.watch;
|
||||
exports org.redkale.cached;
|
||||
exports org.redkale.cached.spi;
|
||||
exports org.redkale.cluster;
|
||||
exports org.redkale.cluster.spi;
|
||||
exports org.redkale.convert;
|
||||
exports org.redkale.convert.ext;
|
||||
exports org.redkale.convert.json;
|
||||
exports org.redkale.convert.pb;
|
||||
exports org.redkale.convert.spi;
|
||||
exports org.redkale.inject;
|
||||
exports org.redkale.locked;
|
||||
exports org.redkale.locked.spi;
|
||||
exports org.redkale.mq;
|
||||
exports org.redkale.mq.spi;
|
||||
exports org.redkale.net;
|
||||
exports org.redkale.net.client;
|
||||
exports org.redkale.net.http;
|
||||
exports org.redkale.net.sncp;
|
||||
exports org.redkale.persistence;
|
||||
exports org.redkale.props.spi;
|
||||
exports org.redkale.scheduled;
|
||||
exports org.redkale.scheduled.spi;
|
||||
exports org.redkale.service;
|
||||
exports org.redkale.source;
|
||||
exports org.redkale.source.spi;
|
||||
exports org.redkale.util;
|
||||
exports org.redkale.watch;
|
||||
|
||||
uses org.redkale.util.YamlProvider;
|
||||
uses org.redkale.props.spi.PropertiesAgentProvider;
|
||||
uses org.redkale.cached.spi.CachedManagerProvider;
|
||||
uses org.redkale.cluster.spi.ClusterAgentProvider;
|
||||
uses org.redkale.convert.spi.ConvertProvider;
|
||||
uses org.redkale.mq.spi.MessageAgentProvider;
|
||||
uses org.redkale.scheduled.spi.ScheduledManagerProvider;
|
||||
uses org.redkale.source.spi.CacheSourceProvider;
|
||||
uses org.redkale.source.spi.DataSourceProvider;
|
||||
uses org.redkale.source.spi.DataNativeSqlParserProvider;
|
||||
}
|
||||
@@ -1,26 +1,27 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 自动加载。 使用场景:
|
||||
* 1、被标记为@AutoLoad(false)的Service类不会被自动加载, 当被依赖时才会被加载
|
||||
* 2、被标记为@AutoLoad(false)的Servlet类不会被自动加载
|
||||
*
|
||||
* <p> 详情见: https://redkale.org
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface AutoLoad {
|
||||
|
||||
boolean value() default true;
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 自动加载。 使用场景: <br>
|
||||
* 1、被标记为@AutoLoad(false)的Service类不会被自动加载, 当被依赖时才会被加载 <br>
|
||||
* 2、被标记为@AutoLoad(false)的Servlet类不会被自动加载 <br>
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface AutoLoad {
|
||||
|
||||
boolean value() default true;
|
||||
}
|
||||
26
src/main/java/org/redkale/annotation/ClassDepends.java
Normal file
26
src/main/java/org/redkale/annotation/ClassDepends.java
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.*;
|
||||
|
||||
/**
|
||||
* 被标记的元素表示会被动态字节码调用
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE, METHOD, FIELD, CONSTRUCTOR})
|
||||
@Retention(SOURCE)
|
||||
public @interface ClassDepends {
|
||||
|
||||
Class[] value() default {};
|
||||
|
||||
String comment() default "";
|
||||
}
|
||||
47
src/main/java/org/redkale/annotation/Command.java
Normal file
47
src/main/java/org/redkale/annotation/Command.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 接收命令的标记, 只能标记在本地模式下Service里参数为(String)或(String, String[])的public方法上
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Command {
|
||||
|
||||
/**
|
||||
* 命令号,没有指定值则接收所有的命令
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String value() default "";
|
||||
|
||||
/**
|
||||
* 参数帮助说明,在value不为空命令redkale --help时显示
|
||||
*
|
||||
* @return String
|
||||
* @since 2.7.0
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String comment() default "";
|
||||
}
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 标记注释,备注
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({TYPE, METHOD, FIELD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, TYPE_PARAMETER})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Comment {
|
||||
|
||||
String name() default "";
|
||||
|
||||
String value();
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 标记注释,备注
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({TYPE, METHOD, FIELD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, TYPE_PARAMETER})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Comment {
|
||||
|
||||
String name() default "";
|
||||
|
||||
String value();
|
||||
}
|
||||
22
src/main/java/org/redkale/annotation/Component.java
Normal file
22
src/main/java/org/redkale/annotation/Component.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 标记Component的Service类特点: <br>
|
||||
* 1、直接构造, 不使用Sncp动态构建对象 <br>
|
||||
* 2、不会生成对应协议的Servlet <br>
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Component {}
|
||||
49
src/main/java/org/redkale/annotation/Configuration.java
Normal file
49
src/main/java/org/redkale/annotation/Configuration.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 启动服务时的初始化配置,需要结合{@link org.redkale.annotation.Resource}使用
|
||||
* <blockquote>
|
||||
* <pre>
|
||||
* @Configuration
|
||||
* public class MyConfiguration {
|
||||
*
|
||||
* @Resource(name = "a")
|
||||
* BeanA createBeanA() {
|
||||
* System.out.println("创建一个Bean");
|
||||
* BeanA bean = new BeanA();
|
||||
* bean.desc = "auto";
|
||||
* return bean;
|
||||
* }
|
||||
*
|
||||
* @Resource(name = "b")
|
||||
* BeanA createBeanA(@Resource(name = "dev.desc") String desc) {
|
||||
* System.out.println("创建一个Bean");
|
||||
* BeanA bean = new BeanA();
|
||||
* bean.desc = name;
|
||||
* return bean;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* </pre>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Configuration {}
|
||||
@@ -1,26 +1,27 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 类似java.beans.ConstructorProperties, 必须配合Creator使用
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, CONSTRUCTOR})
|
||||
@Retention(RUNTIME)
|
||||
public @interface ConstructorParameters {
|
||||
|
||||
String[] value();
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 类似java.beans.ConstructorProperties, 必须配合Creator使用
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, CONSTRUCTOR})
|
||||
@Retention(RUNTIME)
|
||||
@ClassDepends
|
||||
public @interface ConstructorParameters {
|
||||
|
||||
String[] value();
|
||||
}
|
||||
@@ -1,46 +1,51 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 等于level日志级别且包含keys字符串的日志才会被排除 <br>
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* @LogExcludeLevel(levels = {"FINEST"}, keys = {"SET username ="})
|
||||
* public class UserRecord {
|
||||
* public int userid;
|
||||
* public String username = "";
|
||||
* }
|
||||
*
|
||||
* 这样当调用DataSource对UserRecord对象进行操作时,拼接的SQL语句含"SET username ="字样的都会在FINEST日志级别过滤掉
|
||||
* </pre></blockquote>
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
@Repeatable(LogExcludeLevel.LogExcludeLevels.class)
|
||||
public @interface LogExcludeLevel {
|
||||
|
||||
String[] levels();
|
||||
|
||||
String[] keys();
|
||||
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
@interface LogExcludeLevels {
|
||||
|
||||
LogExcludeLevel[] value();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 等于level日志级别且包含keys字符串的日志才会被排除 <br>
|
||||
*
|
||||
* <blockquote>
|
||||
*
|
||||
* <pre>
|
||||
* @LogExcludeLevel(levels = {"FINEST"}, keys = {"SET username ="})
|
||||
* public class UserRecord {
|
||||
* public int userid;
|
||||
* public String username = "";
|
||||
* }
|
||||
*
|
||||
* 这样当调用DataSource对UserRecord对象进行操作时,拼接的SQL语句含"SET username ="字样的都会在FINEST日志级别过滤掉
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
@Repeatable(LogExcludeLevel.LogExcludeLevels.class)
|
||||
public @interface LogExcludeLevel {
|
||||
|
||||
String[] levels();
|
||||
|
||||
String[] keys();
|
||||
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
@interface LogExcludeLevels {
|
||||
|
||||
LogExcludeLevel[] value();
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 被标记的日志级别以上的才会被记录
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface LogLevel {
|
||||
|
||||
String value();
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 被标记的日志级别以上的才会被记录
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface LogLevel {
|
||||
|
||||
String value();
|
||||
}
|
||||
25
src/main/java/org/redkale/annotation/NonBlocking.java
Normal file
25
src/main/java/org/redkale/annotation/NonBlocking.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 非阻塞模式标记, 标记在Service类和方法、Filter类、HttpServlet类上 <br>
|
||||
* 一般情况下,没有显注此注解的方法视为阻塞时, 以下两种情况除外: <br>
|
||||
* 1、返回类型是CompletionStage <br>
|
||||
* 2、返回类型是void且参数存在CompletionHandler类型 <br>
|
||||
* 阻塞模式的方法会在work线程池中运行, 非阻塞在IO线程中运行。
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface NonBlocking { // 不可使用@Inherited,防止被继承, 见HttpServlet.preExecute/authenticate/execute
|
||||
|
||||
boolean value() default true;
|
||||
}
|
||||
18
src/main/java/org/redkale/annotation/Nonnull.java
Normal file
18
src/main/java/org/redkale/annotation/Nonnull.java
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 标记值可以为null
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Nonnull {}
|
||||
18
src/main/java/org/redkale/annotation/Nullable.java
Normal file
18
src/main/java/org/redkale/annotation/Nullable.java
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 标记值可以为null
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Nullable {}
|
||||
29
src/main/java/org/redkale/annotation/Param.java
Normal file
29
src/main/java/org/redkale/annotation/Param.java
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 参数名注解,编译时加上 <b>-parameters</b> 参数可以不用此注解
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({PARAMETER})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Param {
|
||||
|
||||
String value();
|
||||
|
||||
String comment() default "";
|
||||
}
|
||||
20
src/main/java/org/redkale/annotation/PostConstruct.java
Normal file
20
src/main/java/org/redkale/annotation/PostConstruct.java
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.*;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RUNTIME)
|
||||
@Target(METHOD)
|
||||
public @interface PostConstruct {}
|
||||
18
src/main/java/org/redkale/annotation/PreDestroy.java
Normal file
18
src/main/java/org/redkale/annotation/PreDestroy.java
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.*;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RUNTIME)
|
||||
@Target(METHOD)
|
||||
public @interface PreDestroy {}
|
||||
45
src/main/java/org/redkale/annotation/Priority.java
Normal file
45
src/main/java/org/redkale/annotation/Priority.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 值越大,优先级越高
|
||||
*
|
||||
* @since Common Annotations 1.2
|
||||
*/
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Priority {
|
||||
|
||||
/** 最高优先级, 其他值必须比此值小 */
|
||||
public static final int HIGHTEST = Integer.MAX_VALUE;
|
||||
|
||||
/** 最低优先级, 其他值必须比此值大 */
|
||||
public static final int LOWEST = Integer.MIN_VALUE;
|
||||
|
||||
/**
|
||||
* 优先级值
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int value();
|
||||
}
|
||||
60
src/main/java/org/redkale/annotation/Resource.java
Normal file
60
src/main/java/org/redkale/annotation/Resource.java
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Resource(name = "@") 表示资源name采用所属对象的name <br>
|
||||
* @Resource(name = "#name") 表示资源对象自身的name <br>
|
||||
* @Resource(name = "#type") 表示资源对象自身的类型 <br>
|
||||
*
|
||||
* @since Common Annotations 1.0
|
||||
* @since 2.8.0
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Resource {
|
||||
|
||||
public static final String PARENT_NAME = "@";
|
||||
|
||||
public static final String SELF_NAME = "#name";
|
||||
|
||||
public static final String SELF_TYPE = "#type";
|
||||
|
||||
/**
|
||||
* 是否必须存在
|
||||
*
|
||||
* @return boolean
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public boolean required() default true;
|
||||
|
||||
/**
|
||||
* 资源名称 <br>
|
||||
*
|
||||
* <blockquote>
|
||||
*
|
||||
* <pre>
|
||||
* name规则:
|
||||
* 1: "@"有特殊含义, 表示资源本身,"@"不能单独使用
|
||||
* 2: "#name"、"#type"有特殊含义
|
||||
* 3: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String name() default "";
|
||||
|
||||
/**
|
||||
* 依赖注入的类型
|
||||
*
|
||||
* @return Class
|
||||
*/
|
||||
public Class<?> type() default Object.class;
|
||||
}
|
||||
67
src/main/java/org/redkale/annotation/ResourceChanged.java
Normal file
67
src/main/java/org/redkale/annotation/ResourceChanged.java
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @Resource资源被更新时的监听事件, 本注解只能标记在方法参数为ResourceEvent[]上 <br>
|
||||
* 注意: 一个类只能存在一个@ResourceChanged的方法, 多余的会被忽略 <br>
|
||||
* 方法在资源被更新以后调用。
|
||||
*
|
||||
* <blockquote>
|
||||
*
|
||||
* <pre>
|
||||
* public class RecordService implements Service {
|
||||
*
|
||||
* @Resource(name = "record.id")
|
||||
* private int id;
|
||||
*
|
||||
* @Resource(name = "record.name")
|
||||
* private String name;
|
||||
*
|
||||
* @ResourceChanged
|
||||
* private void changeResource(ResourceEvent[] events) {
|
||||
* for(ResourceEvent event : events) {
|
||||
* System.out .println("@Resource = " + event.name()
|
||||
* + " 资源变更: newVal = " + event.newValue() + ", oldVal = " + event.oldValue());
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* public static void main(String[] args) throws Exception {
|
||||
* ResourceFactory factory = ResourceFactory.create();
|
||||
* factory.register("record.id", "2345");
|
||||
* factory.register("record.name", "my old name");
|
||||
* Record record = new Record();
|
||||
* factory.inject(record);
|
||||
* factory.register("record.name", "my new name");
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface ResourceChanged {
|
||||
|
||||
/**
|
||||
* 新旧值是否不相同的情况下才回调方法 <br>
|
||||
* true: 新值与旧值不相同才回调ResourceChanged方法 <br>
|
||||
* false: 只要执行了ResourceFactory.register 就回调ResourceChanged方法
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @return boolean
|
||||
*/
|
||||
boolean different() default true;
|
||||
}
|
||||
64
src/main/java/org/redkale/annotation/ResourceInjected.java
Normal file
64
src/main/java/org/redkale/annotation/ResourceInjected.java
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @Resource资源被依赖注入时的监听事件。<br>
|
||||
* 本注解只能标记在空参数或者(String、Object、java.lang.reflect.Field)三个参数类型的任意组合方法上 <br>
|
||||
* 方法在资源被依赖注入后调用。
|
||||
*
|
||||
* <blockquote>
|
||||
*
|
||||
* <pre>
|
||||
* public class ResourceService implements Service {
|
||||
*
|
||||
* @Resource(name = "res.id")
|
||||
* private int id;
|
||||
*
|
||||
* @Resource(name = "res.name")
|
||||
* private String name;
|
||||
*
|
||||
* @ResourceInjected
|
||||
* private void onInjected(Object dest, String fieldName) {
|
||||
* System.out .println("资源被注入到对象(" + dest + ")的字段(" + fieldName + ")上");
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* public class RecordService implements Service {
|
||||
*
|
||||
* @Resource
|
||||
* private ResourceService resService;
|
||||
*
|
||||
* public void test() {
|
||||
* }
|
||||
*
|
||||
* public static void main(String[] args) throws Exception {
|
||||
* ResourceFactory factory = ResourceFactory.create();
|
||||
* factory.register("res.id", "2345");
|
||||
* factory.register("res.name", "my old name");
|
||||
* ResourceService res = new ResourceService();
|
||||
* factory.inject(res);
|
||||
* factory.register("", res);
|
||||
* RecordService serice = new RecordService();
|
||||
* factory.inject(record);
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface ResourceInjected {}
|
||||
@@ -1,29 +1,28 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 显式的指明资源类型。
|
||||
* 调用ResourceFactory.register(Object rs)时通常执行的是ResourceFactory.register(rs.getClass(), Object rs);
|
||||
* 若rs.getClass()的类标记了@ResourceType, 则使用@ResourceType.value()的class值进行注入。
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface ResourceType {
|
||||
|
||||
Class value();
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 显式的指明资源类型。 调用ResourceFactory.register(Object rs)时通常执行的是ResourceFactory.register(rs.getClass(), Object rs);
|
||||
* 若rs.getClass()的类标记了@ResourceType, 则使用@ResourceType.value()的class值进行注入。
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface ResourceType {
|
||||
|
||||
Class value();
|
||||
}
|
||||
21
src/main/java/org/redkale/annotation/Serial.java
Normal file
21
src/main/java/org/redkale/annotation/Serial.java
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* 用于预编译时执行Convert.convertFrom方法
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target(TYPE)
|
||||
@Retention(RUNTIME)
|
||||
public @interface Serial {}
|
||||
2
src/main/java/org/redkale/annotation/package-info.java
Normal file
2
src/main/java/org/redkale/annotation/package-info.java
Normal file
@@ -0,0 +1,2 @@
|
||||
/** 提供基础注解包 */
|
||||
package org.redkale.annotation;
|
||||
@@ -59,9 +59,9 @@
|
||||
package org.redkale.asm;
|
||||
|
||||
/**
|
||||
* A visitor to visit a Java annotation. The methods of this class must be
|
||||
* called in the following order: ( <tt>visit</tt> | <tt>visitEnum</tt> |
|
||||
* <tt>visitAnnotation</tt> | <tt>visitArray</tt> )* <tt>visitEnd</tt>.
|
||||
* A visitor to visit a Java annotation. The methods of this class must be called in the following order: (
|
||||
* <tt>visit</tt> | <tt>visitEnum</tt> | <tt>visitAnnotation</tt> |
|
||||
* <tt>visitArray</tt> )* <tt>visitEnd</tt>.
|
||||
*
|
||||
* @author Eric Bruneton
|
||||
* @author Eugene Kuleshov
|
||||
@@ -69,23 +69,19 @@ package org.redkale.asm;
|
||||
public abstract class AnnotationVisitor {
|
||||
|
||||
/**
|
||||
* The ASM API version implemented by this visitor. The value of this field
|
||||
* must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
* The ASM API version implemented by this visitor. The value of this field must be one of {@link Opcodes#ASM4},
|
||||
* {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
*/
|
||||
protected final int api;
|
||||
|
||||
/**
|
||||
* The annotation visitor to which this visitor must delegate method calls.
|
||||
* May be null.
|
||||
*/
|
||||
/** The annotation visitor to which this visitor must delegate method calls. May be null. */
|
||||
protected AnnotationVisitor av;
|
||||
|
||||
/**
|
||||
* Constructs a new {@link AnnotationVisitor}.
|
||||
*
|
||||
* @param api
|
||||
* the ASM API version implemented by this visitor. Must be one
|
||||
* of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
* @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM4},
|
||||
* {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
*/
|
||||
public AnnotationVisitor(final int api) {
|
||||
this(api, null);
|
||||
@@ -94,12 +90,9 @@ public abstract class AnnotationVisitor {
|
||||
/**
|
||||
* Constructs a new {@link AnnotationVisitor}.
|
||||
*
|
||||
* @param api
|
||||
* the ASM API version implemented by this visitor. Must be one
|
||||
* of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
* @param av
|
||||
* the annotation visitor to which this visitor must delegate
|
||||
* method calls. May be null.
|
||||
* @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM4},
|
||||
* {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
|
||||
* @param av the annotation visitor to which this visitor must delegate method calls. May be null.
|
||||
*/
|
||||
public AnnotationVisitor(final int api, final AnnotationVisitor av) {
|
||||
this.api = api;
|
||||
@@ -109,17 +102,12 @@ public abstract class AnnotationVisitor {
|
||||
/**
|
||||
* Visits a primitive value of the annotation.
|
||||
*
|
||||
* @param name
|
||||
* the value name.
|
||||
* @param value
|
||||
* the actual value, whose type must be {@link Byte},
|
||||
* {@link Boolean}, {@link Character}, {@link Short},
|
||||
* {@link Integer} , {@link Long}, {@link Float}, {@link Double},
|
||||
* {@link String} or {@link Type} of OBJECT or ARRAY sort. This
|
||||
* value can also be an array of byte, boolean, short, char, int,
|
||||
* long, float or double values (this is equivalent to using
|
||||
* {@link #visitArray visitArray} and visiting each array element
|
||||
* in turn, but is more convenient).
|
||||
* @param name the value name.
|
||||
* @param value the actual value, whose type must be {@link Byte}, {@link Boolean}, {@link Character},
|
||||
* {@link Short}, {@link Integer} , {@link Long}, {@link Float}, {@link Double}, {@link String} or {@link Type}
|
||||
* of OBJECT or ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or
|
||||
* double values (this is equivalent to using {@link #visitArray visitArray} and visiting each array element in
|
||||
* turn, but is more convenient).
|
||||
*/
|
||||
public void visit(String name, Object value) {
|
||||
if (av != null) {
|
||||
@@ -130,12 +118,9 @@ public abstract class AnnotationVisitor {
|
||||
/**
|
||||
* Visits an enumeration value of the annotation.
|
||||
*
|
||||
* @param name
|
||||
* the value name.
|
||||
* @param desc
|
||||
* the class descriptor of the enumeration class.
|
||||
* @param value
|
||||
* the actual enumeration value.
|
||||
* @param name the value name.
|
||||
* @param desc the class descriptor of the enumeration class.
|
||||
* @param value the actual enumeration value.
|
||||
*/
|
||||
public void visitEnum(String name, String desc, String value) {
|
||||
if (av != null) {
|
||||
@@ -146,15 +131,11 @@ public abstract class AnnotationVisitor {
|
||||
/**
|
||||
* Visits a nested annotation value of the annotation.
|
||||
*
|
||||
* @param name
|
||||
* the value name.
|
||||
* @param desc
|
||||
* the class descriptor of the nested annotation class.
|
||||
* @return a visitor to visit the actual nested annotation value, or
|
||||
* <tt>null</tt> if this visitor is not interested in visiting this
|
||||
* nested annotation. <i>The nested annotation value must be fully
|
||||
* visited before calling other methods on this annotation
|
||||
* visitor</i>.
|
||||
* @param name the value name.
|
||||
* @param desc the class descriptor of the nested annotation class.
|
||||
* @return a visitor to visit the actual nested annotation value, or <tt>null</tt> if this visitor
|
||||
* is not interested in visiting this nested annotation. <i>The nested annotation value must be fully visited
|
||||
* before calling other methods on this annotation visitor</i>.
|
||||
*/
|
||||
public AnnotationVisitor visitAnnotation(String name, String desc) {
|
||||
if (av != null) {
|
||||
@@ -164,18 +145,14 @@ public abstract class AnnotationVisitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits an array value of the annotation. Note that arrays of primitive
|
||||
* types (such as byte, boolean, short, char, int, long, float or double)
|
||||
* can be passed as value to {@link #visit visit}. This is what
|
||||
* {@link ClassReader} does.
|
||||
* Visits an array value of the annotation. Note that arrays of primitive types (such as byte, boolean, short, char,
|
||||
* int, long, float or double) can be passed as value to {@link #visit visit}. This is what {@link ClassReader}
|
||||
* does.
|
||||
*
|
||||
* @param name
|
||||
* the value name.
|
||||
* @return a visitor to visit the actual array value elements, or
|
||||
* <tt>null</tt> if this visitor is not interested in visiting these
|
||||
* values. The 'name' parameters passed to the methods of this
|
||||
* visitor are ignored. <i>All the array values must be visited
|
||||
* before calling other methods on this annotation visitor</i>.
|
||||
* @param name the value name.
|
||||
* @return a visitor to visit the actual array value elements, or <tt>null</tt> if this visitor is
|
||||
* not interested in visiting these values. The 'name' parameters passed to the methods of this visitor are
|
||||
* ignored. <i>All the array values must be visited before calling other methods on this annotation visitor</i>.
|
||||
*/
|
||||
public AnnotationVisitor visitArray(String name) {
|
||||
if (av != null) {
|
||||
@@ -184,9 +161,7 @@ public abstract class AnnotationVisitor {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits the end of the annotation.
|
||||
*/
|
||||
/** Visits the end of the annotation. */
|
||||
public void visitEnd() {
|
||||
if (av != null) {
|
||||
av.visitEnd();
|
||||
@@ -66,50 +66,34 @@ package org.redkale.asm;
|
||||
*/
|
||||
final class AnnotationWriter extends AnnotationVisitor {
|
||||
|
||||
/**
|
||||
* The class writer to which this annotation must be added.
|
||||
*/
|
||||
/** The class writer to which this annotation must be added. */
|
||||
private final ClassWriter cw;
|
||||
|
||||
/**
|
||||
* The number of values in this annotation.
|
||||
*/
|
||||
/** The number of values in this annotation. */
|
||||
private int size;
|
||||
|
||||
/**
|
||||
* <tt>true<tt> if values are named, <tt>false</tt> otherwise. Annotation
|
||||
* writers used for annotation default and annotation arrays use unnamed
|
||||
* values.
|
||||
* <tt>true<tt> if values are named, <tt>false</tt> otherwise. Annotation writers
|
||||
* used for annotation default and annotation arrays use unnamed values.
|
||||
*/
|
||||
private final boolean named;
|
||||
|
||||
/**
|
||||
* The annotation values in bytecode form. This byte vector only contains
|
||||
* the values themselves, i.e. the number of values must be stored as a
|
||||
* unsigned short just before these bytes.
|
||||
* The annotation values in bytecode form. This byte vector only contains the values themselves, i.e. the number of
|
||||
* values must be stored as a unsigned short just before these bytes.
|
||||
*/
|
||||
private final ByteVector bv;
|
||||
|
||||
/**
|
||||
* The byte vector to be used to store the number of values of this
|
||||
* annotation. See {@link #bv}.
|
||||
*/
|
||||
/** The byte vector to be used to store the number of values of this annotation. See {@link #bv}. */
|
||||
private final ByteVector parent;
|
||||
|
||||
/**
|
||||
* Where the number of values of this annotation must be stored in
|
||||
* {@link #parent}.
|
||||
*/
|
||||
/** Where the number of values of this annotation must be stored in {@link #parent}. */
|
||||
private final int offset;
|
||||
|
||||
/**
|
||||
* Next annotation writer. This field is used to store annotation lists.
|
||||
*/
|
||||
/** Next annotation writer. This field is used to store annotation lists. */
|
||||
AnnotationWriter next;
|
||||
|
||||
/**
|
||||
* Previous annotation writer. This field is used to store annotation lists.
|
||||
*/
|
||||
/** Previous annotation writer. This field is used to store annotation lists. */
|
||||
AnnotationWriter prev;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -119,20 +103,14 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
/**
|
||||
* Constructs a new {@link AnnotationWriter}.
|
||||
*
|
||||
* @param cw
|
||||
* the class writer to which this annotation must be added.
|
||||
* @param named
|
||||
* <tt>true<tt> if values are named, <tt>false</tt> otherwise.
|
||||
* @param bv
|
||||
* where the annotation values must be stored.
|
||||
* @param parent
|
||||
* where the number of annotation values must be stored.
|
||||
* @param offset
|
||||
* where in <tt>parent</tt> the number of annotation values must
|
||||
* be stored.
|
||||
* @param cw the class writer to which this annotation must be added.
|
||||
* @param named <tt>true<tt> if values are named, <tt>false</tt> otherwise.
|
||||
* @param bv where the annotation values must be stored.
|
||||
* @param parent where the number of annotation values must be stored.
|
||||
* @param offset where in <tt>parent</tt> the number of annotation values must be stored.
|
||||
*/
|
||||
AnnotationWriter(final ClassWriter cw, final boolean named,
|
||||
final ByteVector bv, final ByteVector parent, final int offset) {
|
||||
AnnotationWriter(
|
||||
final ClassWriter cw, final boolean named, final ByteVector bv, final ByteVector parent, final int offset) {
|
||||
super(Opcodes.ASM6);
|
||||
this.cw = cw;
|
||||
this.named = named;
|
||||
@@ -219,8 +197,7 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitEnum(final String name, final String desc,
|
||||
final String value) {
|
||||
public void visitEnum(final String name, final String desc, final String value) {
|
||||
++size;
|
||||
if (named) {
|
||||
bv.putShort(cw.newUTF8(name));
|
||||
@@ -229,8 +206,7 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(final String name,
|
||||
final String desc) {
|
||||
public AnnotationVisitor visitAnnotation(final String name, final String desc) {
|
||||
++size;
|
||||
if (named) {
|
||||
bv.putShort(cw.newUTF8(name));
|
||||
@@ -280,11 +256,9 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts the annotations of this annotation writer list into the given byte
|
||||
* vector.
|
||||
* Puts the annotations of this annotation writer list into the given byte vector.
|
||||
*
|
||||
* @param out
|
||||
* where the annotations must be put.
|
||||
* @param out where the annotations must be put.
|
||||
*/
|
||||
void put(final ByteVector out) {
|
||||
int n = 0;
|
||||
@@ -311,15 +285,11 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
/**
|
||||
* Puts the given annotation lists into the given byte vector.
|
||||
*
|
||||
* @param panns
|
||||
* an array of annotation writer lists.
|
||||
* @param off
|
||||
* index of the first annotation to be written.
|
||||
* @param out
|
||||
* where the annotations must be put.
|
||||
* @param panns an array of annotation writer lists.
|
||||
* @param off index of the first annotation to be written.
|
||||
* @param out where the annotations must be put.
|
||||
*/
|
||||
static void put(final AnnotationWriter[] panns, final int off,
|
||||
final ByteVector out) {
|
||||
static void put(final AnnotationWriter[] panns, final int off, final ByteVector out) {
|
||||
int size = 1 + 2 * (panns.length - off);
|
||||
for (int i = off; i < panns.length; ++i) {
|
||||
size += panns[i] == null ? 0 : panns[i].getSize();
|
||||
@@ -346,49 +316,45 @@ final class AnnotationWriter extends AnnotationVisitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts the given type reference and type path into the given bytevector.
|
||||
* LOCAL_VARIABLE and RESOURCE_VARIABLE target types are not supported.
|
||||
* Puts the given type reference and type path into the given bytevector. LOCAL_VARIABLE and RESOURCE_VARIABLE
|
||||
* target types are not supported.
|
||||
*
|
||||
* @param typeRef
|
||||
* a reference to the annotated type. See {@link TypeReference}.
|
||||
* @param typePath
|
||||
* the path to the annotated type argument, wildcard bound, array
|
||||
* element type, or static inner type within 'typeRef'. May be
|
||||
* <tt>null</tt> if the annotation targets 'typeRef' as a whole.
|
||||
* @param out
|
||||
* where the type reference and type path must be put.
|
||||
* @param typeRef a reference to the annotated type. See {@link TypeReference}.
|
||||
* @param typePath the path to the annotated type argument, wildcard bound, array element type, or static inner type
|
||||
* within 'typeRef'. May be <tt>null</tt> if the annotation targets 'typeRef' as a whole.
|
||||
* @param out where the type reference and type path must be put.
|
||||
*/
|
||||
static void putTarget(int typeRef, TypePath typePath, ByteVector out) {
|
||||
switch (typeRef >>> 24) {
|
||||
case 0x00: // CLASS_TYPE_PARAMETER
|
||||
case 0x01: // METHOD_TYPE_PARAMETER
|
||||
case 0x16: // METHOD_FORMAL_PARAMETER
|
||||
out.putShort(typeRef >>> 16);
|
||||
break;
|
||||
case 0x13: // FIELD
|
||||
case 0x14: // METHOD_RETURN
|
||||
case 0x15: // METHOD_RECEIVER
|
||||
out.putByte(typeRef >>> 24);
|
||||
break;
|
||||
case 0x47: // CAST
|
||||
case 0x48: // CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
|
||||
case 0x49: // METHOD_INVOCATION_TYPE_ARGUMENT
|
||||
case 0x4A: // CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
|
||||
case 0x4B: // METHOD_REFERENCE_TYPE_ARGUMENT
|
||||
out.putInt(typeRef);
|
||||
break;
|
||||
// case 0x10: // CLASS_EXTENDS
|
||||
// case 0x11: // CLASS_TYPE_PARAMETER_BOUND
|
||||
// case 0x12: // METHOD_TYPE_PARAMETER_BOUND
|
||||
// case 0x17: // THROWS
|
||||
// case 0x42: // EXCEPTION_PARAMETER
|
||||
// case 0x43: // INSTANCEOF
|
||||
// case 0x44: // NEW
|
||||
// case 0x45: // CONSTRUCTOR_REFERENCE
|
||||
// case 0x46: // METHOD_REFERENCE
|
||||
default:
|
||||
out.put12(typeRef >>> 24, (typeRef & 0xFFFF00) >> 8);
|
||||
break;
|
||||
case 0x00: // CLASS_TYPE_PARAMETER
|
||||
case 0x01: // METHOD_TYPE_PARAMETER
|
||||
case 0x16: // METHOD_FORMAL_PARAMETER
|
||||
out.putShort(typeRef >>> 16);
|
||||
break;
|
||||
case 0x13: // FIELD
|
||||
case 0x14: // METHOD_RETURN
|
||||
case 0x15: // METHOD_RECEIVER
|
||||
out.putByte(typeRef >>> 24);
|
||||
break;
|
||||
case 0x47: // CAST
|
||||
case 0x48: // CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
|
||||
case 0x49: // METHOD_INVOCATION_TYPE_ARGUMENT
|
||||
case 0x4A: // CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
|
||||
case 0x4B: // METHOD_REFERENCE_TYPE_ARGUMENT
|
||||
out.putInt(typeRef);
|
||||
break;
|
||||
// case 0x10: // CLASS_EXTENDS
|
||||
// case 0x11: // CLASS_TYPE_PARAMETER_BOUND
|
||||
// case 0x12: // METHOD_TYPE_PARAMETER_BOUND
|
||||
// case 0x17: // THROWS
|
||||
// case 0x42: // EXCEPTION_PARAMETER
|
||||
// case 0x43: // INSTANCEOF
|
||||
// case 0x44: // NEW
|
||||
// case 0x45: // CONSTRUCTOR_REFERENCE
|
||||
// case 0x46: // METHOD_REFERENCE
|
||||
default:
|
||||
out.put12(typeRef >>> 24, (typeRef & 0xFFFF00) >> 8);
|
||||
break;
|
||||
}
|
||||
if (typePath == null) {
|
||||
out.putByte(0);
|
||||
157
src/main/java/org/redkale/asm/AsmMethodBean.java
Normal file
157
src/main/java/org/redkale/asm/AsmMethodBean.java
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.asm;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.redkale.annotation.Param;
|
||||
|
||||
/**
|
||||
* 存放方法的字节信息
|
||||
*
|
||||
* @see org.redkale.asm.AsmMethodBoost
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public class AsmMethodBean {
|
||||
|
||||
private List<AsmMethodParam> params;
|
||||
|
||||
private int access;
|
||||
|
||||
private String name;
|
||||
|
||||
private String desc;
|
||||
|
||||
private String signature;
|
||||
|
||||
private String[] exceptions;
|
||||
|
||||
public AsmMethodBean() {}
|
||||
|
||||
public AsmMethodBean(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
this.access = access;
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.signature = signature;
|
||||
this.exceptions = exceptions;
|
||||
this.params = new ArrayList<>();
|
||||
}
|
||||
|
||||
public static AsmMethodBean get(Map<String, AsmMethodBean> map, Method method) {
|
||||
return map == null ? null : map.get(method.getName() + ":" + Type.getMethodDescriptor(method));
|
||||
}
|
||||
|
||||
void removeEmptyNames() {
|
||||
if (params != null) {
|
||||
List<AsmMethodParam> dels = null;
|
||||
for (AsmMethodParam p : params) {
|
||||
if (" ".equals(p.getName())) {
|
||||
if (dels == null) {
|
||||
dels = new ArrayList<>();
|
||||
}
|
||||
dels.add(p);
|
||||
}
|
||||
}
|
||||
if (dels != null) {
|
||||
for (AsmMethodParam p : dels) {
|
||||
params.remove(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> fieldNameList() {
|
||||
return paramNameList(null);
|
||||
}
|
||||
|
||||
public List<String> paramNameList(Method method) {
|
||||
if (params == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
int index = 0;
|
||||
Parameter[] ps = method == null ? null : method.getParameters();
|
||||
List<String> rs = new ArrayList<>(params.size());
|
||||
for (AsmMethodParam p : params) {
|
||||
Param pann = ps == null ? null : ps[index].getAnnotation(Param.class);
|
||||
rs.add(pann == null ? p.getName() : pann.value());
|
||||
index++;
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
public String[] fieldNameArray() {
|
||||
return paramNameArray(null);
|
||||
}
|
||||
|
||||
public String[] paramNameArray(Method method) {
|
||||
if (params == null) {
|
||||
return null;
|
||||
}
|
||||
Parameter[] ps = method == null ? null : method.getParameters();
|
||||
// params包含了throws, size()可能比ps.length大
|
||||
String[] rs = new String[ps == null ? params.size() : ps.length];
|
||||
for (int i = 0; i < rs.length; i++) {
|
||||
Param pann = ps == null ? null : ps[i].getAnnotation(Param.class);
|
||||
rs[i] = pann == null ? params.get(i).getName() : pann.value();
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
public List<AsmMethodParam> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(List<AsmMethodParam> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public int getAccess() {
|
||||
return access;
|
||||
}
|
||||
|
||||
public void setAccess(int access) {
|
||||
this.access = access;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String[] getExceptions() {
|
||||
return exceptions;
|
||||
}
|
||||
|
||||
public void setExceptions(String[] exceptions) {
|
||||
this.exceptions = exceptions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{params:" + params + ", access:" + access + ", name:" + name + ", desc:" + desc + ", signature:"
|
||||
+ signature + ", exceptions:" + exceptions + '}';
|
||||
}
|
||||
}
|
||||
464
src/main/java/org/redkale/asm/AsmMethodBoost.java
Normal file
464
src/main/java/org/redkale/asm/AsmMethodBoost.java
Normal file
@@ -0,0 +1,464 @@
|
||||
/*
|
||||
*
|
||||
*/
|
||||
package org.redkale.asm;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.redkale.annotation.Nullable;
|
||||
import static org.redkale.asm.Opcodes.ACC_PRIVATE;
|
||||
import static org.redkale.asm.Opcodes.ACC_PROTECTED;
|
||||
import static org.redkale.asm.Opcodes.ACC_PUBLIC;
|
||||
import static org.redkale.asm.Opcodes.ALOAD;
|
||||
import static org.redkale.asm.Opcodes.ARETURN;
|
||||
import static org.redkale.asm.Opcodes.DLOAD;
|
||||
import static org.redkale.asm.Opcodes.DRETURN;
|
||||
import static org.redkale.asm.Opcodes.FLOAD;
|
||||
import static org.redkale.asm.Opcodes.FRETURN;
|
||||
import static org.redkale.asm.Opcodes.ILOAD;
|
||||
import static org.redkale.asm.Opcodes.IRETURN;
|
||||
import static org.redkale.asm.Opcodes.LLOAD;
|
||||
import static org.redkale.asm.Opcodes.LRETURN;
|
||||
import static org.redkale.asm.Opcodes.RETURN;
|
||||
import org.redkale.inject.ResourceFactory;
|
||||
import org.redkale.util.RedkaleClassLoader;
|
||||
import org.redkale.util.Utility;
|
||||
|
||||
/**
|
||||
* 生产动态字节码的方法扩展器, 可以进行方法加强动作
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
* @param <T> 泛型
|
||||
* @author zhangjx
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public abstract class AsmMethodBoost<T> {
|
||||
|
||||
protected final AtomicInteger fieldIndex = new AtomicInteger();
|
||||
|
||||
protected final boolean remote;
|
||||
|
||||
protected final Class serviceType;
|
||||
|
||||
protected AsmMethodBoost(boolean remote, Class serviceType) {
|
||||
this.remote = remote;
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
public static AsmMethodBoost create(boolean remote, Collection<AsmMethodBoost> list) {
|
||||
return new AsmMethodBoosts(remote, list);
|
||||
}
|
||||
|
||||
public static AsmMethodBoost create(boolean remote, AsmMethodBoost... items) {
|
||||
return new AsmMethodBoosts(remote, items);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回一个类所有方法的字节信息, key为: method.getName+':'+Type.getMethodDescriptor(method)
|
||||
*
|
||||
* @param clazz Class
|
||||
* @return Map
|
||||
*/
|
||||
public static Map<String, AsmMethodBean> getMethodBeans(Class clazz) {
|
||||
Map<String, AsmMethodBean> rs = MethodParamClassVisitor.getMethodParamNames(new HashMap<>(), clazz);
|
||||
// 返回的List中参数列表可能会比方法参数量多,因为方法内的临时变量也会存入list中, 所以需要list的元素集合比方法的参数多
|
||||
rs.values().forEach(AsmMethodBean::removeEmptyNames);
|
||||
return rs;
|
||||
}
|
||||
|
||||
public static String getMethodBeanKey(Method method) {
|
||||
return method.getName() + ":" + Type.getMethodDescriptor(method);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取需屏蔽的方法上的注解
|
||||
*
|
||||
* @param method 方法
|
||||
* @return 需要屏蔽的注解
|
||||
*/
|
||||
public abstract List<Class<? extends Annotation>> filterMethodAnnotations(Method method);
|
||||
|
||||
/**
|
||||
* 对方法进行动态加强处理
|
||||
*
|
||||
* @param classLoader ClassLoader
|
||||
* @param cw 动态字节码Writer
|
||||
* @param serviceImplClass 原始实现类
|
||||
* @param newDynName 动态新类名
|
||||
* @param fieldPrefix 动态字段的前缀
|
||||
* @param filterAnns 需要过滤的注解
|
||||
* @param method 操作的方法
|
||||
* @param newMethod 新的方法名, 可能为null
|
||||
* @return 下一个新的方法名,不做任何处理应返回参数newMethodName
|
||||
*/
|
||||
public abstract AsmNewMethod doMethod(
|
||||
RedkaleClassLoader classLoader,
|
||||
ClassWriter cw,
|
||||
Class serviceImplClass,
|
||||
String newDynName,
|
||||
String fieldPrefix,
|
||||
List<Class<? extends Annotation>> filterAnns,
|
||||
Method method,
|
||||
@Nullable AsmNewMethod newMethod);
|
||||
|
||||
/**
|
||||
* 处理所有动态方法后调用
|
||||
*
|
||||
* @param classLoader ClassLoader
|
||||
* @param cw 动态字节码Writer
|
||||
* @param newDynName 动态新类名
|
||||
* @param fieldPrefix 动态字段的前缀
|
||||
*/
|
||||
public void doAfterMethods(RedkaleClassLoader classLoader, ClassWriter cw, String newDynName, String fieldPrefix) {}
|
||||
|
||||
/**
|
||||
* 处理所有动态方法后调用
|
||||
*
|
||||
* @param classLoader ClassLoader
|
||||
* @param cw 动态字节码Writer
|
||||
* @param mv 构造函数MethodVisitor
|
||||
* @param newDynName 动态新类名
|
||||
* @param fieldPrefix 动态字段的前缀
|
||||
* @param remote 是否远程模式
|
||||
*/
|
||||
public void doConstructorMethod(
|
||||
RedkaleClassLoader classLoader,
|
||||
ClassWriter cw,
|
||||
MethodVisitor mv,
|
||||
String newDynName,
|
||||
String fieldPrefix,
|
||||
boolean remote) {}
|
||||
/**
|
||||
* 实例对象进行操作,通常用于给动态的字段赋值
|
||||
*
|
||||
* @param classLoader ClassLoader
|
||||
* @param resourceFactory ResourceFactory
|
||||
* @param service 实例对象
|
||||
*/
|
||||
public abstract void doInstance(RedkaleClassLoader classLoader, ResourceFactory resourceFactory, T service);
|
||||
|
||||
protected AsmMethodBean getMethodBean(Method method) {
|
||||
Map<String, AsmMethodBean> methodBeans = AsmMethodBoost.getMethodBeans(serviceType);
|
||||
return AsmMethodBean.get(methodBeans, method);
|
||||
}
|
||||
|
||||
protected MethodVisitor createMethodVisitor(
|
||||
ClassWriter cw, Method method, AsmNewMethod newMethod, AsmMethodBean methodBean) {
|
||||
return new MethodDebugVisitor(cw.visitMethod(
|
||||
getAcc(method, newMethod),
|
||||
getNowMethodName(method, newMethod),
|
||||
Type.getMethodDescriptor(method),
|
||||
getMethodSignature(method, methodBean),
|
||||
getMethodExceptions(method, methodBean)));
|
||||
}
|
||||
|
||||
protected final int getAcc(Method method, AsmNewMethod newMethod) {
|
||||
if (newMethod != null) {
|
||||
return ACC_PRIVATE;
|
||||
}
|
||||
return Modifier.isProtected(method.getModifiers()) ? ACC_PROTECTED : ACC_PUBLIC;
|
||||
}
|
||||
|
||||
protected String getNowMethodName(Method method, AsmNewMethod newMethod) {
|
||||
return newMethod == null ? method.getName() : newMethod.getMethodName();
|
||||
}
|
||||
|
||||
protected String getMethodSignature(Method method, AsmMethodBean methodBean) {
|
||||
return methodBean != null ? methodBean.getSignature() : null;
|
||||
}
|
||||
|
||||
protected String[] getMethodExceptions(Method method, AsmMethodBean methodBean) {
|
||||
if (methodBean == null) {
|
||||
String[] exceptions = null;
|
||||
Class<?>[] expTypes = method.getExceptionTypes();
|
||||
if (expTypes.length > 0) {
|
||||
exceptions = new String[expTypes.length];
|
||||
for (int i = 0; i < expTypes.length; i++) {
|
||||
exceptions[i] = expTypes[i].getName().replace('.', '/');
|
||||
}
|
||||
}
|
||||
return exceptions;
|
||||
} else {
|
||||
return methodBean.getExceptions();
|
||||
}
|
||||
}
|
||||
|
||||
protected void visitRawAnnotation(
|
||||
Method method, AsmNewMethod newMethod, MethodVisitor mv, Class skipAnnType, List skipAnns) {
|
||||
if (newMethod == null) {
|
||||
// 给方法加上原有的Annotation
|
||||
final Annotation[] anns = method.getAnnotations();
|
||||
for (Annotation ann : anns) {
|
||||
if (ann.annotationType() != skipAnnType
|
||||
&& (skipAnns == null || !skipAnns.contains(ann.annotationType()))) {
|
||||
Asms.visitAnnotation(
|
||||
mv.visitAnnotation(Type.getDescriptor(ann.annotationType()), true),
|
||||
ann.annotationType(),
|
||||
ann);
|
||||
}
|
||||
}
|
||||
// 给参数加上原有的Annotation
|
||||
final Annotation[][] annss = method.getParameterAnnotations();
|
||||
for (int k = 0; k < annss.length; k++) {
|
||||
for (Annotation ann : annss[k]) {
|
||||
Asms.visitAnnotation(
|
||||
mv.visitParameterAnnotation(k, Type.getDescriptor(ann.annotationType()), true),
|
||||
ann.annotationType(),
|
||||
ann);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected List<Integer> visitVarInsnParamTypes(MethodVisitor mv, Method method, int insn) {
|
||||
// 传参数
|
||||
Class[] paramTypes = method.getParameterTypes();
|
||||
List<Integer> insns = new ArrayList<>();
|
||||
for (Class pt : paramTypes) {
|
||||
insn++;
|
||||
if (pt.isPrimitive()) {
|
||||
if (pt == long.class) {
|
||||
mv.visitVarInsn(LLOAD, insn++);
|
||||
} else if (pt == float.class) {
|
||||
mv.visitVarInsn(FLOAD, insn++);
|
||||
} else if (pt == double.class) {
|
||||
mv.visitVarInsn(DLOAD, insn++);
|
||||
} else {
|
||||
mv.visitVarInsn(ILOAD, insn);
|
||||
}
|
||||
} else {
|
||||
mv.visitVarInsn(ALOAD, insn);
|
||||
}
|
||||
insns.add(insn);
|
||||
}
|
||||
return insns;
|
||||
}
|
||||
|
||||
protected void visitParamTypesLocalVariable(
|
||||
MethodVisitor mv, Method method, Label l0, Label l2, List<Integer> insns, AsmMethodBean methodBean) {
|
||||
Class[] paramTypes = method.getParameterTypes();
|
||||
if (methodBean != null && paramTypes.length > 0) {
|
||||
mv.visitLabel(l2);
|
||||
List<AsmMethodParam> params = methodBean.getParams();
|
||||
for (int i = 0; i < paramTypes.length; i++) {
|
||||
AsmMethodParam param = params.get(i);
|
||||
mv.visitLocalVariable(
|
||||
param.getName(),
|
||||
param.description(paramTypes[i]),
|
||||
param.signature(paramTypes[i]),
|
||||
l0,
|
||||
l2,
|
||||
insns.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void visitInsnReturn(
|
||||
MethodVisitor mv, Method method, Label l0, List<Integer> insns, AsmMethodBean methodBean) {
|
||||
if (method.getGenericReturnType() == void.class) {
|
||||
mv.visitInsn(RETURN);
|
||||
} else {
|
||||
Class returnclz = method.getReturnType();
|
||||
if (returnclz.isPrimitive()) {
|
||||
if (returnclz == long.class) {
|
||||
mv.visitInsn(LRETURN);
|
||||
} else if (returnclz == float.class) {
|
||||
mv.visitInsn(FRETURN);
|
||||
} else if (returnclz == double.class) {
|
||||
mv.visitInsn(DRETURN);
|
||||
} else {
|
||||
mv.visitInsn(IRETURN);
|
||||
}
|
||||
} else {
|
||||
mv.visitInsn(ARETURN);
|
||||
}
|
||||
}
|
||||
visitParamTypesLocalVariable(mv, method, l0, new Label(), insns, methodBean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产动态字节码的方法扩展器, 可以进行方法加强动作
|
||||
*
|
||||
* @param <T> 泛型
|
||||
* @since 2.8.0
|
||||
*/
|
||||
static class AsmMethodBoosts<T> extends AsmMethodBoost<T> {
|
||||
|
||||
private final AsmMethodBoost[] items;
|
||||
|
||||
public AsmMethodBoosts(boolean remote, Collection<AsmMethodBoost> list) {
|
||||
super(remote, null);
|
||||
this.items = list.toArray(new AsmMethodBoost[list.size()]);
|
||||
}
|
||||
|
||||
public AsmMethodBoosts(boolean remote, AsmMethodBoost... items) {
|
||||
super(remote, null);
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Class<? extends Annotation>> filterMethodAnnotations(Method method) {
|
||||
List<Class<? extends Annotation>> list = null;
|
||||
for (AsmMethodBoost item : items) {
|
||||
if (item != null) {
|
||||
List<Class<? extends Annotation>> sub = item.filterMethodAnnotations(method);
|
||||
if (sub != null) {
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
list.addAll(sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsmNewMethod doMethod(
|
||||
RedkaleClassLoader classLoader,
|
||||
ClassWriter cw,
|
||||
Class serviceImplClass,
|
||||
String newDynName,
|
||||
String fieldPrefix,
|
||||
List<Class<? extends Annotation>> filterAnns,
|
||||
Method method,
|
||||
AsmNewMethod newMethod) {
|
||||
AsmNewMethod newResult = newMethod;
|
||||
for (AsmMethodBoost item : items) {
|
||||
if (item != null) {
|
||||
newResult = item.doMethod(
|
||||
classLoader, cw, serviceImplClass, newDynName, fieldPrefix, filterAnns, method, newResult);
|
||||
}
|
||||
}
|
||||
return newResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterMethods(
|
||||
RedkaleClassLoader classLoader, ClassWriter cw, String newDynName, String fieldPrefix) {
|
||||
for (AsmMethodBoost item : items) {
|
||||
if (item != null) {
|
||||
item.doAfterMethods(classLoader, cw, newDynName, fieldPrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doConstructorMethod(
|
||||
RedkaleClassLoader classLoader,
|
||||
ClassWriter cw,
|
||||
MethodVisitor mv,
|
||||
String newDynName,
|
||||
String fieldPrefix,
|
||||
boolean remote) {
|
||||
for (AsmMethodBoost item : items) {
|
||||
if (item != null) {
|
||||
item.doConstructorMethod(classLoader, cw, mv, newDynName, fieldPrefix, remote);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInstance(RedkaleClassLoader classLoader, ResourceFactory resourceFactory, T service) {
|
||||
for (AsmMethodBoost item : items) {
|
||||
if (item != null) {
|
||||
item.doInstance(classLoader, resourceFactory, service);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class MethodParamClassVisitor extends ClassVisitor {
|
||||
|
||||
private Class serviceType;
|
||||
|
||||
private final Map<String, AsmMethodBean> methodBeanMap;
|
||||
|
||||
public MethodParamClassVisitor(int api, Class serviceType, final Map<String, AsmMethodBean> methodBeanMap) {
|
||||
super(api);
|
||||
this.serviceType = serviceType;
|
||||
this.methodBeanMap = methodBeanMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(
|
||||
int methodAccess,
|
||||
String methodName,
|
||||
String methodDesc,
|
||||
String methodSignature,
|
||||
String[] methodExceptions) {
|
||||
super.visitMethod(api, methodName, methodDesc, methodSignature, methodExceptions);
|
||||
if (java.lang.reflect.Modifier.isStatic(methodAccess)) {
|
||||
return null;
|
||||
}
|
||||
String key = methodName + ":" + methodDesc;
|
||||
if (methodBeanMap.containsKey(key)) {
|
||||
return null;
|
||||
}
|
||||
AsmMethodBean bean =
|
||||
new AsmMethodBean(methodAccess, methodName, methodDesc, methodSignature, methodExceptions);
|
||||
List<AsmMethodParam> paramList = bean.getParams();
|
||||
methodBeanMap.put(key, bean);
|
||||
return new MethodVisitor(Opcodes.ASM6) {
|
||||
@Override
|
||||
public void visitParameter(String paramName, int paramAccess) {
|
||||
paramList.add(new AsmMethodParam(paramName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitLocalVariable(
|
||||
String varName, String varDesc, String varSignature, Label start, Label end, int varIndex) {
|
||||
if (varIndex < 1) {
|
||||
return;
|
||||
}
|
||||
int size = paramList.size();
|
||||
// index并不会按顺序执行
|
||||
if (varIndex > size) {
|
||||
for (int i = size; i < varIndex; i++) {
|
||||
paramList.add(new AsmMethodParam(" ", varDesc, varSignature));
|
||||
}
|
||||
paramList.set(varIndex - 1, new AsmMethodParam(varName, varDesc, varSignature));
|
||||
}
|
||||
paramList.set(varIndex - 1, new AsmMethodParam(varName, varDesc, varSignature));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// 返回的List中参数列表可能会比方法参数量多,因为方法内的临时变量也会存入list中, 所以需要list的元素集合比方法的参数多
|
||||
static Map<String, AsmMethodBean> getMethodParamNames(Map<String, AsmMethodBean> map, Class clazz) {
|
||||
String n = clazz.getName();
|
||||
byte[] bs = RedkaleClassLoader.getDynClassBytes(n);
|
||||
if (bs == null) {
|
||||
InputStream in = clazz.getResourceAsStream(n.substring(n.lastIndexOf('.') + 1) + ".class");
|
||||
if (in == null) {
|
||||
return map;
|
||||
}
|
||||
try {
|
||||
bs = Utility.readBytesThenClose(in);
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
try {
|
||||
new ClassReader(bs).accept(new MethodParamClassVisitor(Opcodes.ASM6, clazz, map), 0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// do nothing
|
||||
}
|
||||
Class superClass = clazz.getSuperclass();
|
||||
if (superClass == null || superClass == Object.class) { // 接口的getSuperclass为null
|
||||
return map;
|
||||
}
|
||||
return getMethodParamNames(map, superClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user