mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
Compare commits
1069 Commits
v2.0
...
c148fc156a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c148fc156a | ||
|
|
8c096cba8d | ||
|
|
088cec8adf | ||
|
|
85ff6a9910 | ||
|
|
cab5beaca7 | ||
|
|
fc8069a250 | ||
|
|
924e705dca | ||
|
|
049ba453d1 | ||
|
|
4aa261e8f7 | ||
|
|
914a6620f5 | ||
|
|
3dcee7057d | ||
|
|
0467631319 | ||
|
|
a11df90255 | ||
|
|
596e4fe756 | ||
|
|
37219e4ae6 | ||
|
|
adaa3e1db8 | ||
|
|
88ad5a2c19 | ||
|
|
b45dc2ec25 | ||
|
|
67b17da06f | ||
|
|
b25a280ebb | ||
|
|
cc026e75a3 | ||
|
|
7216b56a56 | ||
|
|
a326e880a1 | ||
|
|
92c6d21855 | ||
|
|
2335157f6e | ||
|
|
6c3b01c3c5 | ||
|
|
8faea60191 | ||
|
|
28a16d9878 | ||
|
|
dd3cf18e27 | ||
|
|
65d03dc014 | ||
|
|
7912fd81bd | ||
|
|
e2175e5b9d | ||
|
|
c0e119f8e0 | ||
|
|
fa77b2a08c | ||
|
|
a222c24796 | ||
|
|
08f4b877ce | ||
|
|
aa607d135c | ||
|
|
6d34cdb8a3 | ||
|
|
d47352253e | ||
|
|
61cbd470e1 | ||
|
|
b3ef4adfed | ||
|
|
856c471472 | ||
|
|
bec5600f16 | ||
|
|
5b485e7934 | ||
|
|
73a752d3ab | ||
|
|
1899a832b9 | ||
|
|
e6796c0954 | ||
|
|
4987289a98 | ||
|
|
18409922a5 | ||
|
|
3dca02b306 | ||
|
|
75f3275e15 | ||
|
|
b2e4a7046b | ||
|
|
60618c1da9 | ||
|
|
3b499b1344 | ||
|
|
8984ecba86 | ||
|
|
0953a9c0b2 | ||
|
|
fcff9dfdea | ||
|
|
d1cb4e1f71 | ||
|
|
68ef1297cb | ||
|
|
b79f01e051 | ||
|
|
095f3a126f | ||
|
|
ce94a9d620 | ||
|
|
2a73de34f0 | ||
|
|
8694501a7e | ||
|
|
4dfc3d766e | ||
|
|
0680d1ed1f | ||
|
|
493dee03c8 | ||
|
|
3992b1e666 | ||
|
|
c855884ebd | ||
|
|
19c457ae5f | ||
|
|
1a3751ab71 | ||
|
|
af8d62e5e2 | ||
|
|
cf03781bd7 | ||
|
|
fa2a28e877 | ||
|
|
e2f1b31735 | ||
|
|
488aafb683 | ||
|
|
735273d69f | ||
|
|
f2a587c2f9 | ||
|
|
4f7bcef44c | ||
|
|
393a9326c8 | ||
|
|
33a52c8166 | ||
|
|
b44e0e4de6 | ||
|
|
3fa4901d57 | ||
|
|
2dca6f0a12 | ||
|
|
78e61d89ba | ||
|
|
4908b6230b | ||
|
|
660162038a | ||
|
|
f6d4f5c6e3 | ||
|
|
1580c1e672 | ||
|
|
6ff45b2644 | ||
|
|
ae77c82304 | ||
|
|
41c2d6fc2a | ||
|
|
d0e9e07e9c | ||
|
|
210626b21f | ||
|
|
85ab6236e7 | ||
|
|
0037e65ca0 | ||
|
|
adec3f0608 | ||
|
|
e7adf59b88 | ||
|
|
21a17945fa | ||
|
|
b7abcd8374 | ||
|
|
2eeb642f07 | ||
|
|
4512af436d | ||
|
|
6a8964f086 | ||
|
|
75b2eb067d | ||
|
|
2eaabefeac | ||
|
|
c3ab80967c | ||
|
|
892e3ac822 | ||
|
|
e2b4bb0420 | ||
|
|
d6b4806e43 | ||
|
|
7df1b02476 | ||
|
|
6d9cbe218c | ||
|
|
302299bbb0 | ||
|
|
437301d5d9 | ||
|
|
dc121ff4aa | ||
|
|
c4cda3f4ad | ||
|
|
e067c04464 | ||
|
|
af03fefc83 | ||
|
|
2d49f2a56e | ||
|
|
2af351f898 | ||
|
|
a709c8f06e | ||
|
|
b00775f988 | ||
|
|
48711178ec | ||
|
|
07bb636109 | ||
|
|
24e0fa863e | ||
|
|
fb6d93fbab | ||
|
|
db18477786 | ||
|
|
91575613a8 | ||
|
|
a5354083b9 | ||
|
|
1665fa2793 | ||
|
|
df8d6bcd33 | ||
|
|
2fecc6273b | ||
|
|
8b252709a4 | ||
|
|
b2cb085f21 | ||
|
|
1b1bc96bd5 | ||
|
|
a416d55780 | ||
|
|
1994aff544 | ||
|
|
b18eced03d | ||
|
|
ee2fef02f8 | ||
|
|
ad954dacb7 | ||
|
|
10de4eb96d | ||
|
|
a5b612c8e4 | ||
|
|
ebc848b5b5 | ||
|
|
f31c207551 | ||
|
|
dd338b56da | ||
|
|
7c3d7b384c | ||
|
|
0647ca8b66 | ||
|
|
f3477f75e6 | ||
|
|
22fa7ac6f6 | ||
|
|
924aafae86 | ||
|
|
5280fb5a0d | ||
|
|
d3c6ba2598 | ||
|
|
08308d61c7 | ||
|
|
356b451b2a | ||
|
|
a606973cbe | ||
|
|
19fb27502b | ||
|
|
d7b309afd9 | ||
|
|
d9bfc3e322 | ||
|
|
74045776d6 | ||
|
|
5fcec99e6c | ||
|
|
102a5ac575 | ||
|
|
3786f3671d | ||
|
|
49e6fbf2ff | ||
|
|
81a8192de7 | ||
|
|
a366d09659 | ||
|
|
2fe7341fa7 | ||
|
|
a3615e5c6c | ||
|
|
50b538ec80 | ||
|
|
68eac98acf | ||
|
|
d4bae9745c | ||
|
|
23ae0eb43b | ||
|
|
308d497d74 | ||
|
|
7af254ee51 | ||
|
|
2ad13c9f72 | ||
|
|
56d50d10e9 | ||
|
|
0b21d15f26 | ||
|
|
7421d7ccce | ||
|
|
84ba2dbd93 | ||
|
|
55447c72e9 | ||
|
|
26c63520f2 | ||
|
|
8b52b90670 | ||
|
|
05ca78e82f | ||
|
|
b155059d66 | ||
|
|
f8ad7ea3ce | ||
|
|
feff419641 | ||
|
|
33a0806cbe | ||
|
|
230e2bb3f4 | ||
|
|
24d9ccba40 | ||
|
|
dc24ed81b8 | ||
|
|
504a4e8e66 | ||
|
|
775234dabe | ||
|
|
7fdd20c054 | ||
|
|
1eeed86b65 | ||
|
|
7c9903e057 | ||
|
|
20dd6d37ea | ||
|
|
89a04423cd | ||
|
|
c42b4cad02 | ||
|
|
4b21a3bc48 | ||
|
|
1ef82d75b1 | ||
|
|
c10a3b6dbb | ||
|
|
b93c9bfc5d | ||
|
|
cd5556d188 | ||
|
|
1126e2234f | ||
|
|
dce91a03ef | ||
|
|
8dff14a6cc | ||
|
|
3462c58ce4 | ||
|
|
6c3e88ee6d | ||
|
|
da2e5a2d93 | ||
|
|
12c51fc8e3 | ||
|
|
736b6348bc | ||
|
|
6317e902e3 | ||
|
|
94590a008d | ||
|
|
8b5acaf341 | ||
|
|
8eb22e86e0 | ||
|
|
853040cd42 | ||
|
|
17364e2699 | ||
|
|
9f48ff40d2 | ||
|
|
f93fc98b4f | ||
|
|
c03a671de8 | ||
|
|
6d6d5140fe | ||
|
|
f016006224 | ||
|
|
abcc045cad | ||
|
|
d76fab1d0c | ||
|
|
a0d2b383ef | ||
|
|
af33456ca8 | ||
|
|
3d2f9aa9c6 | ||
|
|
a8be0ccb35 | ||
|
|
f646bfc0f5 | ||
|
|
6efd427f79 | ||
|
|
04a042c585 | ||
|
|
ee3f03f1f1 | ||
|
|
b1a67a113e | ||
|
|
bc1c1dbfa7 | ||
|
|
7a112c7317 | ||
|
|
d2bd73b4dc | ||
|
|
a211d93092 | ||
|
|
a9938302f0 | ||
|
|
6e5d7a6dab | ||
|
|
7a3892a77a | ||
|
|
e0a5e704b0 | ||
|
|
d936ce76b1 | ||
|
|
f2320d356d | ||
|
|
b50e79bbde | ||
|
|
295b5d5cfd | ||
|
|
8f4ac612c8 | ||
|
|
b3f9e1f2de | ||
|
|
bcbc9d7adc | ||
|
|
6421f68964 | ||
|
|
652f4372c0 | ||
|
|
cff5fe93a5 | ||
|
|
c759728269 | ||
|
|
58e07ba142 | ||
|
|
43b336d26b | ||
|
|
8eeb73eabb | ||
|
|
98c3e4b48a | ||
|
|
839366f2b0 | ||
|
|
65cf05fddb | ||
|
|
a9a8f94ae2 | ||
|
|
1617c74d4d | ||
|
|
01c1505340 | ||
|
|
c2708f2ba4 | ||
|
|
48a0d5bc9d | ||
|
|
a057b7a4b9 | ||
|
|
0e4a1c872c | ||
|
|
5faa1af464 | ||
|
|
0dfbb5fbf3 | ||
|
|
3b4f1d7937 | ||
|
|
07c2e08e4a | ||
|
|
e03cebac57 | ||
|
|
0c36921587 | ||
|
|
53b84261f8 | ||
|
|
11de8aa17b | ||
|
|
f250c6ee93 | ||
|
|
fd89356ed7 | ||
|
|
ad54d36385 | ||
|
|
3cf088a0d8 | ||
|
|
22fac34b82 | ||
|
|
7f0f842651 | ||
|
|
1124c27f06 | ||
|
|
adbba02cb8 | ||
|
|
5b6dc85b62 | ||
|
|
62eec4df51 | ||
|
|
11d8274462 | ||
|
|
732071ef58 | ||
|
|
afa23c2111 | ||
|
|
4bf9f3cff5 | ||
|
|
8c7986acdb | ||
|
|
52d50e4e47 | ||
|
|
f0bfff1ff3 | ||
|
|
a37315d513 | ||
|
|
479755650c | ||
|
|
73256dfeaf | ||
|
|
767f7c8621 | ||
|
|
12d335b9ac | ||
|
|
bc7a743998 | ||
|
|
ca36f9fc6e | ||
|
|
8345eed709 | ||
|
|
2af8e817bd | ||
|
|
fcb58876e7 | ||
|
|
d4c61daf9b | ||
|
|
31523867e7 | ||
|
|
a8daa1f044 | ||
|
|
858f576fa3 | ||
|
|
c960108b12 | ||
|
|
59b867dcca | ||
|
|
b9fdc4de87 | ||
|
|
d504a7df2f | ||
|
|
2a675aa304 | ||
|
|
d6df1fe7b3 | ||
|
|
428255ddcf | ||
|
|
a92ca233aa | ||
|
|
537105b2a9 | ||
|
|
d56ef651e3 | ||
|
|
9d21b1627b | ||
|
|
467557fef3 | ||
|
|
c8a108b93a | ||
|
|
5408af9d1f | ||
|
|
e7b9e12d15 | ||
|
|
a4b714b95a | ||
|
|
4ae26c2f86 | ||
|
|
b51c127eb7 | ||
|
|
c5eb7458c8 | ||
|
|
347a717d5c | ||
|
|
0484c63d9b | ||
|
|
4d21c11acd | ||
|
|
8fdb3c4d14 | ||
|
|
0ef63207f4 | ||
|
|
1295177393 | ||
|
|
67a6841043 | ||
|
|
d4930f6a88 | ||
|
|
c98f452431 | ||
|
|
fb35360f81 | ||
|
|
5e20f99a99 | ||
|
|
9f90b4eba7 | ||
|
|
ce82095f04 | ||
|
|
9ebd484f46 | ||
|
|
cc0e184314 | ||
|
|
87009e72bf | ||
|
|
d6a2028ec3 | ||
|
|
ef28473992 | ||
|
|
1543fb801b | ||
|
|
e753cea03e | ||
|
|
78332c2786 | ||
|
|
4b1351ef21 | ||
|
|
f12baad00c | ||
|
|
81d3c90bbc | ||
|
|
0d58ecb09c | ||
|
|
1e16852a3c | ||
|
|
57e63a184d | ||
|
|
20476e9dd1 | ||
|
|
95aa343805 | ||
|
|
a573c4b10d | ||
|
|
5964dc81ab | ||
|
|
721701274b | ||
|
|
78c356a9f3 | ||
|
|
b622675522 | ||
|
|
912f607062 | ||
|
|
1297d094cb | ||
|
|
ccfc4f7ad7 | ||
|
|
8ee702e4a2 | ||
|
|
5945537ade | ||
|
|
2051819d2d | ||
|
|
570d468814 | ||
|
|
5fd16ff806 | ||
|
|
17246d8a27 | ||
|
|
6d404a1f3b | ||
|
|
7417c1d473 | ||
|
|
9b35679ba6 | ||
|
|
7af84cb923 | ||
|
|
8242cec9ac | ||
|
|
5b8cf9701f | ||
|
|
a52d455032 | ||
|
|
d28f81dc68 | ||
|
|
7475cff47d | ||
|
|
d6e6b99316 | ||
|
|
5a48c5dba7 | ||
|
|
ad7133f39d | ||
|
|
fca189fa73 | ||
|
|
6cda8cb28f | ||
|
|
9c29907d57 | ||
|
|
b3d462e873 | ||
|
|
cdcc466300 | ||
|
|
12ca164c44 | ||
|
|
1d1b9501b7 | ||
|
|
24376681b8 | ||
|
|
386f3eb016 | ||
|
|
2a6a74ead5 | ||
|
|
01e4e619e6 | ||
|
|
f6f07f255a | ||
|
|
2eaa52c7aa | ||
|
|
86b9e675b5 | ||
|
|
b76cd4d0e2 | ||
|
|
a4ad2b8b3c | ||
|
|
103bf66f77 | ||
|
|
5dbed46552 | ||
|
|
97500fbccb | ||
|
|
70f306418f | ||
|
|
6bc77169fe | ||
|
|
742f3106a2 | ||
|
|
9ec4d19384 | ||
|
|
68040827e2 | ||
|
|
75d91c7d1d | ||
|
|
95c1286f06 | ||
|
|
f63a76f661 | ||
|
|
6644d3077d | ||
|
|
54d1c58338 | ||
|
|
9da3b34b9c | ||
|
|
1ec806ae80 | ||
|
|
4df2b72b30 | ||
|
|
a0ce434163 | ||
|
|
5053510236 | ||
|
|
d14f27e5eb | ||
|
|
72cf2edf03 | ||
|
|
8c6035c8f9 | ||
|
|
f7b761275c | ||
|
|
6f7b02372e | ||
|
|
0b6166663c | ||
|
|
723583a3b8 | ||
|
|
6a017dddd1 | ||
|
|
6f5c149ba0 | ||
|
|
5d44d2b5a6 | ||
|
|
7c3425ee9b | ||
|
|
6133563bf3 | ||
|
|
2d67d7c8e2 | ||
|
|
55a7a90bab | ||
|
|
a70d5ee2ab | ||
|
|
e5c938c64a | ||
|
|
ccf84377f8 | ||
|
|
dc8938ab2f | ||
|
|
bc05b453df | ||
|
|
368a9044be | ||
|
|
242101ae6e | ||
|
|
0b08933a8c | ||
|
|
99932d91c0 | ||
|
|
59387216b4 | ||
|
|
66f5f11069 | ||
|
|
33694c860f | ||
|
|
4c5c1d1f78 | ||
|
|
14cd3e2c6a | ||
|
|
34487865f3 | ||
|
|
2444fcc646 | ||
|
|
8b3d75a6a0 | ||
|
|
4feb0adb6e | ||
|
|
82535c82d3 | ||
|
|
7a09412ecb | ||
|
|
a30622b460 | ||
|
|
df0813089e | ||
|
|
e059ed9c7f | ||
|
|
105c9d99c8 | ||
|
|
a65eaf880d | ||
|
|
04706403d3 | ||
|
|
c43565ef43 | ||
|
|
089ebaf9c5 | ||
|
|
6f3c3f1b7e | ||
|
|
2dc5e7319a | ||
|
|
b5d2628b71 | ||
|
|
9460acd91b | ||
|
|
480d49f2b3 | ||
|
|
1358b21c3a | ||
|
|
480bba4f9d | ||
|
|
a14c06a1f1 | ||
|
|
2e1ef93aa6 | ||
|
|
14c412113f | ||
|
|
642cfbda0a | ||
|
|
0e13296752 | ||
|
|
8fac26edca | ||
|
|
b0b16e1fc5 | ||
|
|
297193b6ce | ||
|
|
99e14d0e29 | ||
|
|
dbca691746 | ||
|
|
e66f65b257 | ||
|
|
5f60a37d8a | ||
|
|
d30e136c1d | ||
|
|
9c122a4bfe | ||
|
|
1761a4f588 | ||
|
|
b60fa5c920 | ||
|
|
4191f5ca5c | ||
|
|
a00482d5d7 | ||
|
|
2610869e9c | ||
|
|
155eb55953 | ||
|
|
8541ca99af | ||
|
|
9cb15ec2ae | ||
|
|
27d46fc0a4 | ||
|
|
5800ac6b9e | ||
|
|
c57ec64e63 | ||
|
|
1a1d6562d2 | ||
|
|
255101f6f7 | ||
|
|
bd30f3d53a | ||
|
|
0c24d59a2c | ||
|
|
4557ca0ace | ||
|
|
18c0b3dec4 | ||
|
|
674b7a0b04 | ||
|
|
d511f1bd94 | ||
|
|
fa75346763 | ||
|
|
79b1717f9a | ||
|
|
6b4d03cb8d | ||
|
|
2d7fd84c57 | ||
|
|
d0a19e5b6f | ||
|
|
14db619b20 | ||
|
|
c166bb0a89 | ||
|
|
4a60f91994 | ||
|
|
d601b5781e | ||
|
|
8223a5dcc4 | ||
|
|
b40e5c19b2 | ||
|
|
5ebc354cfc | ||
|
|
ca5d3e3556 | ||
|
|
c44cf9b9f6 | ||
|
|
cde32b45c0 | ||
|
|
6274bfcd8c | ||
|
|
29fac802f3 | ||
|
|
37597a85d5 | ||
|
|
f46aa17c77 | ||
|
|
6c70291d0a | ||
|
|
14ff957bde | ||
|
|
34439a6532 | ||
|
|
db07f4a354 | ||
|
|
820ea549e3 | ||
|
|
2b42931486 | ||
|
|
9bf5dfdc5f | ||
|
|
a3f8d03611 | ||
|
|
b6f21f451d | ||
|
|
418b74b39d | ||
|
|
919190dedc | ||
|
|
81ccdc49ec | ||
|
|
b006fad9b6 | ||
|
|
74a02ca3dc | ||
|
|
efaaacabb0 | ||
|
|
3410150e28 | ||
|
|
054fd7546f | ||
|
|
1797831afc | ||
|
|
24be94be5e | ||
|
|
33ba42a759 | ||
|
|
1e7b9fb94c | ||
|
|
45e5133e97 | ||
|
|
7713948f5c | ||
|
|
b64507d64a | ||
|
|
b06db48891 | ||
|
|
43f1681f51 | ||
|
|
5c90f0bbb7 | ||
|
|
c1b223e3a7 | ||
|
|
0d7b23a44f | ||
|
|
f91f931c0b | ||
|
|
329e124db0 | ||
|
|
c64b5edf20 | ||
|
|
c049d29eee | ||
|
|
7804d0bd2f | ||
|
|
7901116744 | ||
|
|
eb5df8834b | ||
|
|
711aa763b9 | ||
|
|
3c7018b38a | ||
|
|
2a5091c6f4 | ||
|
|
b6222b9755 | ||
|
|
4db3e90872 | ||
|
|
19ac02fd70 | ||
|
|
9d094587b3 | ||
|
|
2bc2b08bc7 | ||
|
|
f64a5dd5ca | ||
|
|
9f21dbbc5c | ||
|
|
05ce7d92a9 | ||
|
|
2e17d9c084 | ||
|
|
82779f3c70 | ||
|
|
b1bc3ceb27 | ||
|
|
e2a7df4a2c | ||
|
|
2a452a00e0 | ||
|
|
4d4123243c | ||
|
|
2c1bdc9670 | ||
|
|
08885f65cd | ||
|
|
961825d25c | ||
|
|
337d1bab02 | ||
|
|
b6a71fe988 | ||
|
|
786df8e278 | ||
|
|
451d218f4b | ||
|
|
adcb6194c8 | ||
|
|
334f79efe4 | ||
|
|
73b38b143b | ||
|
|
ef541b220b | ||
|
|
173c0e384f | ||
|
|
360ccc7adc | ||
|
|
df760d3504 | ||
|
|
0beecf7ea1 | ||
|
|
aa2821a19d | ||
|
|
2288fa218e | ||
|
|
6adc583c38 | ||
|
|
52111e4bf9 | ||
|
|
68db4092ed | ||
|
|
acf8d9719f | ||
|
|
92e5d2a97a | ||
|
|
e165901506 | ||
|
|
3187b1c46e | ||
|
|
662dec2fe2 | ||
|
|
3901695a6f | ||
|
|
d0a5c25b5d | ||
|
|
9c5c6c6be7 | ||
|
|
d8da1b796c | ||
|
|
e2dfdb2236 | ||
|
|
a8eba6949e | ||
|
|
3e907e8da7 | ||
|
|
af1b557bc8 | ||
|
|
e6c3bd1ce5 | ||
|
|
046d25f35d | ||
|
|
d20d4ffa16 | ||
|
|
76f2273d0b | ||
|
|
dda78c95b7 | ||
|
|
ebbeb047be | ||
|
|
ebd7fd59d0 | ||
|
|
c20c2c221f | ||
|
|
ee33dbdc0e | ||
|
|
5d8d4fa530 | ||
|
|
2021028cad | ||
|
|
7fcb1b2e0a | ||
|
|
f4a2f909a7 | ||
|
|
328630fe5d | ||
|
|
f7ae7e29d1 | ||
|
|
e46ea3ebac | ||
|
|
d565fa4883 | ||
|
|
a627108dfe | ||
|
|
829451f05e | ||
|
|
cae41a8da2 | ||
|
|
a4099cf645 | ||
|
|
0a104689ed | ||
|
|
97d0226c78 | ||
|
|
3a04dda55d | ||
|
|
94310c4f3d | ||
|
|
39e7d8a84b | ||
|
|
e1037ac125 | ||
|
|
a10384c009 | ||
|
|
ab8215d1ce | ||
|
|
524982c7bd | ||
|
|
d6188aa009 | ||
|
|
7e8b08a58c | ||
|
|
14771f0ab4 | ||
|
|
97c0603269 | ||
|
|
a58c430858 | ||
|
|
cd4119b26a | ||
|
|
ea20fa3ce2 | ||
|
|
3b54208ac9 | ||
|
|
d2de744c3f | ||
|
|
655249d67a | ||
|
|
80a890549d | ||
|
|
5da1979ce6 | ||
|
|
642512aa91 | ||
|
|
4a32a8e725 | ||
|
|
bb30ae7086 | ||
|
|
34a6f2e1f1 | ||
|
|
0e51d1e7b1 | ||
|
|
40bdf7b100 | ||
|
|
57f51249b6 | ||
|
|
dcc5dc0d16 | ||
|
|
e87a818706 | ||
|
|
67df97d5a7 | ||
|
|
3f8fd0a0f8 | ||
|
|
961fe9a5f1 | ||
|
|
22f156bbb7 | ||
|
|
22c22c4246 | ||
|
|
994cd62c7a | ||
|
|
1e4ed04a65 | ||
|
|
139b25639e | ||
|
|
13800738cb | ||
|
|
98c538c9e3 | ||
|
|
0e7c45173c | ||
|
|
132b23dc33 | ||
|
|
c3f1dd846c | ||
|
|
7b7abde756 | ||
|
|
aeeb0eb26b | ||
|
|
265a181891 | ||
|
|
22663e1b43 | ||
|
|
24be1a436e | ||
|
|
370c53edfa | ||
|
|
f112133ddf | ||
|
|
93ee021b6e | ||
|
|
e57d2ea17c | ||
|
|
ea038a5437 | ||
|
|
329aa68644 | ||
|
|
887430874d | ||
|
|
52f8693e1d | ||
|
|
8057dcc4fc | ||
|
|
66e0f9a53d | ||
|
|
7a35c474d6 | ||
|
|
892065003d | ||
|
|
ede8353503 | ||
|
|
60796ca8fb | ||
|
|
25e9112ccc | ||
|
|
f6c5c91eb1 | ||
|
|
740da06972 | ||
|
|
2a363f9c17 | ||
|
|
3c649a8814 | ||
|
|
a144bf2bff | ||
|
|
83ee4223be | ||
|
|
8f6c864e96 | ||
|
|
12209ae5a4 | ||
|
|
4e0301a7b2 | ||
|
|
00fa1c3158 | ||
|
|
04edd66199 | ||
|
|
d8896c9054 | ||
|
|
dd70c1950e | ||
|
|
954d208ac6 | ||
|
|
98d25fa16e | ||
|
|
3af7af265b | ||
|
|
436c2154ad | ||
|
|
42e8baa85c | ||
|
|
0dff71bd4d | ||
|
|
20ce9da509 | ||
|
|
a044b0d205 | ||
|
|
698200ecc2 | ||
|
|
883d89ee0b | ||
|
|
fb9a480f3c | ||
|
|
e288710251 | ||
|
|
1019aa58ce | ||
|
|
e9621469b2 | ||
|
|
57c4910605 | ||
|
|
9920957796 | ||
|
|
e798f46876 | ||
|
|
caa7537607 | ||
|
|
8b23c97fdb | ||
|
|
af49ad54f6 | ||
|
|
816479e092 | ||
|
|
7e72849d05 | ||
|
|
99206a5d65 | ||
|
|
114c9f3af6 | ||
|
|
e14fb70c26 | ||
|
|
201149a131 | ||
|
|
2bc80c4c07 | ||
|
|
ee7607bcca | ||
|
|
7e2dbc5608 | ||
|
|
8eac239e48 | ||
|
|
6650397e38 | ||
|
|
1ca4c26d81 | ||
|
|
0b0da91139 | ||
|
|
3d47ec2e73 | ||
|
|
1f21102204 | ||
|
|
58b4600144 | ||
|
|
6146d63f2c | ||
|
|
dbf42739ca | ||
|
|
57f56c2769 | ||
|
|
5c130cfda6 | ||
|
|
df284ff6f5 | ||
|
|
1b7550f9a2 | ||
|
|
195df24b4b | ||
|
|
68de85aa5f | ||
|
|
8b6784d8e2 | ||
|
|
b73c14400c | ||
|
|
54922af7db | ||
|
|
23944b2f9c | ||
|
|
9d0240b831 | ||
|
|
1aef90d506 | ||
|
|
41b7e62b02 | ||
|
|
70a5e47b66 | ||
|
|
8722e184d6 | ||
|
|
819ad04e3e | ||
|
|
ab89a5efcc | ||
|
|
2fbb10bfd2 | ||
|
|
3fba7d5d92 | ||
|
|
d8d8758cfa | ||
|
|
5ba3e031f2 | ||
|
|
cc658b9ece | ||
|
|
1ed627798e | ||
|
|
bc4c7a02d3 | ||
|
|
17493a2a15 | ||
|
|
63d7e816ff | ||
|
|
fc7bd9a35d | ||
|
|
7ebcb4bf8a | ||
|
|
67feb9947e | ||
|
|
af479c7838 | ||
|
|
2f3949d732 | ||
|
|
79c8b17bee | ||
|
|
12d3e3d0d8 | ||
|
|
fc33d88334 | ||
|
|
09b49f46e8 | ||
|
|
379ea3f6bc | ||
|
|
84b975ac7f | ||
|
|
c7b6858433 | ||
|
|
33bae9509b | ||
|
|
d0cc511bbc | ||
|
|
d855fd67b4 | ||
|
|
7f802e8274 | ||
|
|
b48e6fb19a | ||
|
|
de4dd01d97 | ||
|
|
d04a93d75d | ||
|
|
fb8eac7064 | ||
|
|
f26c32881c | ||
|
|
2419815bc1 | ||
|
|
cb9fa33b5a | ||
|
|
eb69f8e614 | ||
|
|
1eb9581d36 | ||
|
|
7789620a15 | ||
|
|
c3ba1a092c | ||
|
|
3ef167e416 | ||
|
|
8e1a9a2433 | ||
|
|
cd73787dc7 | ||
|
|
1624a63cff | ||
|
|
db4a8b0e90 | ||
|
|
d989e4a717 | ||
|
|
a664602e28 | ||
|
|
f44b453d76 | ||
|
|
1298d02379 | ||
|
|
92a93f7cf8 | ||
|
|
94a6a5a7d9 | ||
|
|
2ca3f9b640 | ||
|
|
286bedaa40 | ||
|
|
edd1cfaf43 | ||
|
|
accd7ebc93 | ||
|
|
b7b755f0c6 | ||
|
|
87fcfe0c56 | ||
|
|
89a9188dd4 | ||
|
|
45b0e82432 | ||
|
|
5d3125463c | ||
|
|
1ab84cb0e5 | ||
|
|
e58c159225 | ||
|
|
2edb885ae5 | ||
|
|
b037ee9caf | ||
|
|
27d137a4ae | ||
|
|
25f94db9c5 | ||
|
|
457ec516f7 | ||
|
|
29cd58d3f4 | ||
|
|
262d06ea3a | ||
|
|
0f733b89dc | ||
|
|
265b680a61 | ||
|
|
2b7bb59d12 | ||
|
|
41fa57d778 | ||
|
|
6ad1df166b | ||
|
|
24e7ed38a5 | ||
|
|
fd0e9202d8 | ||
|
|
0922410a22 | ||
|
|
4edaa14e28 | ||
|
|
a2dede8448 | ||
|
|
dc83ba0356 | ||
|
|
60c815ab76 | ||
|
|
48cf4250b4 | ||
|
|
ede8456ea0 | ||
|
|
4dc51fae53 | ||
|
|
192f58e690 | ||
|
|
852b32eabb | ||
|
|
5e167eb6e1 | ||
|
|
31aefd15f7 | ||
|
|
716405d22b | ||
|
|
3c33fe21fa | ||
|
|
e1e05b761a | ||
|
|
1804d4fce6 | ||
|
|
0dcc955ced | ||
|
|
53076612f8 | ||
|
|
f0f2cde0f9 | ||
|
|
0546504cae | ||
|
|
17652c3a2f | ||
|
|
e96d12975f | ||
|
|
a9b51070ed | ||
|
|
a8c7b9102b | ||
|
|
ca04b583a9 | ||
|
|
99390fda05 | ||
|
|
be12108139 | ||
|
|
1dec234174 | ||
|
|
3fc684b346 | ||
|
|
12d8add3e4 | ||
|
|
372b77c662 | ||
|
|
5891960756 | ||
|
|
c5899bfbf0 | ||
|
|
4125f44179 | ||
|
|
09a0058379 | ||
|
|
3fdcac939a | ||
|
|
4cc4e8a8fa | ||
|
|
dee4653b9b | ||
|
|
2c610dc465 | ||
|
|
2c323ca3ff | ||
|
|
a95be9d418 | ||
|
|
a445462153 | ||
|
|
843f08984b | ||
|
|
2b3820223c | ||
|
|
a5d0028b39 | ||
|
|
449704180b | ||
|
|
8a18873b81 | ||
|
|
199228f6cb | ||
|
|
6d0b4f5d16 | ||
|
|
4cc0e2650c | ||
|
|
06074571f5 | ||
|
|
2698ea58d4 | ||
|
|
8c9eb7d6b6 | ||
|
|
79472708d9 | ||
|
|
586908b4d7 | ||
|
|
a7bac940a6 | ||
|
|
e100b0b940 | ||
|
|
161a6249e9 | ||
|
|
e4a6e5ef19 | ||
|
|
7ceb5c3c8f | ||
|
|
bfd33f2412 | ||
|
|
2ddf834552 | ||
|
|
743e59db7a | ||
|
|
88aff5d8a7 | ||
|
|
dbeded1c09 | ||
|
|
e4b8898d0d | ||
|
|
62d7ce5aa9 | ||
|
|
7fd4860ff2 | ||
|
|
ff979772fe | ||
|
|
dddbaeb5c0 | ||
|
|
3c5893074b | ||
|
|
2cde98a01b | ||
|
|
22a825718f | ||
|
|
a0bcaab926 | ||
|
|
1c023fbe7c | ||
|
|
81bf4d28ef | ||
|
|
963d2a0443 | ||
|
|
10de0df04e | ||
|
|
1066713524 | ||
|
|
bcdf270bb0 | ||
|
|
0673eab57e | ||
|
|
5094bba352 | ||
|
|
7523e0475f | ||
|
|
6beb5cadb2 | ||
|
|
5174536744 | ||
|
|
e526e33030 | ||
|
|
e8b19f863a | ||
|
|
91a2f7b16b | ||
|
|
3a9d45a7dd | ||
|
|
073d90ed17 | ||
|
|
689d5b1612 | ||
|
|
c615248ad6 | ||
|
|
20f85a37cf | ||
|
|
b199db3822 | ||
|
|
f5bf01159a | ||
|
|
2c05324108 | ||
|
|
6b36b32e39 | ||
|
|
1abf802a09 | ||
|
|
2bb0eb1edb | ||
|
|
1a12d56cc3 | ||
|
|
45e5395550 | ||
|
|
692cc84693 | ||
|
|
b812e01100 | ||
|
|
594329127f | ||
|
|
cdc813c453 | ||
|
|
3d7fe2a288 | ||
|
|
93920707b5 | ||
|
|
84ffdaefe2 | ||
|
|
0422f858f7 | ||
|
|
01c3019cea | ||
|
|
24fb0b712a | ||
|
|
8fdcd576c9 | ||
|
|
07df90f99b | ||
|
|
7bd762267b | ||
|
|
512c6acebc | ||
|
|
ad928ee719 | ||
|
|
04d8c97c62 | ||
|
|
9fc5d74f6e | ||
|
|
f245105b58 | ||
|
|
c0cc0bdf84 | ||
|
|
c04ea0221a | ||
|
|
d52f6673bc | ||
|
|
dce8ee4236 | ||
|
|
f64f806a42 | ||
|
|
fbbc91ea0a | ||
|
|
c2bd0ace6e | ||
|
|
6b74ea676c | ||
|
|
86c7a763bc | ||
|
|
3eac04311f | ||
|
|
679756c633 | ||
|
|
2115edcfb4 | ||
|
|
8acb322d49 | ||
|
|
f4f89f9de6 | ||
|
|
5d1701fd69 | ||
|
|
fec24d6785 | ||
|
|
00e2c7f04d | ||
|
|
0e21fab978 | ||
|
|
4ec6d51aca | ||
|
|
15a4a5350d | ||
|
|
9277d7173d | ||
|
|
35f8665dac | ||
|
|
8601b26cff | ||
|
|
eda2ec10f4 | ||
|
|
fc48704057 | ||
|
|
00345099cf | ||
|
|
155b585ae5 | ||
|
|
0ffefeb420 | ||
|
|
dbadce31c6 | ||
|
|
857a5b26e7 | ||
|
|
ca97fc0b5d | ||
|
|
293b855866 | ||
|
|
f9d537b567 | ||
|
|
d42a6751e3 | ||
|
|
f124236a64 | ||
|
|
6704db8108 | ||
|
|
179062e6e5 | ||
|
|
397e821824 | ||
|
|
6b25828113 | ||
|
|
bd7ae4e96b | ||
|
|
5f5c4e8415 | ||
|
|
66e8b59e26 | ||
|
|
a7d93d38ce | ||
|
|
ba3549e824 | ||
|
|
e2c4ca4922 | ||
|
|
1305507bf4 | ||
|
|
c789ef147d | ||
|
|
1ffee7ac0b | ||
|
|
7401297236 | ||
|
|
6f1dd1125b | ||
|
|
82eeb86d60 | ||
|
|
f5cee45345 | ||
|
|
1524005060 | ||
|
|
b70e8ad81e | ||
|
|
a2c265848d | ||
|
|
19e5f11fd3 | ||
|
|
8d99adceb2 | ||
|
|
f1bc33e80d | ||
|
|
6bd7e183f6 | ||
|
|
7d94113d24 | ||
|
|
97ebab0c67 | ||
|
|
cca4eeae72 | ||
|
|
bf544deeaa | ||
|
|
a9a1200e77 | ||
|
|
43bc0ca39b | ||
|
|
c0251e5cda | ||
|
|
56ea7c9caf | ||
|
|
17d5751452 | ||
|
|
8b5a16c692 | ||
|
|
5524d5a0bc | ||
|
|
40696a10e3 | ||
|
|
9bfe3e5328 | ||
|
|
165a957d67 | ||
|
|
4a48702ccb | ||
|
|
41cf67da6d | ||
|
|
4126f634ba | ||
|
|
337f6fd3db | ||
|
|
8ae4f5e90b | ||
|
|
7e2b00b98b | ||
|
|
57200e5f5d | ||
|
|
bb5b7466db | ||
|
|
c7908e1b8e | ||
|
|
76aa1cda49 | ||
|
|
59b8df2e90 | ||
|
|
5967f7f11b | ||
|
|
3ad7742838 | ||
|
|
3a400df707 | ||
|
|
4a608d4d21 | ||
|
|
d9ebddc669 | ||
|
|
7ecba12d3e | ||
|
|
30aa0c4fca | ||
|
|
99e1dfccf5 | ||
|
|
d0fe6f3462 | ||
|
|
c404c280f7 | ||
|
|
7bdd20ec24 | ||
|
|
e0ba2ba3c5 | ||
|
|
e76d087b21 | ||
|
|
394bde5e8e | ||
|
|
ad690bac17 | ||
|
|
e056ab0cc2 | ||
|
|
7549c904f2 | ||
|
|
0788a57bec | ||
|
|
eb48d6a80f | ||
|
|
1b70ef990b | ||
|
|
e48d75afcd | ||
|
|
c91194f848 | ||
|
|
a90b576116 | ||
|
|
9aee5142fd | ||
|
|
230d4170e1 | ||
|
|
2c250c1d1b | ||
|
|
7302189208 | ||
|
|
a40d691e31 | ||
|
|
719e1fdfa9 | ||
|
|
5734607e03 | ||
|
|
e6e673e9b4 | ||
|
|
6eda1dee45 | ||
|
|
ff3bc4b25e | ||
|
|
aa13a1d88e | ||
|
|
beaf17ddd2 | ||
|
|
029fe5c63f | ||
|
|
bea2f32781 | ||
|
|
3b88fe2b6f | ||
|
|
97a0326abd | ||
|
|
83460dfcb6 | ||
|
|
6ee4efa284 | ||
|
|
1c06db8999 | ||
|
|
5fa7b3f579 | ||
|
|
bb305dfb6f | ||
|
|
5585a4e807 |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
custom: http://doc.ruoyi.vip/ruoyi-cloud/other/donate.html
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,6 +25,8 @@ target/
|
|||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
|
||||||
|
### JRebel ###
|
||||||
|
rebel.xml
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
nbproject/private/
|
nbproject/private/
|
||||||
build/*
|
build/*
|
||||||
@@ -37,6 +39,7 @@ nbdist/
|
|||||||
# Others
|
# Others
|
||||||
*.log
|
*.log
|
||||||
*.xml.versionsBackup
|
*.xml.versionsBackup
|
||||||
|
*.swp
|
||||||
|
|
||||||
!*/build/*.java
|
!*/build/*.java
|
||||||
!*/build/*.html
|
!*/build/*.html
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -1,13 +1,25 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||||
|
</p>
|
||||||
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.5</h1>
|
||||||
|
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
||||||
|
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.5-brightgreen.svg"></a>
|
||||||
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## 平台简介
|
## 平台简介
|
||||||
|
|
||||||
|
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||||
|
|
||||||
* 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。
|
* 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。
|
||||||
* 后端采用Spring Boot、Spring Cloud & Alibaba。
|
* 后端采用Spring Boot、Spring Cloud & Alibaba。
|
||||||
* 注册中心、配置中心选型Nacos,权限认证使用OAuth2。
|
* 注册中心、配置中心选型Nacos,权限认证使用Redis。
|
||||||
* 流量控制框架选型Sentinel。
|
* 流量控制框架选型Sentinel,分布式事务选型Seata。
|
||||||
* 感谢[ruoyi-cloud-design](https://gitee.com/zhangmrit/ruoyi-cloud),[pig](https://gitee.com/log4j/pig)。
|
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Cloud-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Cloud-Vue3),保持同步更新。
|
||||||
* 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
* 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
||||||
* 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
* 阿里云优惠券:[点我进入](http://aly.ruoyi.vip),腾讯云优惠券:[点我进入](http://txy.ruoyi.vip)
|
||||||
|
|
||||||
|
|
||||||
## 系统模块
|
## 系统模块
|
||||||
|
|
||||||
@@ -21,14 +33,18 @@ com.ruoyi
|
|||||||
├── ruoyi-common // 通用模块
|
├── ruoyi-common // 通用模块
|
||||||
│ └── ruoyi-common-core // 核心模块
|
│ └── ruoyi-common-core // 核心模块
|
||||||
│ └── ruoyi-common-datascope // 权限范围
|
│ └── ruoyi-common-datascope // 权限范围
|
||||||
|
│ └── ruoyi-common-datasource // 多数据源
|
||||||
│ └── ruoyi-common-log // 日志记录
|
│ └── ruoyi-common-log // 日志记录
|
||||||
│ └── ruoyi-common-redis // 缓存服务
|
│ └── ruoyi-common-redis // 缓存服务
|
||||||
|
│ └── ruoyi-common-seata // 分布式事务
|
||||||
│ └── ruoyi-common-security // 安全模块
|
│ └── ruoyi-common-security // 安全模块
|
||||||
|
│ └── ruoyi-common-sensitive // 数据脱敏
|
||||||
│ └── ruoyi-common-swagger // 系统接口
|
│ └── ruoyi-common-swagger // 系统接口
|
||||||
├── ruoyi-modules // 业务模块
|
├── ruoyi-modules // 业务模块
|
||||||
│ └── ruoyi-system // 系统模块 [9201]
|
│ └── ruoyi-system // 系统模块 [9201]
|
||||||
│ └── ruoyi-gen // 代码生成 [9202]
|
│ └── ruoyi-gen // 代码生成 [9202]
|
||||||
│ └── ruoyi-job // 定时任务 [9203]
|
│ └── ruoyi-job // 定时任务 [9203]
|
||||||
|
│ └── ruoyi-file // 文件服务 [9300]
|
||||||
├── ruoyi-visual // 图形化管理模块
|
├── ruoyi-visual // 图形化管理模块
|
||||||
│ └── ruoyi-visual-monitor // 监控中心 [9100]
|
│ └── ruoyi-visual-monitor // 监控中心 [9100]
|
||||||
├──pom.xml // 公共依赖
|
├──pom.xml // 公共依赖
|
||||||
@@ -36,7 +52,7 @@ com.ruoyi
|
|||||||
|
|
||||||
## 架构图
|
## 架构图
|
||||||
|
|
||||||
<img src="https://oscimg.oschina.net/oscnet/up-aaa2d885b0fba37e52b56f0948edde1c4fe.png"/>
|
<img src="https://oscimg.oschina.net/oscnet/up-82e9722ecb846786405a904bafcf19f73f3.png"/>
|
||||||
|
|
||||||
## 内置功能
|
## 内置功能
|
||||||
|
|
||||||
@@ -74,27 +90,27 @@ com.ruoyi
|
|||||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/707825ad3f29de74a8d6d02fbd73ad631ea.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/46be40cc6f01aa300eed53a19b5012bf484.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/4284796d4cea240d181b8f2201813dda710.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/3ecfac87a049f7fe36abbcaafb2c40d36cf.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-4148b24f58660a9dc347761e4cf6162f28f.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/71c2d48905221a09a728df4aff4160b8607.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/c14c1ee9a64a6a9c2c22f67d43198767dbe.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/fdea1d8bb8625c27bf964176a2c8ebc6945.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/509d2708cfd762b6e6339364cac1cc1970c.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-f1fd681cc9d295db74e85ad6d2fe4389454.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -102,12 +118,12 @@ com.ruoyi
|
|||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d69a19493e5aff7ecdd5d02410862bcea40.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-ff9e3066561574aca73005c5730c6a41f15.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## 若依微服务交流群
|
## 若依微服务交流群
|
||||||
|
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) 点击按钮入群。
|
QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) [](https://jq.qq.com/?_wv=1027&k=FqImHgH2) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G4jZ4EtdT50PhnMBudTnEwgonxkXOscJ&authKey=FkGHYfoTKlGE6wHdKdjH9bVoOgQjtLP9WM%2Fj7pqGY1msoqw9uxDiBo39E2mLgzYg&noverify=0&group_code=128355254) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=irnwcXhbLOQEv1g-TwGifjNTA_f4wZiA&authKey=4bpzEwhcUY%2FvsPDHvzYn6xfoS%2FtOArvZ%2BGXzfr7O0%2FEqLfkKA%2BuCDXlzHIFg8t93&noverify=0&group_code=179219821) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=lx1uEdEDuxeM7rUvF3qmlFdqKqdJ5Z-R&authKey=rgyPW9yhhh4IIURKVFa6NgP3qiqH04WAzrJ0trsgkr3pjzm6sKIOGyA58oOjoj%2FJ&noverify=0&group_code=158753145) 点击按钮入群。
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 清理生成路径。
|
echo [信息] 清理工程target生成路径。
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
%~d0
|
%~d0
|
||||||
|
|||||||
14
bin/run-auth.bat
Normal file
14
bin/run-auth.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Auth工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-auth/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-gateway.bat
Normal file
14
bin/run-gateway.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Gateway工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-gateway/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-modules-file.bat
Normal file
14
bin/run-modules-file.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Modules-File工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-modules/ruoyi-file/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-modules-gen.bat
Normal file
14
bin/run-modules-gen.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Modules-Gen工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-modules/ruoyi-gen/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-modules-job.bat
Normal file
14
bin/run-modules-job.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Modules-Job工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-modules/ruoyi-job/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-modules-system.bat
Normal file
14
bin/run-modules-system.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Modules-System工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-modules/ruoyi-system/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
14
bin/run-monitor.bat
Normal file
14
bin/run-monitor.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 使用Jar命令运行Monitor工程。
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd ../ruoyi-visual/ruoyi-monitor/target
|
||||||
|
|
||||||
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
54
deployment/README.md
Normal file
54
deployment/README.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Kubernates 部署Ruoyi-Cloud项目
|
||||||
|
|
||||||
|
本部署所用到的k8s配置均为简易版,仅作为初步入门学习使用,有不合理的地方还请见谅。
|
||||||
|
|
||||||
|
### 后期考虑功能:
|
||||||
|
* HPA自动扩缩容
|
||||||
|
* MySQL主从、Redis集群、服务集群
|
||||||
|
* ELK日志收集
|
||||||
|
|
||||||
|
## 容器分布
|
||||||
|
~~~
|
||||||
|
namespace
|
||||||
|
├── redis
|
||||||
|
│ └── redis // StatefulSet
|
||||||
|
├── kube-ruoyi
|
||||||
|
│ └── ruoyi-mysql // Deployment
|
||||||
|
│ └── ruoyi-nacos
|
||||||
|
│ └── ruoyi-nginx
|
||||||
|
│ └── ruoyi-sentinel
|
||||||
|
│ └── ruoyi-gateway
|
||||||
|
│ └── ruoyi-auth
|
||||||
|
│ └── ruoyi-system
|
||||||
|
│ └── ruoyi-gen
|
||||||
|
│ └── ruoyi-job
|
||||||
|
│ └── ruoyi-file
|
||||||
|
│ └── ruoyi-monitor
|
||||||
|
│ └── elasticsearch
|
||||||
|
│ └── skywalking
|
||||||
|
│ └── skywalking-ui
|
||||||
|
├── minio
|
||||||
|
│ └── minio
|
||||||
|
├── monitor-sa
|
||||||
|
│ └── node-exporter
|
||||||
|
│ └── prometheus-server
|
||||||
|
│ └── monitoring-grafana
|
||||||
|
~~~
|
||||||
|
|
||||||
|
## 部署顺序及要点
|
||||||
|
1. Redis
|
||||||
|
2. MySQL,手动Dockerfile打包镜像,初始化准备好的数据脚本。使用了Secret加密密码等配置。
|
||||||
|
3. Nacos, 配置好MODE=standalone,使用configMap设置数据库。
|
||||||
|
4. Sentinel
|
||||||
|
5. Gateway,本服务需要用Dockerfile打包镜像,否则会报错。其他RuoYi服务可以直接使用spring-boot的image命令一键打包生成镜像[每个服务都有使用额外的SpringBoot配置文件(bootstrap-k8s.yml)加入到服务中,同时在原配置文件中把active换成${SPRING_PROFILES_ACTIVE:dev}后再打包,以读取deployment的env变量。启动服务前记得提前在nacos中克隆,新增服务配置以把dev改成k8s(deployment中启动的环境是SPRING_PROFILES_ACTIVE=k8s),修改好Redis地址(redis.redis)、MySQL地址(ruoyi-mysql)、Sentinel地址(ruoyi-sentinel)]
|
||||||
|
6. Nginx,部署之前先打包好前端静态文件,使用本地磁盘方式挂载到容器 (注:我使用的是Window的DockerDesktop启动的K8s,挂载磁盘路径必须带/run/desktop/mnt/host),修改好nginx配置ruoyi-gateway就可以启动(启动后输入localhost:30080就可以访问前端项目)。
|
||||||
|
7. Auth
|
||||||
|
8. System,配置好后就可以登录了
|
||||||
|
9. Gen
|
||||||
|
10. Job
|
||||||
|
11. File,改成minio服务之后需要修改静态文件中读取文件的端口地址
|
||||||
|
12. Monitor,需要修改前端静态文件中的Monitor端口地址
|
||||||
|
13. Minio,挂载本地文件。修改ruoyi-file服务中@Primary注释改到MinioServer上以使用Minio服务(记得修改nacos配置)
|
||||||
|
14. Elasticsearch,部署文件一并放入到了skywalking文件夹中
|
||||||
|
15. skywalking,需要在Java服务中使用agent进行跟踪(自制agent镜像然后使用initContainers方式挂载到同一个容器,模板放到了agent-in-server文件)
|
||||||
|
16. skywalking-ui
|
||||||
54
deployment/minio/minio-deployment.yaml
Normal file
54
deployment/minio/minio-deployment.yaml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: minio
|
||||||
|
name: minio
|
||||||
|
namespace: minio
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: minio
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: minio
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: minio
|
||||||
|
image: minio/minio
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 9000
|
||||||
|
name: tcp
|
||||||
|
- containerPort: 9090
|
||||||
|
protocol: TCP
|
||||||
|
name: console
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- minio server /data --console-address ":9090"
|
||||||
|
env:
|
||||||
|
- name: MINIO_ACCESS_KEY
|
||||||
|
value: minioadmin
|
||||||
|
- name: MINIO_SECRET_KEY
|
||||||
|
value: minioadmin
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /minio/health/ready
|
||||||
|
port: 9000
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: minio-data
|
||||||
|
volumes:
|
||||||
|
- name: minio-data
|
||||||
|
hostPath:
|
||||||
|
path: /run/desktop/mnt/host/c/k8sVolume/minio/data
|
||||||
|
type: Directory
|
||||||
4
deployment/minio/minio-namespace.yaml
Normal file
4
deployment/minio/minio-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: minio
|
||||||
20
deployment/minio/minio-svc.yaml
Normal file
20
deployment/minio/minio-svc.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: minio
|
||||||
|
namespace: minio
|
||||||
|
labels:
|
||||||
|
app: minio
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- port: 9000
|
||||||
|
name: tcp
|
||||||
|
targetPort: 9000
|
||||||
|
- port: 9090
|
||||||
|
name: console
|
||||||
|
targetPort: 9090
|
||||||
|
nodePort: 30090
|
||||||
|
selector:
|
||||||
|
app: minio
|
||||||
4
deployment/monitor/monitor-namespace.yaml
Normal file
4
deployment/monitor/monitor-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: monitor-sa
|
||||||
63
deployment/monitor/node-exporter.yaml
Normal file
63
deployment/monitor/node-exporter.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: node-exporter
|
||||||
|
namespace: monitor-sa
|
||||||
|
labels:
|
||||||
|
name: node-exporter
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: node-exporter
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: node-exporter
|
||||||
|
spec:
|
||||||
|
hostPID: true
|
||||||
|
hostIPC: true
|
||||||
|
hostNetwork: true # 共享宿主机网络和进程
|
||||||
|
containers:
|
||||||
|
- name: node-exporter
|
||||||
|
image: prom/node-exporter:v0.16.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- containerPort: 9100 # 容器暴露端口为9100
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 0.15
|
||||||
|
securityContext:
|
||||||
|
privileged: true # 开启特权模式
|
||||||
|
args:
|
||||||
|
- --path.procfs
|
||||||
|
- /host/proc
|
||||||
|
- --path.sysfs
|
||||||
|
- /host/sys
|
||||||
|
- --collector.filesystem.ignored-mount-points
|
||||||
|
- '"^/(sys|proc|dev|host|etc)($|/)"'
|
||||||
|
volumeMounts: # 挂载宿主机目录以收集宿主机信息
|
||||||
|
- name: dev
|
||||||
|
mountPath: /host/dev
|
||||||
|
- name: proc
|
||||||
|
mountPath: /host/proc
|
||||||
|
- name: sys
|
||||||
|
mountPath: /host/sys
|
||||||
|
- name: rootfs
|
||||||
|
mountPath: /rootfs
|
||||||
|
tolerations: # 定义容忍度,使其可调度到默认有污点的master
|
||||||
|
- key: "node-role.kubernetes.io/master"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
volumes: # 定义存储卷
|
||||||
|
- name: proc
|
||||||
|
hostPath:
|
||||||
|
path: /proc
|
||||||
|
- name: dev
|
||||||
|
hostPath:
|
||||||
|
path: /dev
|
||||||
|
- name: sys
|
||||||
|
hostPath:
|
||||||
|
path: /sys
|
||||||
|
- name: rootfs
|
||||||
|
hostPath:
|
||||||
|
path: /
|
||||||
169
deployment/monitor/prometheus-config.yaml
Normal file
169
deployment/monitor/prometheus-config.yaml
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap #
|
||||||
|
metadata:
|
||||||
|
name: prometheus-config
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
addonmanager.kubernetes.io/mode: EnsureExists
|
||||||
|
data:
|
||||||
|
prometheus.yml: |
|
||||||
|
rule_files:
|
||||||
|
- /etc/config/rules/*.rules
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: prometheus
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost:9090
|
||||||
|
|
||||||
|
- job_name: kubernetes-nodes
|
||||||
|
scrape_interval: 30s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- 192.168.73.135:9100
|
||||||
|
- 192.168.73.138:9100
|
||||||
|
- 192.168.73.139:9100
|
||||||
|
- 192.168.73.140:9100
|
||||||
|
|
||||||
|
- job_name: kubernetes-apiservers
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: endpoints
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: default;kubernetes;https
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_namespace
|
||||||
|
- __meta_kubernetes_service_name
|
||||||
|
- __meta_kubernetes_endpoint_port_name
|
||||||
|
scheme: https
|
||||||
|
tls_config:
|
||||||
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
|
insecure_skip_verify: true
|
||||||
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
|
|
||||||
|
- job_name: kubernetes-nodes-kubelet
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: node
|
||||||
|
relabel_configs:
|
||||||
|
- action: labelmap
|
||||||
|
regex: __meta_kubernetes_node_label_(.+)
|
||||||
|
scheme: https
|
||||||
|
tls_config:
|
||||||
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
|
insecure_skip_verify: true
|
||||||
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
|
|
||||||
|
- job_name: kubernetes-nodes-cadvisor
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: node
|
||||||
|
relabel_configs:
|
||||||
|
- action: labelmap
|
||||||
|
regex: __meta_kubernetes_node_label_(.+)
|
||||||
|
- target_label: __metrics_path__
|
||||||
|
replacement: /metrics/cadvisor
|
||||||
|
scheme: https
|
||||||
|
tls_config:
|
||||||
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
|
insecure_skip_verify: true
|
||||||
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
|
|
||||||
|
- job_name: kubernetes-service-endpoints
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: endpoints
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: true
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_service_annotation_prometheus_io_scrape
|
||||||
|
- action: replace
|
||||||
|
regex: (https?)
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_service_annotation_prometheus_io_scheme
|
||||||
|
target_label: __scheme__
|
||||||
|
- action: replace
|
||||||
|
regex: (.+)
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_service_annotation_prometheus_io_path
|
||||||
|
target_label: __metrics_path__
|
||||||
|
- action: replace
|
||||||
|
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||||
|
replacement: $1:$2
|
||||||
|
source_labels:
|
||||||
|
- __address__
|
||||||
|
- __meta_kubernetes_service_annotation_prometheus_io_port
|
||||||
|
target_label: __address__
|
||||||
|
- action: labelmap
|
||||||
|
regex: __meta_kubernetes_service_label_(.+)
|
||||||
|
- action: replace
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_namespace
|
||||||
|
target_label: kubernetes_namespace
|
||||||
|
- action: replace
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_service_name
|
||||||
|
target_label: kubernetes_name
|
||||||
|
|
||||||
|
- job_name: kubernetes-services
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: service
|
||||||
|
metrics_path: /probe
|
||||||
|
params:
|
||||||
|
module:
|
||||||
|
- http_2xx
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: true
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_service_annotation_prometheus_io_probe
|
||||||
|
- source_labels:
|
||||||
|
- __address__
|
||||||
|
target_label: __param_target
|
||||||
|
- replacement: blackbox
|
||||||
|
target_label: __address__
|
||||||
|
- source_labels:
|
||||||
|
- __param_target
|
||||||
|
target_label: instance
|
||||||
|
- action: labelmap
|
||||||
|
regex: __meta_kubernetes_service_label_(.+)
|
||||||
|
- source_labels:
|
||||||
|
- __meta_kubernetes_namespace
|
||||||
|
target_label: kubernetes_namespace
|
||||||
|
- source_labels:
|
||||||
|
- __meta_kubernetes_service_name
|
||||||
|
target_label: kubernetes_name
|
||||||
|
|
||||||
|
- job_name: kubernetes-pods
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: pod
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: true
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
|
||||||
|
- action: replace
|
||||||
|
regex: (.+)
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_pod_annotation_prometheus_io_path
|
||||||
|
target_label: __metrics_path__
|
||||||
|
- action: replace
|
||||||
|
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||||
|
replacement: $1:$2
|
||||||
|
source_labels:
|
||||||
|
- __address__
|
||||||
|
- __meta_kubernetes_pod_annotation_prometheus_io_port
|
||||||
|
target_label: __address__
|
||||||
|
- action: labelmap
|
||||||
|
regex: __meta_kubernetes_pod_label_(.+)
|
||||||
|
- action: replace
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_namespace
|
||||||
|
target_label: kubernetes_namespace
|
||||||
|
- action: replace
|
||||||
|
source_labels:
|
||||||
|
- __meta_kubernetes_pod_name
|
||||||
|
target_label: kubernetes_pod_name
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- static_configs:
|
||||||
|
- targets: ["alertmanager:80"]
|
||||||
1
deployment/mysql/db/readme.txt
Normal file
1
deployment/mysql/db/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放sql目录下的所有脚本,用于docker自动执行。
|
||||||
5
deployment/mysql/dockerfile
Normal file
5
deployment/mysql/dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM mysql:5.7
|
||||||
|
|
||||||
|
# 执行sql脚本
|
||||||
|
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||||
47
deployment/mysql/mysql-deployment.yaml
Normal file
47
deployment/mysql/mysql-deployment.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-mysql #指定deployment的名字
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels:
|
||||||
|
app: ruoyi-mysql-local
|
||||||
|
spec: #规约
|
||||||
|
replicas: 1 #pod的副本数量,就是希望创建多少个pod的副本.可p选字段。它的默认值是1。
|
||||||
|
selector: #selector 字段定义 Deployment 如何查找要管理的 Pods。必须匹配 .spec.template.metadata.labels,否则请求会被 API 拒绝。
|
||||||
|
matchLabels:
|
||||||
|
app: ruoyi-mysql-local
|
||||||
|
template: #Deployment Pod 模板;它和 Pod 的语法规则完全相同。 只是这里它是嵌套的,因此不需要 apiVersion 或 kind。
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ruoyi-mysql-local
|
||||||
|
spec: #pod模板规约
|
||||||
|
containers: #容器
|
||||||
|
- name: ruoyi-mysql #容器的名称
|
||||||
|
image: ruoyi/mysql:5.7 #容器使用的镜像
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-local-data #pv的name
|
||||||
|
mountPath: /var/lib/mysql #MySQL容器的数据都是存在这个目录的,要对这个目录做数据持久化
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom: # Read environment variables from kubernetes secrets
|
||||||
|
secretKeyRef:
|
||||||
|
name: ruoyi-mysql-secret
|
||||||
|
key: mysql-root-pass
|
||||||
|
- name: MYSQL_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ruoyi-mysql-secret
|
||||||
|
key: mysql-user
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ruoyi-mysql-secret
|
||||||
|
key: mysql-password
|
||||||
|
volumes:
|
||||||
|
- name: mysql-local-data #pv的name
|
||||||
|
hostPath:
|
||||||
|
path: /run/desktop/mnt/host/c/k8sVolume/mysql/data
|
||||||
|
type: Directory
|
||||||
|
restartPolicy: Always #Deployment 中的 Pod 模板必须指定适当的标签和适当的重新启动策略。只有 .spec.template.spec.restartPolicy 等于 Always 才是被允许的,这也是在没有指定时的默认设置
|
||||||
29
deployment/mysql/mysql-pv-pvc.yaml
Normal file
29
deployment/mysql/mysql-pv-pvc.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: mysql-pv
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 3Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain # 手动删除
|
||||||
|
storageClassName: hostpath #表明这个pv所属的storageClass
|
||||||
|
hostPath:
|
||||||
|
path: /mnt/data #节点上卷的完整路径。(必须是存在的路径,不然容器无法创建,deployment会报错)可以是目录或块设备(磁盘、分区…)。
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mysql-pvc-local
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
accessModes: #访问模式 申领在请求具有特定访问模式的存储时,使用与卷相同的访问模式约定。
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem #卷模式
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: hostpath # 此处须显式设置空字符串或指定值,否则会被设置为默认的 StorageClass
|
||||||
10
deployment/mysql/mysql-secret.yaml
Normal file
10
deployment/mysql/mysql-secret.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-mysql-secret
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
type: Opaque #base-64加密
|
||||||
|
data:
|
||||||
|
mysql-root-pass: cGFzc3dvcmQ=
|
||||||
|
mysql-user: YWRtaW4=
|
||||||
|
mysql-password: MTIzNDU2
|
||||||
12
deployment/mysql/mysql-svc.yaml
Normal file
12
deployment/mysql/mysql-svc.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-mysql
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
||||||
|
nodePort: 30060
|
||||||
|
selector:
|
||||||
|
app: ruoyi-mysql-local # 该 Service 会将所有具有标签 app: mysql-labels-app暴露到一个抽象的 Service 端口上(targetPort:容器接收流量的端口;port:可任意取值的抽象的 Service 端口,其他 Pod 通过该端口访问 Service
|
||||||
|
type: NodePort
|
||||||
31
deployment/nacos/nacos-config.yaml
Normal file
31
deployment/nacos/nacos-config.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nacos-config
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
data:
|
||||||
|
application.properties: |
|
||||||
|
spring.datasource.platform=mysql
|
||||||
|
db.num=1
|
||||||
|
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
|
db.user=root
|
||||||
|
db.password=password
|
||||||
|
nacos.naming.empty-service.auto-clean=true
|
||||||
|
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||||
|
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||||
|
management.endpoints.web.exposure.include=*
|
||||||
|
management.metrics.export.elastic.enabled=false
|
||||||
|
management.metrics.export.influx.enabled=false
|
||||||
|
server.tomcat.accesslog.enabled=true
|
||||||
|
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||||
|
server.tomcat.basedir=/home/ruoyi/nacos/tomcat/logs
|
||||||
|
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
|
nacos.core.auth.system.type=nacos
|
||||||
|
nacos.core.auth.enabled=false
|
||||||
|
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
|
||||||
|
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
|
nacos.core.auth.caching.enabled=true
|
||||||
|
nacos.core.auth.enable.userAgentAuthWhite=false
|
||||||
|
nacos.core.auth.server.identity.key=serverIdentity
|
||||||
|
nacos.core.auth.server.identity.value=security
|
||||||
|
nacos.istio.mcp.server.enabled=false
|
||||||
37
deployment/nacos/nacos-deployment.yaml
Normal file
37
deployment/nacos/nacos-deployment.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nacos
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ruoyi-nacos
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ruoyi-nacos
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-nacos
|
||||||
|
image: nacos/nacos-server
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8848
|
||||||
|
name: client
|
||||||
|
- containerPort: 9848
|
||||||
|
name: client-rpc
|
||||||
|
- containerPort: 9849
|
||||||
|
name: raft-rpc
|
||||||
|
env:
|
||||||
|
- name: MODE
|
||||||
|
value: standalone
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /home/nacos/conf/application.properties
|
||||||
|
name: nacos-conf
|
||||||
|
subPath: application.properties
|
||||||
|
volumes:
|
||||||
|
- name: nacos-conf
|
||||||
|
configMap:
|
||||||
|
name: ruoyi-nacos-config
|
||||||
23
deployment/nacos/nacos-svc.yaml
Normal file
23
deployment/nacos/nacos-svc.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nacos
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels:
|
||||||
|
app: ruoyi-nacos
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- port: 8848
|
||||||
|
name: server
|
||||||
|
targetPort: 8848
|
||||||
|
nodePort: 30848
|
||||||
|
- port: 9848
|
||||||
|
name: client-rpc
|
||||||
|
targetPort: 9848
|
||||||
|
- port: 9849
|
||||||
|
name: raft-rpc
|
||||||
|
targetPort: 9849
|
||||||
|
selector:
|
||||||
|
app: ruoyi-nacos
|
||||||
37
deployment/nginx/nginx-config.yaml
Normal file
37
deployment/nginx/nginx-config.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nginx-config
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
data:
|
||||||
|
nginx.conf: |
|
||||||
|
worker_processes 1;
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
location / {
|
||||||
|
root /home/ruoyi/projects/ruoyi-ui;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
location /prod-api/{
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://ruoyi-gateway:8080/;
|
||||||
|
}
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
53
deployment/nginx/nginx-deployment.yaml
Normal file
53
deployment/nginx/nginx-deployment.yaml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nginx
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ruoyi-nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ruoyi-nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-nginx
|
||||||
|
image: nginx
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/nginx/nginx.conf
|
||||||
|
name: nginx-conf
|
||||||
|
subPath: nginx.conf
|
||||||
|
- mountPath: /home/ruoyi/projects/ruoyi-ui
|
||||||
|
name: local-path #/usr/share/nginx/html 挂载到volumes中server+path
|
||||||
|
volumes:
|
||||||
|
- name: nginx-conf
|
||||||
|
configMap:
|
||||||
|
name: ruoyi-nginx-config
|
||||||
|
- name: local-path
|
||||||
|
hostPath:
|
||||||
|
path: /run/desktop/mnt/host/c/k8sVolume/dist
|
||||||
|
type: Directory
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-nginx
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels:
|
||||||
|
name: ruoyi-nginx
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
nodePort: 30080
|
||||||
|
selector:
|
||||||
|
app: ruoyi-nginx
|
||||||
|
|
||||||
58
deployment/redis/redis-config.yaml
Normal file
58
deployment/redis/redis-config.yaml
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: redis-config
|
||||||
|
namespace: redis
|
||||||
|
data:
|
||||||
|
redis.conf: |-
|
||||||
|
maxmemory 1000mb
|
||||||
|
maxmemory-policy allkeys-lru
|
||||||
|
protected-mode no
|
||||||
|
tcp-backlog 511
|
||||||
|
daemonize no
|
||||||
|
supervised no
|
||||||
|
dir /data
|
||||||
|
pidfile /data/redis_6379.pid
|
||||||
|
port 6379
|
||||||
|
loglevel notice
|
||||||
|
logfile ""
|
||||||
|
databases 16
|
||||||
|
stop-writes-on-bgsave-error yes
|
||||||
|
rdbcompression yes
|
||||||
|
rdbchecksum yes
|
||||||
|
dbfilename dump.rdb
|
||||||
|
replica-serve-stale-data yes
|
||||||
|
replica-read-only no
|
||||||
|
repl-diskless-sync no
|
||||||
|
repl-diskless-sync-delay 5
|
||||||
|
repl-disable-tcp-nodelay no
|
||||||
|
replica-priority 100
|
||||||
|
lazyfree-lazy-eviction no
|
||||||
|
lazyfree-lazy-expire no
|
||||||
|
lazyfree-lazy-server-del no
|
||||||
|
replica-lazy-flush no
|
||||||
|
appendonly no
|
||||||
|
appendfilename "appendonly.aof"
|
||||||
|
appendfsync everysec
|
||||||
|
no-appendfsync-on-rewrite no
|
||||||
|
auto-aof-rewrite-percentage 100
|
||||||
|
auto-aof-rewrite-min-size 64mb
|
||||||
|
aof-load-truncated yes
|
||||||
|
aof-use-rdb-preamble yes
|
||||||
|
lua-time-limit 5000
|
||||||
|
slowlog-log-slower-than 10000
|
||||||
|
slowlog-max-len 128
|
||||||
|
latency-monitor-threshold 0
|
||||||
|
notify-keyspace-events ""
|
||||||
|
set-max-intset-entries 512
|
||||||
|
hll-sparse-max-bytes 3000
|
||||||
|
stream-node-max-bytes 4096
|
||||||
|
stream-node-max-entries 100
|
||||||
|
activerehashing yes
|
||||||
|
client-output-buffer-limit normal 0 0 0
|
||||||
|
client-output-buffer-limit replica 256mb 64mb 60
|
||||||
|
client-output-buffer-limit pubsub 32mb 8mb 60
|
||||||
|
hz 10
|
||||||
|
dynamic-hz yes
|
||||||
|
aof-rewrite-incremental-fsync yes
|
||||||
|
rdb-save-incremental-fsync yes
|
||||||
4
deployment/redis/redis-namespace.yaml
Normal file
4
deployment/redis/redis-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
98
deployment/redis/redis-stateful-set.yaml
Normal file
98
deployment/redis/redis-stateful-set.yaml
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
namespace: redis
|
||||||
|
spec:
|
||||||
|
serviceName: redis
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: config
|
||||||
|
image: redis:7.0.6
|
||||||
|
command: [ "sh", "-c" ]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
cp /tmp/redis/redis.conf /etc/redis/redis.conf
|
||||||
|
|
||||||
|
echo "finding master..."
|
||||||
|
MASTER_FDQN=`hostname -f | sed -e 's/redis-[0-9]\./redis-0./'`
|
||||||
|
if [ "$(redis-cli -h sentinel -p 5000 ping)" != "PONG" ]; then
|
||||||
|
echo "master not found, defaulting to redis-0"
|
||||||
|
if [ "$(hostname)" = "redis-0" ]; then
|
||||||
|
echo "this is redis-0, not updating config..."
|
||||||
|
else
|
||||||
|
echo "updating redis.conf..."
|
||||||
|
echo "\nslaveof $MASTER_FDQN 6379" >> /etc/redis/redis.conf
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "sentinel found, finding master"
|
||||||
|
MASTER="$(redis-cli -h sentinel -p 5000 sentinel get-master-addr-by-name mymaster | grep -E '(^redis-\d{1,})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})')"
|
||||||
|
echo "master found : $MASTER, updating redis.conf"
|
||||||
|
echo "slaveof $MASTER 6379" >> /etc/redis/redis.conf
|
||||||
|
fi
|
||||||
|
volumeMounts:
|
||||||
|
- name: redis-config
|
||||||
|
mountPath: /etc/redis/
|
||||||
|
- name: config
|
||||||
|
mountPath: /tmp/redis/
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: redis:7.0.6
|
||||||
|
command: [ "redis-server" ]
|
||||||
|
args: [ "/etc/redis/redis.conf" ]
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
name: redis
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
- name: redis-config
|
||||||
|
mountPath: /etc/redis/
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 1100Mi
|
||||||
|
requests:
|
||||||
|
memory: 1100Mi
|
||||||
|
volumes:
|
||||||
|
- name: redis-config
|
||||||
|
emptyDir: { }
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: redis-config
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
spec:
|
||||||
|
storageClassName: hostpath
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 500Mi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: redis # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: redis
|
||||||
|
namespace: redis
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: redis # The service exposes Pods with label `app=redis`
|
||||||
|
ports:
|
||||||
|
- name: redis-port
|
||||||
|
port: 6379
|
||||||
|
nodePort: 30079
|
||||||
|
type: NodePort
|
||||||
4
deployment/ruoyi-namespace.yaml
Normal file
4
deployment/ruoyi-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: kube-ruoyi
|
||||||
41
deployment/sentinel/sentinel-deployment.yaml
Normal file
41
deployment/sentinel/sentinel-deployment.yaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-sentinel
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ruoyi-sentinel
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ruoyi-sentinel
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-sentinel
|
||||||
|
image: bladex/sentinel-dashboard
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8858
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: JAVA_TOOL_OPTIONS
|
||||||
|
value: "-Dserver.port=8858 -Dcsp.sentinel.dashboard.server=localhost:8858 -Dproject.name=sentinel-dashboard"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-sentinel
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels:
|
||||||
|
name: ruoyi-sentinel
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- port: 8858
|
||||||
|
targetPort: 8858
|
||||||
|
nodePort: 30858
|
||||||
|
selector:
|
||||||
|
app: ruoyi-sentinel
|
||||||
|
|
||||||
50
deployment/servers/ruoyi-auth-server-k8s-deployment.yaml
Normal file
50
deployment/servers/ruoyi-auth-server-k8s-deployment.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-auth # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-auth
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-auth
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-auth
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-auth-server
|
||||||
|
image: ruoyi-auth:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9200 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-auth
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-auth # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-auth
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-auth # The service exposes Pods with label `app=ruoyi-auth`
|
||||||
|
ports: # Forward incoming connections on port 9200 to the target port 9200
|
||||||
|
- name: http
|
||||||
|
port: 9200
|
||||||
|
targetPort: 9200
|
||||||
50
deployment/servers/ruoyi-gateway-server-k8s-deployment.yaml
Normal file
50
deployment/servers/ruoyi-gateway-server-k8s-deployment.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-gateway # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-gateway
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-gateway
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-gateway
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-gateway-server
|
||||||
|
image: ruoyi-gateway:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-gateway
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-gateway # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-gateway
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-gateway # The service exposes Pods with label `app=ruoyi-gateway`
|
||||||
|
ports: # Forward incoming connections on port 8080 to the target port 8080
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-file # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-file
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-file
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-file
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-file-server
|
||||||
|
image: ruoyi-modules-file:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9300 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-file
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-file # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-file
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-file # The service exposes Pods with label `app=ruoyi-file`
|
||||||
|
ports: # Forward incoming connections on port 9300 to the target port 9300
|
||||||
|
- name: http
|
||||||
|
port: 9300
|
||||||
|
targetPort: 9300
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-gen # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-gen
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-gen
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-gen
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-gen-server
|
||||||
|
image: ruoyi-modules-gen:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9202 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-gen
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-gen # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-gen
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-gen # The service exposes Pods with label `app=ruoyi-gen`
|
||||||
|
ports: # Forward incoming connections on port 9202 to the target port 9202
|
||||||
|
- name: http
|
||||||
|
port: 9202
|
||||||
|
targetPort: 9202
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-job # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-job
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-job
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-job
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-job-server
|
||||||
|
image: ruoyi-modules-job:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9203 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-job
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-job # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-job
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-job # The service exposes Pods with label `app=ruoyi-job`
|
||||||
|
ports: # Forward incoming connections on port 9203 to the target port 9203
|
||||||
|
- name: http
|
||||||
|
port: 9203
|
||||||
|
targetPort: 9203
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-system # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-system
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-system
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-system
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-system-server
|
||||||
|
image: ruoyi-modules-system:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9201 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-system
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-system # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-system
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-system # The service exposes Pods with label `app=ruoyi-system`
|
||||||
|
ports: # Forward incoming connections on port 9201 to the target port 9201
|
||||||
|
- name: http
|
||||||
|
port: 9201
|
||||||
|
targetPort: 9201
|
||||||
50
deployment/servers/ruoyi-monitor-server-k8s-deployment.yaml
Normal file
50
deployment/servers/ruoyi-monitor-server-k8s-deployment.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-monitor # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-monitor
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-monitor
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-monitor
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-monitor-server
|
||||||
|
image: ruoyi-visual-monitor:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9100 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-monitor
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-monitor # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-monitor
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-monitor # The service exposes Pods with label `app=ruoyi-monitor`
|
||||||
|
ports: # Forward incoming connections on port 9100 to the target port 9100
|
||||||
|
- name: http
|
||||||
|
port: 9100
|
||||||
|
targetPort: 9100
|
||||||
37
deployment/servers/ruoyi/gateway/bootstrap-k8s.yml
Normal file
37
deployment/servers/ruoyi/gateway/bootstrap-k8s.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: ${SERVER_NAME}
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- ${NACOS_SHARED_CONFIGS}
|
||||||
|
sentinel:
|
||||||
|
# 取消控制台懒加载
|
||||||
|
eager: true
|
||||||
|
transport:
|
||||||
|
# 控制台地址
|
||||||
|
dashboard: 127.0.0.1:8718
|
||||||
|
# nacos配置持久化
|
||||||
|
datasource:
|
||||||
|
ds1:
|
||||||
|
nacos:
|
||||||
|
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||||
|
dataId: sentinel-ruoyi-gateway
|
||||||
|
groupId: DEFAULT_GROUP
|
||||||
|
data-type: json
|
||||||
|
rule-type: gw-flow
|
||||||
15
deployment/servers/ruoyi/gateway/dockerfile
Normal file
15
deployment/servers/ruoyi/gateway/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
||||||
|
# 启动网关服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
||||||
1
deployment/servers/ruoyi/gateway/jar/readme.txt
Normal file
1
deployment/servers/ruoyi/gateway/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放网关模块打包好的jar文件,用于docker启动应用。
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
apiVersion: apps/v1 # API version
|
||||||
|
kind: Deployment # Type of kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-system # Name of the kubernetes resource
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-system
|
||||||
|
spec:
|
||||||
|
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||||
|
selector:
|
||||||
|
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||||
|
app: ruoyi-system
|
||||||
|
template: # Template for creating the pods in this deployment
|
||||||
|
metadata:
|
||||||
|
labels: # Labels that will be applied to each Pod in this deployment
|
||||||
|
app: ruoyi-system
|
||||||
|
spec: # Spec for the containers that will be run in the Pods
|
||||||
|
containers:
|
||||||
|
- name: ruoyi-system-server
|
||||||
|
image: ruoyi-modules-system:3.6.2
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9201 # The port that the container exposes
|
||||||
|
env: # Environment variables supplied to the Pod
|
||||||
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
|
value: k8s
|
||||||
|
- name: SERVER_NAME
|
||||||
|
value: ruoyi-system
|
||||||
|
- name: NACOS_SERVER
|
||||||
|
value: ruoyi-nacos # nacos svc name
|
||||||
|
- name: NACOS_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_SHARED_CONFIGS
|
||||||
|
value: application-dev.yml
|
||||||
|
- name: JAVA_OPTS
|
||||||
|
value: -javaagent:/javaagent/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=k8s::$(SERVER_NAME) -Dskywalking.collector.backend_service=skywalking:11800
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /javaagent
|
||||||
|
name: agent-jar
|
||||||
|
volumes:
|
||||||
|
- emptyDir: { }
|
||||||
|
name: agent-jar
|
||||||
|
initContainers:
|
||||||
|
# 官网用脚本命令行+args的方式执行多条command语句
|
||||||
|
- command: ['sh']
|
||||||
|
args:
|
||||||
|
- "-c"
|
||||||
|
- |
|
||||||
|
cp -r /opt/skywalking-agent /javaagent
|
||||||
|
chown -R 65534:65534 /javaagent
|
||||||
|
/bin/chmod -R 777 /javaagent
|
||||||
|
image: skywalking-agent:8.14.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: skywalking-agent
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /javaagent
|
||||||
|
name: agent-jar
|
||||||
|
---
|
||||||
|
apiVersion: v1 # API version
|
||||||
|
kind: Service # Type of the kubernetes resource
|
||||||
|
metadata:
|
||||||
|
name: ruoyi-system # Name of the kubernetes resource
|
||||||
|
labels: # Labels that will be applied to this resource
|
||||||
|
app: ruoyi-system
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||||
|
selector:
|
||||||
|
app: ruoyi-system # The service exposes Pods with label `app=ruoyi-system`
|
||||||
|
ports: # Forward incoming connections on port 9201 to the target port 9201
|
||||||
|
- name: http
|
||||||
|
port: 9201
|
||||||
|
targetPort: 9201
|
||||||
17
deployment/skywalking/agent.dockerfile
Normal file
17
deployment/skywalking/agent.dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
## cat Dcokerfile
|
||||||
|
|
||||||
|
FROM docker.io/library/busybox:latest AS base
|
||||||
|
|
||||||
|
# 使用 ADD 下载 java-agent,你也可以使用其他下载命令,或者下载到本地,再 使用 COPY或者ADD 指令添加到 镜像里
|
||||||
|
ADD https://dlcdn.apache.org/skywalking/java-agent/9.0.0/apache-skywalking-java-agent-9.0.0.tgz /tmp/
|
||||||
|
RUN mkdir -p /opt \
|
||||||
|
&& tar -xzf /tmp/apache-skywalking-java-agent-9.0.0.tgz -C /opt/ \
|
||||||
|
&& rm -rf /tmp/*
|
||||||
|
#ADD skywalking-agent.tar.gz /opt/
|
||||||
|
RUN mkdir -p /javaagent
|
||||||
|
|
||||||
|
## java-agent 使用 方法
|
||||||
|
## https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/readme/
|
||||||
|
## java -javaagent:/opt/skywalking-agent/skywalking-agent.jar -jar yourApp.jar
|
||||||
|
## -javaagent:/opt/skywalking-agent/skywalking-agent.jar=agent.service_name=yourAppName,collector.backend_service=127.0.0.1:11800
|
||||||
|
## -javaagent:/opt/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=yourAppName -Dskywalking.collector.backend_service=127.0.0.1:11800
|
||||||
44
deployment/skywalking/elasticsearch-deployment.yaml
Normal file
44
deployment/skywalking/elasticsearch-deployment.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: elasticsearch
|
||||||
|
name: elasticsearch
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: elasticsearch
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: elasticsearch
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: elasticsearch
|
||||||
|
image: elasticsearch:7.14.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 9200
|
||||||
|
name: cluster-node
|
||||||
|
env:
|
||||||
|
- name: discovery.type
|
||||||
|
value: single-node
|
||||||
|
- name: TZ
|
||||||
|
value: Asia/Shanghai
|
||||||
|
- name: ES_JAVA_OPTS
|
||||||
|
value: -Xms512m -Xmx512m
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: elasticsearch
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 9220 # 和auth-server的端口冲突了,对外暴露换一个端口访问
|
||||||
|
targetPort: 9200
|
||||||
|
name: cluster-node
|
||||||
|
selector:
|
||||||
|
app: elasticsearch # 该 Service 会将所有具有标签 app: mysql-labels-app暴露到一个抽象的 Service 端口上(targetPort:容器接收流量的端口;port:可任意取值的抽象的 Service 端口,其他 Pod 通过该端口访问 Service
|
||||||
|
type: NodePort
|
||||||
50
deployment/skywalking/skywalking-deployment.yaml
Normal file
50
deployment/skywalking/skywalking-deployment.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: skywalking
|
||||||
|
name: skywalking
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: skywalking
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: skywalking
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: skywalking
|
||||||
|
image: apache/skywalking-oap-server
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 11800
|
||||||
|
name: collector
|
||||||
|
- containerPort: 12800
|
||||||
|
name: oap
|
||||||
|
env:
|
||||||
|
- name: SW_STORAGE
|
||||||
|
value: elasticsearch
|
||||||
|
- name: TZ
|
||||||
|
value: Asia/Shanghai
|
||||||
|
- name: SW_STORAGE_ES_CLUSTER_NODES
|
||||||
|
value: elasticsearch:9220
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: skywalking
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 11800
|
||||||
|
targetPort: 11800
|
||||||
|
name: collector
|
||||||
|
- port: 12800
|
||||||
|
targetPort: 12800
|
||||||
|
name: oap
|
||||||
|
selector:
|
||||||
|
app: skywalking # 该 Service 会将所有具有标签 app: mysql-labels-app暴露到一个抽象的 Service 端口上(targetPort:容器接收流量的端口;port:可任意取值的抽象的 Service 端口,其他 Pod 通过该端口访问 Service
|
||||||
|
type: NodePort
|
||||||
42
deployment/skywalking/skywalking-ui-deployment.yaml
Normal file
42
deployment/skywalking/skywalking-ui-deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: skywalking-ui
|
||||||
|
name: skywalking-ui
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: skywalking-ui
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: skywalking-ui
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: skywalking-ui
|
||||||
|
image: apache/skywalking-ui
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: console
|
||||||
|
env:
|
||||||
|
- name: SW_OAP_ADDRESS
|
||||||
|
value: http://skywalking:12800
|
||||||
|
- name: TZ
|
||||||
|
value: Asia/Shanghai
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: skywalking-ui
|
||||||
|
namespace: kube-ruoyi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
nodePort: 30088
|
||||||
|
selector:
|
||||||
|
app: skywalking-ui # 该 Service 会将所有具有标签 app: mysql-labels-app暴露到一个抽象的 Service 端口上(targetPort:容器接收流量的端口;port:可任意取值的抽象的 Service 端口,其他 Pod 通过该端口访问 Service
|
||||||
|
type: NodePort
|
||||||
41
docker/copy.sh
Normal file
41
docker/copy.sh
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 复制项目的文件到对应docker路径,便于一键生成镜像。
|
||||||
|
usage() {
|
||||||
|
echo "Usage: sh copy.sh"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# copy sql
|
||||||
|
echo "begin copy sql "
|
||||||
|
cp ../sql/ry_20240629.sql ./mysql/db
|
||||||
|
cp ../sql/ry_config_20250224.sql ./mysql/db
|
||||||
|
|
||||||
|
# copy html
|
||||||
|
echo "begin copy html "
|
||||||
|
cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
|
||||||
|
|
||||||
|
|
||||||
|
# copy jar
|
||||||
|
echo "begin copy ruoyi-gateway "
|
||||||
|
cp ../ruoyi-gateway/target/ruoyi-gateway.jar ./ruoyi/gateway/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-auth "
|
||||||
|
cp ../ruoyi-auth/target/ruoyi-auth.jar ./ruoyi/auth/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-visual "
|
||||||
|
cp ../ruoyi-visual/ruoyi-monitor/target/ruoyi-visual-monitor.jar ./ruoyi/visual/monitor/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-modules-system "
|
||||||
|
cp ../ruoyi-modules/ruoyi-system/target/ruoyi-modules-system.jar ./ruoyi/modules/system/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-modules-file "
|
||||||
|
cp ../ruoyi-modules/ruoyi-file/target/ruoyi-modules-file.jar ./ruoyi/modules/file/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-modules-job "
|
||||||
|
cp ../ruoyi-modules/ruoyi-job/target/ruoyi-modules-job.jar ./ruoyi/modules/job/jar
|
||||||
|
|
||||||
|
echo "begin copy ruoyi-modules-gen "
|
||||||
|
cp ../ruoyi-modules/ruoyi-gen/target/ruoyi-modules-gen.jar ./ruoyi/modules/gen/jar
|
||||||
|
|
||||||
67
docker/deploy.sh
Normal file
67
docker/deploy.sh
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 使用说明,用来提示输入参数
|
||||||
|
usage() {
|
||||||
|
echo "Usage: sh 执行脚本.sh [port|base|modules|stop|rm]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# 开启所需端口
|
||||||
|
port(){
|
||||||
|
firewall-cmd --add-port=80/tcp --permanent
|
||||||
|
firewall-cmd --add-port=8080/tcp --permanent
|
||||||
|
firewall-cmd --add-port=8848/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9848/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9849/tcp --permanent
|
||||||
|
firewall-cmd --add-port=6379/tcp --permanent
|
||||||
|
firewall-cmd --add-port=3306/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9100/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9200/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9201/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9202/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9203/tcp --permanent
|
||||||
|
firewall-cmd --add-port=9300/tcp --permanent
|
||||||
|
service firewalld restart
|
||||||
|
}
|
||||||
|
|
||||||
|
# 启动基础环境(必须)
|
||||||
|
base(){
|
||||||
|
docker-compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
|
||||||
|
}
|
||||||
|
|
||||||
|
# 启动程序模块(必须)
|
||||||
|
modules(){
|
||||||
|
docker-compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
|
||||||
|
}
|
||||||
|
|
||||||
|
# 关闭所有环境/模块
|
||||||
|
stop(){
|
||||||
|
docker-compose stop
|
||||||
|
}
|
||||||
|
|
||||||
|
# 删除所有环境/模块
|
||||||
|
rm(){
|
||||||
|
docker-compose rm
|
||||||
|
}
|
||||||
|
|
||||||
|
# 根据输入参数,选择执行对应方法,不输入则执行使用说明
|
||||||
|
case "$1" in
|
||||||
|
"port")
|
||||||
|
port
|
||||||
|
;;
|
||||||
|
"base")
|
||||||
|
base
|
||||||
|
;;
|
||||||
|
"modules")
|
||||||
|
modules
|
||||||
|
;;
|
||||||
|
"stop")
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
"rm")
|
||||||
|
rm
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
140
docker/docker-compose.yml
Normal file
140
docker/docker-compose.yml
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
version : '3.8'
|
||||||
|
services:
|
||||||
|
ruoyi-nacos:
|
||||||
|
container_name: ruoyi-nacos
|
||||||
|
image: nacos/nacos-server
|
||||||
|
build:
|
||||||
|
context: ./nacos
|
||||||
|
environment:
|
||||||
|
- MODE=standalone
|
||||||
|
volumes:
|
||||||
|
- ./nacos/logs/:/home/nacos/logs
|
||||||
|
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||||
|
ports:
|
||||||
|
- "8848:8848"
|
||||||
|
- "9848:9848"
|
||||||
|
- "9849:9849"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-mysql
|
||||||
|
ruoyi-mysql:
|
||||||
|
container_name: ruoyi-mysql
|
||||||
|
image: mysql:5.7
|
||||||
|
build:
|
||||||
|
context: ./mysql
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- ./mysql/conf:/etc/mysql/conf.d
|
||||||
|
- ./mysql/logs:/logs
|
||||||
|
- ./mysql/data:/var/lib/mysql
|
||||||
|
command: [
|
||||||
|
'mysqld',
|
||||||
|
'--innodb-buffer-pool-size=80M',
|
||||||
|
'--character-set-server=utf8mb4',
|
||||||
|
'--collation-server=utf8mb4_unicode_ci',
|
||||||
|
'--default-time-zone=+8:00',
|
||||||
|
'--lower-case-table-names=1'
|
||||||
|
]
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: 'ry-cloud'
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
ruoyi-redis:
|
||||||
|
container_name: ruoyi-redis
|
||||||
|
image: redis
|
||||||
|
build:
|
||||||
|
context: ./redis
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
volumes:
|
||||||
|
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
|
||||||
|
- ./redis/data:/data
|
||||||
|
command: redis-server /home/ruoyi/redis/redis.conf
|
||||||
|
ruoyi-nginx:
|
||||||
|
container_name: ruoyi-nginx
|
||||||
|
image: nginx
|
||||||
|
build:
|
||||||
|
context: ./nginx
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
|
||||||
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
- ./nginx/logs:/var/log/nginx
|
||||||
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-gateway
|
||||||
|
links:
|
||||||
|
- ruoyi-gateway
|
||||||
|
ruoyi-gateway:
|
||||||
|
container_name: ruoyi-gateway
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/gateway
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-redis
|
||||||
|
links:
|
||||||
|
- ruoyi-redis
|
||||||
|
ruoyi-auth:
|
||||||
|
container_name: ruoyi-auth
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/auth
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-redis
|
||||||
|
links:
|
||||||
|
- ruoyi-redis
|
||||||
|
ruoyi-modules-system:
|
||||||
|
container_name: ruoyi-modules-system
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/modules/system
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9201:9201"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-redis
|
||||||
|
- ruoyi-mysql
|
||||||
|
links:
|
||||||
|
- ruoyi-redis
|
||||||
|
- ruoyi-mysql
|
||||||
|
ruoyi-modules-gen:
|
||||||
|
container_name: ruoyi-modules-gen
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/modules/gen
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9202:9202"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-mysql
|
||||||
|
links:
|
||||||
|
- ruoyi-mysql
|
||||||
|
ruoyi-modules-job:
|
||||||
|
container_name: ruoyi-modules-job
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/modules/job
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9203:9203"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-mysql
|
||||||
|
links:
|
||||||
|
- ruoyi-mysql
|
||||||
|
ruoyi-modules-file:
|
||||||
|
container_name: ruoyi-modules-file
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/modules/file
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9300:9300"
|
||||||
|
volumes:
|
||||||
|
- ./ruoyi/uploadPath:/home/ruoyi/uploadPath
|
||||||
|
ruoyi-visual-monitor:
|
||||||
|
container_name: ruoyi-visual-monitor
|
||||||
|
build:
|
||||||
|
context: ./ruoyi/visual/monitor
|
||||||
|
dockerfile: dockerfile
|
||||||
|
ports:
|
||||||
|
- "9100:9100"
|
||||||
1
docker/mysql/db/readme.txt
Normal file
1
docker/mysql/db/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放sql目录下的所有脚本,用于docker自动执行。
|
||||||
7
docker/mysql/dockerfile
Normal file
7
docker/mysql/dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM mysql:5.7
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 执行sql脚本
|
||||||
|
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||||
32
docker/nacos/conf/application.properties
Normal file
32
docker/nacos/conf/application.properties
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
spring.datasource.platform=mysql
|
||||||
|
db.num=1
|
||||||
|
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
|
db.user=root
|
||||||
|
db.password=password
|
||||||
|
|
||||||
|
nacos.naming.empty-service.auto-clean=true
|
||||||
|
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||||
|
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||||
|
|
||||||
|
management.endpoints.web.exposure.include=*
|
||||||
|
|
||||||
|
management.metrics.export.elastic.enabled=false
|
||||||
|
management.metrics.export.influx.enabled=false
|
||||||
|
|
||||||
|
server.tomcat.accesslog.enabled=true
|
||||||
|
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||||
|
|
||||||
|
server.tomcat.basedir=/home/ruoyi/nacos/tomcat/logs
|
||||||
|
|
||||||
|
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
|
|
||||||
|
nacos.core.auth.system.type=nacos
|
||||||
|
nacos.core.auth.enabled=false
|
||||||
|
nacos.core.auth.default.token.expire.seconds=18000
|
||||||
|
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
|
nacos.core.auth.caching.enabled=true
|
||||||
|
nacos.core.auth.enable.userAgentAuthWhite=false
|
||||||
|
nacos.core.auth.server.identity.key=serverIdentity
|
||||||
|
nacos.core.auth.server.identity.value=security
|
||||||
|
|
||||||
|
nacos.istio.mcp.server.enabled=false
|
||||||
7
docker/nacos/dockerfile
Normal file
7
docker/nacos/dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM nacos/nacos-server
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 复制conf文件到路径
|
||||||
|
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||||
41
docker/nginx/conf/nginx.conf
Normal file
41
docker/nginx/conf/nginx.conf
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /home/ruoyi/projects/ruoyi-ui;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /prod-api/{
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://ruoyi-gateway:8080/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 避免actuator暴露
|
||||||
|
if ($request_uri ~ "/actuator") {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
docker/nginx/dockerfile
Normal file
15
docker/nginx/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM nginx
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi/projects/ruoyi-ui
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi/projects/ruoyi-ui
|
||||||
|
# 复制conf文件到路径
|
||||||
|
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
# 复制html文件到路径
|
||||||
|
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
|
||||||
1
docker/nginx/html/dist/readme.txt
vendored
Normal file
1
docker/nginx/html/dist/readme.txt
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放前端ruoyi-ui构建好的静态文件,用于nginx请求访问。
|
||||||
1
docker/redis/conf/redis.conf
Normal file
1
docker/redis/conf/redis.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# requirepass 123456
|
||||||
13
docker/redis/dockerfile
Normal file
13
docker/redis/dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM redis
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi/redis
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi/redis
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi/redis
|
||||||
|
# 复制conf文件到路径
|
||||||
|
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
||||||
15
docker/ruoyi/auth/dockerfile
Normal file
15
docker/ruoyi/auth/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
|
||||||
|
# 启动认证服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
|
||||||
1
docker/ruoyi/auth/jar/readme.txt
Normal file
1
docker/ruoyi/auth/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放认证中心打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/gateway/dockerfile
Normal file
15
docker/ruoyi/gateway/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
||||||
|
# 启动网关服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
||||||
1
docker/ruoyi/gateway/jar/readme.txt
Normal file
1
docker/ruoyi/gateway/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放网关模块打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/modules/file/dockerfile
Normal file
15
docker/ruoyi/modules/file/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
|
||||||
|
# 启动文件服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
|
||||||
1
docker/ruoyi/modules/file/jar/readme.txt
Normal file
1
docker/ruoyi/modules/file/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放文件服务打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/modules/gen/dockerfile
Normal file
15
docker/ruoyi/modules/gen/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
|
||||||
|
# 启动代码生成服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
|
||||||
1
docker/ruoyi/modules/gen/jar/readme.txt
Normal file
1
docker/ruoyi/modules/gen/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放代码生成打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/modules/job/dockerfile
Normal file
15
docker/ruoyi/modules/job/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
|
||||||
|
# 启动定时任务服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
|
||||||
1
docker/ruoyi/modules/job/jar/readme.txt
Normal file
1
docker/ruoyi/modules/job/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放定时任务打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/modules/system/dockerfile
Normal file
15
docker/ruoyi/modules/system/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
|
||||||
|
# 启动系统服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
|
||||||
1
docker/ruoyi/modules/system/jar/readme.txt
Normal file
1
docker/ruoyi/modules/system/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放系统模块打包好的jar文件,用于docker启动应用。
|
||||||
15
docker/ruoyi/visual/monitor/dockerfile
Normal file
15
docker/ruoyi/visual/monitor/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
MAINTAINER ruoyi
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /home/ruoyi
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /home/ruoyi
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /home/ruoyi
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
|
||||||
|
# 启动系统服务
|
||||||
|
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
|
||||||
1
docker/ruoyi/visual/monitor/jar/readme.txt
Normal file
1
docker/ruoyi/visual/monitor/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
存放监控中心打包好的jar文件,用于docker启动应用。
|
||||||
237
pom.xml
237
pom.xml
@@ -6,37 +6,54 @@
|
|||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>3.6.5</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>若依微服务系统</description>
|
<description>若依微服务系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>2.0.0</ruoyi.version>
|
<ruoyi.version>3.6.5</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
|
<spring-boot.version>2.7.18</spring-boot.version>
|
||||||
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
|
<spring-cloud.version>2021.0.9</spring-cloud.version>
|
||||||
<spring-boot-admin.version>2.2.3</spring-boot-admin.version>
|
<spring-cloud-alibaba.version>2021.0.6.1</spring-cloud-alibaba.version>
|
||||||
<spring-boot.mybatis>2.1.2</spring-boot.mybatis>
|
<spring-boot-admin.version>2.7.16</spring-boot-admin.version>
|
||||||
<swagger.fox.version>2.9.2</swagger.fox.version>
|
<tobato.version>1.27.2</tobato.version>
|
||||||
<swagger.core.version>1.5.24</swagger.core.version>
|
<kaptcha.version>2.3.3</kaptcha.version>
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<pagehelper.boot.version>2.0.0</pagehelper.boot.version>
|
||||||
<pagehelper.boot.version>1.2.12</pagehelper.boot.version>
|
<druid.version>1.2.23</druid.version>
|
||||||
<commons.io.version>2.5</commons.io.version>
|
<dynamic-ds.version>4.3.1</dynamic-ds.version>
|
||||||
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
<commons.io.version>2.13.0</commons.io.version>
|
||||||
<velocity.version>1.7</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<fastjson.version>1.2.70</fastjson.version>
|
<fastjson.version>2.0.53</fastjson.version>
|
||||||
<poi.version>3.17</poi.version>
|
<jjwt.version>0.9.1</jjwt.version>
|
||||||
<common-pool.version>2.6.2</common-pool.version>
|
<minio.version>8.2.2</minio.version>
|
||||||
|
<poi.version>4.1.2</poi.version>
|
||||||
|
<springdoc.version>1.6.9</springdoc.version>
|
||||||
|
<transmittable-thread-local.version>2.14.4</transmittable-thread-local.version>
|
||||||
|
|
||||||
|
<!-- override dependency version -->
|
||||||
|
<tomcat.version>9.0.98</tomcat.version>
|
||||||
|
<logback.version>1.2.13</logback.version>
|
||||||
|
<spring-framework.version>5.3.39</spring-framework.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 覆盖SpringFramework的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-framework-bom</artifactId>
|
||||||
|
<version>${spring-framework.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud 微服务 -->
|
<!-- SpringCloud 微服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
@@ -46,11 +63,11 @@
|
|||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba 微服务 -->
|
<!-- SpringCloud Alibaba 微服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||||
<version>2.2.1.RELEASE</version>
|
<version>${spring-cloud-alibaba.version}</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -63,36 +80,56 @@
|
|||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot 监控客户端 -->
|
<!-- 覆盖logback的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.codecentric</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
<artifactId>logback-core</artifactId>
|
||||||
<version>${spring-boot-admin.version}</version>
|
<version>${logback.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mybatis 依赖配置 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>${spring-boot.mybatis}</version>
|
<version>${logback.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Swagger 依赖配置 -->
|
<!-- 覆盖tomcat的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
<artifactId>swagger-models</artifactId>
|
<artifactId>tomcat-embed-core</artifactId>
|
||||||
<version>${swagger.core.version}</version>
|
<version>${tomcat.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>tomcat-embed-el</artifactId>
|
||||||
<version>${swagger.core.version}</version>
|
<version>${tomcat.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-websocket</artifactId>
|
||||||
|
<version>${tomcat.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- FastDFS 分布式文件系统 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.tobato</groupId>
|
||||||
|
<artifactId>fastdfs-client</artifactId>
|
||||||
|
<version>${tobato.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Springdoc webmvc 依赖配置 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-ui</artifactId>
|
||||||
|
<version>${springdoc.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.penggle</groupId>
|
<groupId>pro.fessional</groupId>
|
||||||
<artifactId>kaptcha</artifactId>
|
<artifactId>kaptcha</artifactId>
|
||||||
<version>${kaptcha.version}</version>
|
<version>${kaptcha.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -118,98 +155,123 @@
|
|||||||
<version>${poi.version}</version>
|
<version>${poi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 文件上传工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-fileupload</groupId>
|
|
||||||
<artifactId>commons-fileupload</artifactId>
|
|
||||||
<version>${commons.fileupload.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 代码生成使用模板 -->
|
<!-- 代码生成使用模板 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>velocity</artifactId>
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
<version>${velocity.version}</version>
|
<version>${velocity.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JSON 解析器和生成器 -->
|
<!-- JSON 解析器和生成器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson2</artifactId>
|
||||||
<version>${fastjson.version}</version>
|
<version>${fastjson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 公共资源池 -->
|
<!-- JWT -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
<artifactId>commons-pool2</artifactId>
|
<artifactId>jjwt</artifactId>
|
||||||
<version>${common-pool.version}</version>
|
<version>${jjwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 线程传递值 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>transmittable-thread-local</artifactId>
|
||||||
|
<version>${transmittable-thread-local.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块 -->
|
<!-- 核心模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-core</artifactId>
|
<artifactId>ruoyi-common-core</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 接口模块 -->
|
<!-- 接口模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-swagger</artifactId>
|
<artifactId>ruoyi-common-swagger</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 安全模块 -->
|
<!-- 安全模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-security</artifactId>
|
<artifactId>ruoyi-common-security</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 数据脱敏 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 权限范围 -->
|
<!-- 权限范围 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-datascope</artifactId>
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 多数据源 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datasource</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 分布式事务 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-seata</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 日志记录 -->
|
<!-- 日志记录 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-log</artifactId>
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 缓存服务 -->
|
<!-- 缓存服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-redis</artifactId>
|
<artifactId>ruoyi-common-redis</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 系统接口 -->
|
<!-- 系统接口 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-api-system</artifactId>
|
<artifactId>ruoyi-api-system</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-auth</module>
|
<module>ruoyi-auth</module>
|
||||||
<module>ruoyi-gateway</module>
|
<module>ruoyi-gateway</module>
|
||||||
<module>ruoyi-visual</module>
|
<module>ruoyi-visual</module>
|
||||||
<module>ruoyi-modules</module>
|
<module>ruoyi-modules</module>
|
||||||
<module>ruoyi-api</module>
|
<module>ruoyi-api</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- bootstrap 启动器 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -224,6 +286,47 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>3.6.5</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-api</artifactId>
|
<artifactId>ruoyi-api</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>3.6.5</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.ruoyi.system.api;
|
||||||
|
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.system.api.domain.SysFile;
|
||||||
|
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件服务
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||||
|
public interface RemoteFileService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
*
|
||||||
|
* @param file 文件信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
|
||||||
|
}
|
||||||
@@ -3,9 +3,11 @@ package com.ruoyi.system.api;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.system.api.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.api.domain.SysOperLog;
|
import com.ruoyi.system.api.domain.SysOperLog;
|
||||||
import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
|
import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
|
||||||
|
|
||||||
@@ -21,20 +23,19 @@ public interface RemoteLogService
|
|||||||
* 保存系统日志
|
* 保存系统日志
|
||||||
*
|
*
|
||||||
* @param sysOperLog 日志实体
|
* @param sysOperLog 日志实体
|
||||||
|
* @param source 请求来源
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/operlog")
|
@PostMapping("/operlog")
|
||||||
R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog);
|
public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存访问记录
|
* 保存访问记录
|
||||||
*
|
*
|
||||||
* @param username 用户名称
|
* @param sysLogininfor 访问实体
|
||||||
* @param status 状态
|
* @param source 请求来源
|
||||||
* @param message 消息
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/logininfor")
|
@PostMapping("/logininfor")
|
||||||
R<Boolean> saveLogininfor(@RequestParam("username") String username, @RequestParam("status") String status,
|
public R<Boolean> saveLogininfor(@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
@RequestParam("message") String message);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,16 @@ package com.ruoyi.system.api;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
|
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
|
||||||
import com.ruoyi.system.api.model.UserInfo;
|
import com.ruoyi.system.api.model.LoginUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户服务
|
* 用户服务
|
||||||
@@ -20,8 +26,29 @@ public interface RemoteUserService
|
|||||||
* 通过用户名查询用户信息
|
* 通过用户名查询用户信息
|
||||||
*
|
*
|
||||||
* @param username 用户名
|
* @param username 用户名
|
||||||
|
* @param source 请求来源
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/user/info/{username}")
|
@GetMapping("/user/info/{username}")
|
||||||
public R<UserInfo> getUserInfo(@PathVariable("username") String username);
|
public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册用户信息
|
||||||
|
*
|
||||||
|
* @param sysUser 用户信息
|
||||||
|
* @param source 请求来源
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/user/register")
|
||||||
|
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录用户登录IP地址和登录时间
|
||||||
|
*
|
||||||
|
* @param sysUser 用户信息
|
||||||
|
* @param source 请求来源
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/user/recordlogin")
|
||||||
|
public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@@ -31,7 +32,7 @@ public class SysDept extends BaseEntity
|
|||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
/** 显示顺序 */
|
/** 显示顺序 */
|
||||||
private String orderNum;
|
private Integer orderNum;
|
||||||
|
|
||||||
/** 负责人 */
|
/** 负责人 */
|
||||||
private String leader;
|
private String leader;
|
||||||
@@ -96,13 +97,13 @@ public class SysDept extends BaseEntity
|
|||||||
this.deptName = deptName;
|
this.deptName = deptName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotBlank(message = "显示顺序不能为空")
|
@NotNull(message = "显示顺序不能为空")
|
||||||
public String getOrderNum()
|
public Integer getOrderNum()
|
||||||
{
|
{
|
||||||
return orderNum;
|
return orderNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrderNum(String orderNum)
|
public void setOrderNum(Integer orderNum)
|
||||||
{
|
{
|
||||||
this.orderNum = orderNum;
|
this.orderNum = orderNum;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.api.domain;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
@@ -131,7 +131,7 @@ public class SysDictData extends BaseEntity
|
|||||||
|
|
||||||
public boolean getDefault()
|
public boolean getDefault()
|
||||||
{
|
{
|
||||||
return UserConstants.YES.equals(this.isDefault) ? true : false;
|
return UserConstants.YES.equals(this.isDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIsDefault()
|
public String getIsDefault()
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.api.domain;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@@ -57,6 +58,7 @@ public class SysDictType extends BaseEntity
|
|||||||
|
|
||||||
@NotBlank(message = "字典类型不能为空")
|
@NotBlank(message = "字典类型不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||||
|
@Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
|
||||||
public String getDictType()
|
public String getDictType()
|
||||||
{
|
{
|
||||||
return dictType;
|
return dictType;
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.ruoyi.system.api.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件信息
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class SysFile
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 文件名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl()
|
||||||
|
{
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url)
|
||||||
|
{
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("name", getName())
|
||||||
|
.append("url", getUrl())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.api.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@@ -79,6 +79,10 @@ public class SysOperLog extends BaseEntity
|
|||||||
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date operTime;
|
private Date operTime;
|
||||||
|
|
||||||
|
/** 消耗时间 */
|
||||||
|
@Excel(name = "消耗时间", suffix = "毫秒")
|
||||||
|
private Long costTime;
|
||||||
|
|
||||||
public Long getOperId()
|
public Long getOperId()
|
||||||
{
|
{
|
||||||
return operId;
|
return operId;
|
||||||
@@ -238,4 +242,14 @@ public class SysOperLog extends BaseEntity
|
|||||||
{
|
{
|
||||||
this.operTime = operTime;
|
this.operTime = operTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getCostTime()
|
||||||
|
{
|
||||||
|
return costTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostTime(Long costTime)
|
||||||
|
{
|
||||||
|
this.costTime = costTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.ruoyi.system.api.domain;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@@ -31,12 +33,18 @@ public class SysRole extends BaseEntity
|
|||||||
|
|
||||||
/** 角色排序 */
|
/** 角色排序 */
|
||||||
@Excel(name = "角色排序")
|
@Excel(name = "角色排序")
|
||||||
private String roleSort;
|
private Integer roleSort;
|
||||||
|
|
||||||
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
|
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */
|
||||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
|
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
|
||||||
private String dataScope;
|
private String dataScope;
|
||||||
|
|
||||||
|
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
|
||||||
|
private boolean menuCheckStrictly;
|
||||||
|
|
||||||
|
/** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
|
||||||
|
private boolean deptCheckStrictly;
|
||||||
|
|
||||||
/** 角色状态(0正常 1停用) */
|
/** 角色状态(0正常 1停用) */
|
||||||
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
@@ -53,6 +61,9 @@ public class SysRole extends BaseEntity
|
|||||||
/** 部门组(数据权限) */
|
/** 部门组(数据权限) */
|
||||||
private Long[] deptIds;
|
private Long[] deptIds;
|
||||||
|
|
||||||
|
/** 角色菜单权限 */
|
||||||
|
private Set<String> permissions;
|
||||||
|
|
||||||
public SysRole()
|
public SysRole()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -107,13 +118,13 @@ public class SysRole extends BaseEntity
|
|||||||
this.roleKey = roleKey;
|
this.roleKey = roleKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotBlank(message = "显示顺序不能为空")
|
@NotNull(message = "显示顺序不能为空")
|
||||||
public String getRoleSort()
|
public Integer getRoleSort()
|
||||||
{
|
{
|
||||||
return roleSort;
|
return roleSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoleSort(String roleSort)
|
public void setRoleSort(Integer roleSort)
|
||||||
{
|
{
|
||||||
this.roleSort = roleSort;
|
this.roleSort = roleSort;
|
||||||
}
|
}
|
||||||
@@ -128,6 +139,26 @@ public class SysRole extends BaseEntity
|
|||||||
this.dataScope = dataScope;
|
this.dataScope = dataScope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMenuCheckStrictly()
|
||||||
|
{
|
||||||
|
return menuCheckStrictly;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuCheckStrictly(boolean menuCheckStrictly)
|
||||||
|
{
|
||||||
|
this.menuCheckStrictly = menuCheckStrictly;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDeptCheckStrictly()
|
||||||
|
{
|
||||||
|
return deptCheckStrictly;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptCheckStrictly(boolean deptCheckStrictly)
|
||||||
|
{
|
||||||
|
this.deptCheckStrictly = deptCheckStrictly;
|
||||||
|
}
|
||||||
|
|
||||||
public String getStatus()
|
public String getStatus()
|
||||||
{
|
{
|
||||||
return status;
|
return status;
|
||||||
@@ -177,7 +208,18 @@ public class SysRole extends BaseEntity
|
|||||||
{
|
{
|
||||||
this.deptIds = deptIds;
|
this.deptIds = deptIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<String> getPermissions()
|
||||||
|
{
|
||||||
|
return permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPermissions(Set<String> permissions)
|
||||||
|
{
|
||||||
|
this.permissions = permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("roleId", getRoleId())
|
.append("roleId", getRoleId())
|
||||||
@@ -185,6 +227,8 @@ public class SysRole extends BaseEntity
|
|||||||
.append("roleKey", getRoleKey())
|
.append("roleKey", getRoleKey())
|
||||||
.append("roleSort", getRoleSort())
|
.append("roleSort", getRoleSort())
|
||||||
.append("dataScope", getDataScope())
|
.append("dataScope", getDataScope())
|
||||||
|
.append("menuCheckStrictly", isMenuCheckStrictly())
|
||||||
|
.append("deptCheckStrictly", isDeptCheckStrictly())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("delFlag", getDelFlag())
|
.append("delFlag", getDelFlag())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
|
|||||||
@@ -2,17 +2,16 @@ package com.ruoyi.system.api.domain;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.annotation.Excel.Type;
|
import com.ruoyi.common.core.annotation.Excel.Type;
|
||||||
|
import com.ruoyi.common.core.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.annotation.Excels;
|
import com.ruoyi.common.core.annotation.Excels;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import com.ruoyi.common.core.xss.Xss;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
@@ -24,7 +23,7 @@ public class SysUser extends BaseEntity
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
@Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 部门ID */
|
/** 部门ID */
|
||||||
@@ -44,7 +43,7 @@ public class SysUser extends BaseEntity
|
|||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/** 手机号码 */
|
/** 手机号码 */
|
||||||
@Excel(name = "手机号码")
|
@Excel(name = "手机号码", cellType = ColumnType.TEXT)
|
||||||
private String phonenumber;
|
private String phonenumber;
|
||||||
|
|
||||||
/** 用户性别 */
|
/** 用户性别 */
|
||||||
@@ -57,9 +56,6 @@ public class SysUser extends BaseEntity
|
|||||||
/** 密码 */
|
/** 密码 */
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/** 盐加密 */
|
|
||||||
private String salt;
|
|
||||||
|
|
||||||
/** 帐号状态(0正常 1停用) */
|
/** 帐号状态(0正常 1停用) */
|
||||||
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
@@ -67,12 +63,12 @@ public class SysUser extends BaseEntity
|
|||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
/** 最后登陆IP */
|
/** 最后登录IP */
|
||||||
@Excel(name = "最后登陆IP", type = Type.EXPORT)
|
@Excel(name = "最后登录IP", type = Type.EXPORT)
|
||||||
private String loginIp;
|
private String loginIp;
|
||||||
|
|
||||||
/** 最后登陆时间 */
|
/** 最后登录时间 */
|
||||||
@Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
||||||
private Date loginDate;
|
private Date loginDate;
|
||||||
|
|
||||||
/** 部门对象 */
|
/** 部门对象 */
|
||||||
@@ -91,6 +87,9 @@ public class SysUser extends BaseEntity
|
|||||||
/** 岗位组 */
|
/** 岗位组 */
|
||||||
private Long[] postIds;
|
private Long[] postIds;
|
||||||
|
|
||||||
|
/** 角色ID */
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
public SysUser()
|
public SysUser()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -118,7 +117,7 @@ public class SysUser extends BaseEntity
|
|||||||
|
|
||||||
public static boolean isAdmin(Long userId)
|
public static boolean isAdmin(Long userId)
|
||||||
{
|
{
|
||||||
return userId != null && 1L == userId;
|
return UserConstants.isAdmin(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getDeptId()
|
public Long getDeptId()
|
||||||
@@ -131,6 +130,7 @@ public class SysUser extends BaseEntity
|
|||||||
this.deptId = deptId;
|
this.deptId = deptId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Xss(message = "用户昵称不能包含脚本字符")
|
||||||
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
||||||
public String getNickName()
|
public String getNickName()
|
||||||
{
|
{
|
||||||
@@ -142,6 +142,7 @@ public class SysUser extends BaseEntity
|
|||||||
this.nickName = nickName;
|
this.nickName = nickName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Xss(message = "用户账号不能包含脚本字符")
|
||||||
@NotBlank(message = "用户账号不能为空")
|
@NotBlank(message = "用户账号不能为空")
|
||||||
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
||||||
public String getUserName()
|
public String getUserName()
|
||||||
@@ -197,7 +198,6 @@ public class SysUser extends BaseEntity
|
|||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
public String getPassword()
|
public String getPassword()
|
||||||
{
|
{
|
||||||
return password;
|
return password;
|
||||||
@@ -208,16 +208,6 @@ public class SysUser extends BaseEntity
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSalt()
|
|
||||||
{
|
|
||||||
return salt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSalt(String salt)
|
|
||||||
{
|
|
||||||
this.salt = salt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
public String getStatus()
|
||||||
{
|
{
|
||||||
return status;
|
return status;
|
||||||
@@ -297,7 +287,16 @@ public class SysUser extends BaseEntity
|
|||||||
{
|
{
|
||||||
this.postIds = postIds;
|
this.postIds = postIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getRoleId()
|
||||||
|
{
|
||||||
|
return roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleId(Long roleId)
|
||||||
|
{
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@@ -310,7 +309,6 @@ public class SysUser extends BaseEntity
|
|||||||
.append("sex", getSex())
|
.append("sex", getSex())
|
||||||
.append("avatar", getAvatar())
|
.append("avatar", getAvatar())
|
||||||
.append("password", getPassword())
|
.append("password", getPassword())
|
||||||
.append("salt", getSalt())
|
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("delFlag", getDelFlag())
|
.append("delFlag", getDelFlag())
|
||||||
.append("loginIp", getLoginIp())
|
.append("loginIp", getLoginIp())
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.ruoyi.system.api.factory;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.system.api.RemoteFileService;
|
||||||
|
import com.ruoyi.system.api.domain.SysFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件服务降级处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteFileService create(Throwable throwable)
|
||||||
|
{
|
||||||
|
log.error("文件服务调用失败:{}", throwable.getMessage());
|
||||||
|
return new RemoteFileService()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public R<SysFile> upload(MultipartFile file)
|
||||||
|
{
|
||||||
|
return R.fail("上传文件失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,11 +2,12 @@ package com.ruoyi.system.api.factory;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteLogService;
|
import com.ruoyi.system.api.RemoteLogService;
|
||||||
|
import com.ruoyi.system.api.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.api.domain.SysOperLog;
|
import com.ruoyi.system.api.domain.SysOperLog;
|
||||||
import feign.hystrix.FallbackFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志服务降级处理
|
* 日志服务降级处理
|
||||||
@@ -25,15 +26,15 @@ public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogServic
|
|||||||
return new RemoteLogService()
|
return new RemoteLogService()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> saveLog(SysOperLog sysOperLog)
|
public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
|
||||||
{
|
{
|
||||||
return null;
|
return R.fail("保存操作日志失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> saveLogininfor(String username, String status, String message)
|
public R<Boolean> saveLogininfor(SysLogininfor sysLogininfor, String source)
|
||||||
{
|
{
|
||||||
return null;
|
return R.fail("保存登录日志失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ package com.ruoyi.system.api.factory;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteUserService;
|
import com.ruoyi.system.api.RemoteUserService;
|
||||||
import com.ruoyi.system.api.model.UserInfo;
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
import feign.hystrix.FallbackFactory;
|
import com.ruoyi.system.api.model.LoginUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户服务降级处理
|
* 用户服务降级处理
|
||||||
@@ -25,9 +26,21 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
|||||||
return new RemoteUserService()
|
return new RemoteUserService()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public R<UserInfo> getUserInfo(String username)
|
public R<LoginUser> getUserInfo(String username, String source)
|
||||||
{
|
{
|
||||||
return null;
|
return R.fail("获取用户失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Boolean> registerUserInfo(SysUser sysUser, String source)
|
||||||
|
{
|
||||||
|
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Boolean> recordUserLogin(SysUser sysUser, String source)
|
||||||
|
{
|
||||||
|
return R.fail("记录用户登录信息失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
package com.ruoyi.system.api.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Set;
|
||||||
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class LoginUser implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户唯一标识
|
||||||
|
*/
|
||||||
|
private String token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名id
|
||||||
|
*/
|
||||||
|
private Long userid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录时间
|
||||||
|
*/
|
||||||
|
private Long loginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
*/
|
||||||
|
private Long expireTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录IP地址
|
||||||
|
*/
|
||||||
|
private String ipaddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限列表
|
||||||
|
*/
|
||||||
|
private Set<String> permissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色列表
|
||||||
|
*/
|
||||||
|
private Set<String> roles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*/
|
||||||
|
private SysUser sysUser;
|
||||||
|
|
||||||
|
public String getToken()
|
||||||
|
{
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(String token)
|
||||||
|
{
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserid()
|
||||||
|
{
|
||||||
|
return userid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserid(Long userid)
|
||||||
|
{
|
||||||
|
this.userid = userid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername()
|
||||||
|
{
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username)
|
||||||
|
{
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLoginTime()
|
||||||
|
{
|
||||||
|
return loginTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoginTime(Long loginTime)
|
||||||
|
{
|
||||||
|
this.loginTime = loginTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getExpireTime()
|
||||||
|
{
|
||||||
|
return expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireTime(Long expireTime)
|
||||||
|
{
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpaddr()
|
||||||
|
{
|
||||||
|
return ipaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpaddr(String ipaddr)
|
||||||
|
{
|
||||||
|
this.ipaddr = ipaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getPermissions()
|
||||||
|
{
|
||||||
|
return permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPermissions(Set<String> permissions)
|
||||||
|
{
|
||||||
|
this.permissions = permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getRoles()
|
||||||
|
{
|
||||||
|
return roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoles(Set<String> roles)
|
||||||
|
{
|
||||||
|
this.roles = roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysUser getSysUser()
|
||||||
|
{
|
||||||
|
return sysUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysUser(SysUser sysUser)
|
||||||
|
{
|
||||||
|
this.sysUser = sysUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package com.ruoyi.system.api.model;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Set;
|
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户信息
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class UserInfo implements Serializable
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户基本信息
|
|
||||||
*/
|
|
||||||
private SysUser sysUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权限标识集合
|
|
||||||
*/
|
|
||||||
private Set<String> permissions;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色集合
|
|
||||||
*/
|
|
||||||
private Set<String> roles;
|
|
||||||
|
|
||||||
public SysUser getSysUser()
|
|
||||||
{
|
|
||||||
return sysUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSysUser(SysUser sysUser)
|
|
||||||
{
|
|
||||||
this.sysUser = sysUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<String> getPermissions()
|
|
||||||
{
|
|
||||||
return permissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPermissions(Set<String> permissions)
|
|
||||||
{
|
|
||||||
this.permissions = permissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<String> getRoles()
|
|
||||||
{
|
|
||||||
return roles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoles(Set<String> roles)
|
|
||||||
{
|
|
||||||
this.roles = roles;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
|
||||||
com.ruoyi.system.api.factory.RemoteUserFallbackFactory,\
|
|
||||||
com.ruoyi.system.api.factory.RemoteLogFallbackFactory
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
com.ruoyi.system.api.factory.RemoteUserFallbackFactory
|
||||||
|
com.ruoyi.system.api.factory.RemoteLogFallbackFactory
|
||||||
|
com.ruoyi.system.api.factory.RemoteFileFallbackFactory
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>3.6.5</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -16,22 +16,22 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- SpringCloud Ailibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud Ailibaba Nacos Config -->
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud Netflix Hystrix -->
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Web -->
|
<!-- SpringBoot Web -->
|
||||||
@@ -40,10 +40,10 @@
|
|||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mysql Connector -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- RuoYi Common Security-->
|
<!-- RuoYi Common Security-->
|
||||||
@@ -52,15 +52,10 @@
|
|||||||
<artifactId>ruoyi-common-security</artifactId>
|
<artifactId>ruoyi-common-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- RuoYi Common Redis-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-common-redis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.ruoyi.auth;
|
package com.ruoyi.auth;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.cloud.client.SpringCloudApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,7 +11,7 @@ import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringCloudApplication
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||||
public class RuoYiAuthApplication
|
public class RuoYiAuthApplication
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
|||||||
@@ -1,139 +0,0 @@
|
|||||||
package com.ruoyi.auth.config;
|
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
|
||||||
import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
|
|
||||||
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
|
||||||
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
|
|
||||||
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
|
|
||||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
|
|
||||||
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
|
|
||||||
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
|
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
|
||||||
import org.springframework.security.oauth2.provider.token.TokenEnhancer;
|
|
||||||
import org.springframework.security.oauth2.provider.token.TokenStore;
|
|
||||||
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
|
|
||||||
import com.ruoyi.auth.exception.CustomWebResponseExceptionTranslator;
|
|
||||||
import com.ruoyi.common.core.constant.CacheConstants;
|
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
|
||||||
import com.ruoyi.common.security.domain.LoginUser;
|
|
||||||
import com.ruoyi.common.security.service.RedisClientDetailsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OAuth2 认证服务配置
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
@EnableAuthorizationServer
|
|
||||||
public class AuthServerConfig extends AuthorizationServerConfigurerAdapter
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private AuthenticationManager authenticationManager;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DataSource dataSource;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisConnectionFactory redisConnectionFactory;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UserDetailsService userDetailsService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private TokenEnhancer tokenEnhancer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定义授权和令牌端点以及令牌服务
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void configure(AuthorizationServerEndpointsConfigurer endpoints)
|
|
||||||
{
|
|
||||||
endpoints
|
|
||||||
// 请求方式
|
|
||||||
.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST)
|
|
||||||
// 指定token存储位置
|
|
||||||
.tokenStore(tokenStore())
|
|
||||||
// 自定义生成令牌
|
|
||||||
.tokenEnhancer(tokenEnhancer)
|
|
||||||
// 用户账号密码认证
|
|
||||||
.userDetailsService(userDetailsService)
|
|
||||||
// 指定认证管理器
|
|
||||||
.authenticationManager(authenticationManager)
|
|
||||||
// 是否重复使用 refresh_token
|
|
||||||
.reuseRefreshTokens(false)
|
|
||||||
// 自定义异常处理
|
|
||||||
.exceptionTranslator(new CustomWebResponseExceptionTranslator());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 配置令牌端点(Token Endpoint)的安全约束
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void configure(AuthorizationServerSecurityConfigurer oauthServer)
|
|
||||||
{
|
|
||||||
oauthServer.allowFormAuthenticationForClients().checkTokenAccess("permitAll()");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 声明 ClientDetails实现
|
|
||||||
*/
|
|
||||||
public RedisClientDetailsService clientDetailsService()
|
|
||||||
{
|
|
||||||
RedisClientDetailsService clientDetailsService = new RedisClientDetailsService(dataSource);
|
|
||||||
return clientDetailsService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 配置客户端详情
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void configure(ClientDetailsServiceConfigurer clients) throws Exception
|
|
||||||
{
|
|
||||||
clients.withClientDetails(clientDetailsService());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 基于 Redis 实现,令牌保存到缓存
|
|
||||||
*/
|
|
||||||
@Bean
|
|
||||||
public TokenStore tokenStore()
|
|
||||||
{
|
|
||||||
RedisTokenStore tokenStore = new RedisTokenStore(redisConnectionFactory);
|
|
||||||
tokenStore.setPrefix(CacheConstants.OAUTH_ACCESS);
|
|
||||||
return tokenStore;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义生成令牌
|
|
||||||
*/
|
|
||||||
@Bean
|
|
||||||
public TokenEnhancer tokenEnhancer()
|
|
||||||
{
|
|
||||||
return new TokenEnhancer()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication)
|
|
||||||
{
|
|
||||||
if (accessToken instanceof DefaultOAuth2AccessToken)
|
|
||||||
{
|
|
||||||
DefaultOAuth2AccessToken token = (DefaultOAuth2AccessToken) accessToken;
|
|
||||||
LoginUser user = (LoginUser) authentication.getUserAuthentication().getPrincipal();
|
|
||||||
Map<String, Object> additionalInformation = new LinkedHashMap<String, Object>();
|
|
||||||
additionalInformation.put(SecurityConstants.DETAILS_USERNAME, authentication.getName());
|
|
||||||
additionalInformation.put(SecurityConstants.DETAILS_USER_ID, user.getUserId());
|
|
||||||
token.setAdditionalInformation(additionalInformation);
|
|
||||||
}
|
|
||||||
return accessToken;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package com.ruoyi.auth.config;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
|
||||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
||||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Security 安全认证相关配置
|
|
||||||
* Oauth2依赖于Security 默认情况下WebSecurityConfig执行比ResourceServerConfig优先
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Order(99)
|
|
||||||
@Configuration
|
|
||||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private UserDetailsService userDetailsService;
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public PasswordEncoder passwordEncoder()
|
|
||||||
{
|
|
||||||
return new BCryptPasswordEncoder();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
@Override
|
|
||||||
public AuthenticationManager authenticationManagerBean() throws Exception
|
|
||||||
{
|
|
||||||
return super.authenticationManagerBean();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception
|
|
||||||
{
|
|
||||||
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure(HttpSecurity http) throws Exception
|
|
||||||
{
|
|
||||||
http
|
|
||||||
.authorizeRequests()
|
|
||||||
.antMatchers(
|
|
||||||
"/actuator/**",
|
|
||||||
"/oauth/*",
|
|
||||||
"/token/**").permitAll()
|
|
||||||
.anyRequest().authenticated()
|
|
||||||
.and().csrf().disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user