diff --git a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log
index bd6e7a4..944512e 100644
--- a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log
+++ b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log
@@ -347,3 +347,43 @@
127.0.0.1 - - [09/Dec/2024:10:13:15 +0800] "GET /9.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
127.0.0.1 - - [09/Dec/2024:10:13:15 +0800] "GET /10.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
127.0.0.1 - - [09/Dec/2024:10:14:21 +0800] "DELETE /api/emps/ HTTP/1.1" 405 114 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:09:34 +0800] "GET /api/index HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:09:54 +0800] "GET /static/js/chunk-2d217668.863dbcab.js HTTP/1.1" 200 485 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:09:55 +0800] "GET /static/js/chunk-2d212f3a.cf0aafdd.js HTTP/1.1" 200 485 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:02 +0800] "GET /api/depts HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:02 +0800] "GET /api/depts HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:03 +0800] "GET /api/depts HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:04 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:15 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:10:15 +0800] "GET /api/depts HTTP/1.1" 200 805 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:12 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:16 +0800] "GET /static/css/chunk-5c99f4bb.f8220e53.css HTTP/1.1" 200 1651 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:16 +0800] "GET /static/js/chunk-5c99f4bb.6470b50c.js HTTP/1.1" 200 3005 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:20 +0800] "POST /api/login HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:31 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:19:33 +0800] "POST /api/login HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:34:19 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:34:20 +0800] "POST /api/login HTTP/1.1" 200 251 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:34:20 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:34:28 +0800] "POST /api/login HTTP/1.1" 200 66 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:38:22 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:38:23 +0800] "POST /api/login HTTP/1.1" 200 251 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:38:23 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:38:26 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [10/Dec/2024:20:38:26 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:09:16:09 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:09:16:26 +0800] "POST /api/login HTTP/1.1" 200 195 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:09:16:26 +0800] "GET /api/index HTTP/1.1" 404 105 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:09:16:35 +0800] "GET /api/login HTTP/1.1" 405 284 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:09:18:24 +0800] "GET /api/depts HTTP/1.1" 200 805 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:55 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:55 +0800] "GET /api/depts HTTP/1.1" 200 805 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /api/depts HTTP/1.1" 200 805 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1" 200 1120 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /1.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /2.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /4.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /5.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:10:28:57 +0800] "GET /3.jpg HTTP/1.1" 404 555 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:11:41:15 +0800] "GET /api/depts HTTP/1.1" 200 805 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+127.0.0.1 - - [11/Dec/2024:11:41:24 +0800] "POST /api/depts HTTP/1.1" 200 91 "http://127.0.0.1:90/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
diff --git a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log
index e4d37f7..dbec013 100644
--- a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log
+++ b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log
@@ -44,3 +44,21 @@
2024/12/09 10:13:15 [error] 9660#11152: *26 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/8.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /8.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:15 [error] 9660#11152: *24 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/9.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /9.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:15 [error] 9660#11152: *25 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/10.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /10.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:09:32 [error] 25808#12956: *1 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/index HTTP/1.1", upstream: "http://[::1]:8080/index", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:09:34 [error] 25808#12956: *1 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/index HTTP/1.1", upstream: "http://127.0.0.1:8080/index", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:09:34 [error] 25808#12956: *1 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/50x.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /api/index HTTP/1.1", upstream: "http://127.0.0.1:8080/index", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:02 [error] 25808#12956: *1 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://127.0.0.1:8080/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:02 [error] 25808#12956: *1 no live upstreams while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:02 [error] 25808#12956: *1 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/50x.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:02 [error] 25808#12956: *1 no live upstreams while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:02 [error] 25808#12956: *1 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/50x.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:03 [error] 25808#12956: *1 no live upstreams while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:03 [error] 25808#12956: *1 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/50x.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /api/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:04 [error] 25808#12956: *2 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1", upstream: "http://[::1]:8080/emps?name=&gender=&begin=&end=&page=1&pageSize=5", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:04 [error] 25808#12956: *2 no live upstreams while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1", upstream: "http://localhost/emps?name=&gender=&begin=&end=&page=1&pageSize=5", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/10 20:10:04 [error] 25808#12956: *2 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/50x.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1", upstream: "http://localhost/emps?name=&gender=&begin=&end=&page=1&pageSize=5", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/11 10:28:57 [error] 23772#12048: *11 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/1.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /1.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/11 10:28:57 [error] 23772#12048: *12 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/2.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /2.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/11 10:28:57 [error] 23772#12048: *16 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/4.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /4.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/11 10:28:57 [error] 23772#12048: *17 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/5.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /5.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
+2024/12/11 10:28:57 [error] 23772#12048: *18 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/3.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /3.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
diff --git a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid
index 6107f52..26b1087 100644
--- a/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid
+++ b/case/font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid
@@ -1 +1 @@
-19452
+11732
diff --git a/case/server/tlias-web-management/.idea/modules.xml b/case/server/tlias-web-management/.idea/modules.xml
new file mode 100644
index 0000000..0388501
--- /dev/null
+++ b/case/server/tlias-web-management/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/case/server/tlias-web-management/.idea/workspace.xml b/case/server/tlias-web-management/.idea/workspace.xml
index 2a6337b..c486dbd 100644
--- a/case/server/tlias-web-management/.idea/workspace.xml
+++ b/case/server/tlias-web-management/.idea/workspace.xml
@@ -8,17 +8,18 @@
-
-
-
+
+
+
-
+
+
@@ -61,6 +62,8 @@
{
"keyToString": {
+ "JUnit.TliasWebManagementApplicationTests.testGenJwt.executor": "Run",
+ "JUnit.TliasWebManagementApplicationTests.testParseJwt.executor": "Run",
"Maven.tlias-web-management [clean].executor": "Run",
"RequestMappingsPanelOrder0": "0",
"RequestMappingsPanelOrder1": "1",
@@ -84,7 +87,44 @@
"vue.rearranger.settings.migration": "true"
}
}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,6 +132,12 @@
+
+
+
+
+
+
@@ -106,6 +152,8 @@
+
+
diff --git a/case/server/tlias-web-management/learn.md b/case/server/tlias-web-management/learn.md
index 04f507a..6b2c431 100644
--- a/case/server/tlias-web-management/learn.md
+++ b/case/server/tlias-web-management/learn.md
@@ -34,27 +34,49 @@
- 客户端会话跟踪技术: Cookie
-http支持,浏览器自动
+优点:http支持,浏览器自动
-移动端App无法使用,不安全用户可以自己禁用。不能跨域
+缺点:移动端App无法使用,不安全用户可以自己禁用。不能跨域(协议、IP、域名和端口)
-- 服务端会话跟踪技术: Session
+- 服务端会话跟踪技术: Session
+优点:基于Cookie,但存在与服务器,安全
+缺点:只能用在单机位服务器。无法使用负载均衡的集群环境下使用。Cookie的缺点
- 令牌技术
+优点:支持所有端,解决集群下的认证问题,减轻服务器存储压力
+
+缺点:需要自己实现
+
+
+
+
+
+### JWT令牌
+
+JSON WEB TOKEN
+
+组成
+
+头,记录令牌类型,签名算法
+
+有效载荷,携带自定义信息
+签名,数字签名
-### JWT
+eg:登录认证
+使用流程:
+1. 引入依赖
diff --git a/case/server/tlias-web-management/pom.xml b/case/server/tlias-web-management/pom.xml
index 1fd8ef9..77baee3 100644
--- a/case/server/tlias-web-management/pom.xml
+++ b/case/server/tlias-web-management/pom.xml
@@ -50,6 +50,28 @@
spring-boot-starter-test
test
+
+
+
+ io.jsonwebtoken
+ jjwt
+ 0.9.1
+
+
+
+
+ javax.xml.bind
+ jaxb-api
+ 2.3.1
+
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.76
+
+
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/TliasWebManagementApplication.java b/case/server/tlias-web-management/src/main/java/top/lejings/TliasWebManagementApplication.java
index c3a0040..b89aebc 100644
--- a/case/server/tlias-web-management/src/main/java/top/lejings/TliasWebManagementApplication.java
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/TliasWebManagementApplication.java
@@ -2,7 +2,9 @@ package top.lejings;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+@ServletComponentScan
@SpringBootApplication
public class TliasWebManagementApplication {
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/controller/LoginController.java b/case/server/tlias-web-management/src/main/java/top/lejings/controller/LoginController.java
new file mode 100644
index 0000000..896df71
--- /dev/null
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/controller/LoginController.java
@@ -0,0 +1,40 @@
+package top.lejings.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.pojo.Emp;
+import top.lejings.pojo.Result;
+import top.lejings.service.EmpService;
+import top.lejings.utils.JwtUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Slf4j
+@RestController
+public class LoginController {
+ @Autowired
+ private EmpService empService;
+
+ @PostMapping("/login")
+ public Result login(@RequestBody Emp emp){
+ log.info("员工登录");
+ Emp e = empService .login(emp);
+
+ //登录成功,生成令牌并下发
+ if(e != null){
+ Map claims = new HashMap<>();
+ claims.put("id", e.getId());
+ claims.put("name", e.getName());
+ claims.put("username", e.getUsername());
+ String jwt = JwtUtils.generateJwt(claims);//包含了当前登录的员工信息
+ return Result.success(jwt);
+ }
+ //登录失败,返回错误信息
+
+ return Result.error("用户名或密码错误");
+ }
+}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/controller/SessionController.java b/case/server/tlias-web-management/src/main/java/top/lejings/controller/SessionController.java
new file mode 100644
index 0000000..f75465c
--- /dev/null
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/controller/SessionController.java
@@ -0,0 +1,62 @@
+package top.lejings.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import top.lejings.pojo.Result;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+@Slf4j
+@RestController
+public class SessionController {
+
+ /*
+ * 设置Cookie
+ * */
+ @GetMapping("/c1")
+ public Result cookie1(HttpServletResponse response){
+ response.addCookie(new Cookie("sessionId","123456789"));
+ return Result.success();
+ }
+
+ /*
+ * 获取Cookie
+ * */
+ @GetMapping("/c2")
+ public Result cookie2(HttpServletRequest request){
+ Cookie[] cookies=request.getCookies();//获取所有的Cookie
+ for (Cookie cookie:cookies){
+ if (cookie.getName().equals("login_username")){
+ System.out.println("cookie的值是:"+cookie.getValue());
+ }
+ }
+ return Result.success();
+ }
+
+ @GetMapping("/s1")
+ public Result session1(HttpSession session){
+ log.info("HttpSession-s1:{}",session.hashCode());
+
+ session.setAttribute("key1","value1");
+ return Result.success();
+
+ }
+
+ @GetMapping("/s2")
+ public Result session2(HttpServletRequest request){
+ HttpSession session=request.getSession();
+ log.info("HttpSession-s2:{}",session.hashCode());
+
+ Object loginUser=session.getAttribute("key1");
+ log.info("session中的值是:"+loginUser);
+ return Result.success();
+ }
+
+
+
+
+}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/exception/GlobalExceptionHandler.java b/case/server/tlias-web-management/src/main/java/top/lejings/exception/GlobalExceptionHandler.java
new file mode 100644
index 0000000..cbb6470
--- /dev/null
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/exception/GlobalExceptionHandler.java
@@ -0,0 +1,19 @@
+package top.lejings.exception;
+
+/*
+*
+* 全局异常处理器
+* */
+
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import top.lejings.pojo.Result;
+
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+ @ExceptionHandler(Exception.class)
+ public Result ex(Exception ex){
+ ex.printStackTrace();
+ return Result.error("服务器异常·················");
+ }
+}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/filter/LoginCheckFilter.java b/case/server/tlias-web-management/src/main/java/top/lejings/filter/LoginCheckFilter.java
new file mode 100644
index 0000000..4c6cfa8
--- /dev/null
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/filter/LoginCheckFilter.java
@@ -0,0 +1,67 @@
+package top.lejings.filter;
+
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.util.StringUtils;
+import top.lejings.pojo.Result;
+import top.lejings.utils.JwtUtils;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Slf4j
+@WebFilter(urlPatterns = "/*")
+public class LoginCheckFilter implements Filter {
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+ HttpServletRequest req = (HttpServletRequest) request;
+ HttpServletResponse resp = (HttpServletResponse) response;
+ //获取请求url
+ String url = req.getRequestURL().toString();
+ log.info("请求的url: {}",url);
+ //检测url是否login,放行
+ if(url.contains("login")){
+ log.info("这是登录操作,放行·······");
+ chain.doFilter(request,response);
+ return;
+ }
+
+ //获取令牌
+ String jwt = req.getHeader("token");
+ //判断令牌是否存在
+ if(!StringUtils.hasLength(jwt)){
+ log.info("令牌不存在,返回登录页·······");
+ Result error = Result.error("NOT_LOGIN");
+ //手动转换JSON
+ String notLogin = JSONObject.toJSONString(error);
+ resp.getWriter().write(notLogin);
+ return;
+ }
+ //解析令牌
+ try {
+ JwtUtils.parseJWT(jwt);
+ } catch (Exception e) {//解析失败
+ e.printStackTrace();
+ log.info("解析失败");
+ Result error = Result.error("NOT_LOGIN");
+ //手动转换JSON
+ String notLogin = JSONObject.toJSONString(error);
+ resp.getWriter().write(notLogin);
+ return;
+ }
+
+
+ //放行
+
+ log.info("令牌合法,放行");
+ chain.doFilter(request,response);
+
+
+
+
+ }
+}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/mapper/EmpMapper.java b/case/server/tlias-web-management/src/main/java/top/lejings/mapper/EmpMapper.java
index 5b719d5..82943d4 100644
--- a/case/server/tlias-web-management/src/main/java/top/lejings/mapper/EmpMapper.java
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/mapper/EmpMapper.java
@@ -16,4 +16,8 @@ public interface EmpMapper {
public Long count();
public List page(Integer start, Integer pageSize);
+
+ //根据用户名和密码查询员工
+ @Select("select * from emp where username=#{username} and password=#{password}")
+ Emp getByUsernameAndPassword(Emp emp);
}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/service/EmpService.java b/case/server/tlias-web-management/src/main/java/top/lejings/service/EmpService.java
index 8a0a9d5..bd956a3 100644
--- a/case/server/tlias-web-management/src/main/java/top/lejings/service/EmpService.java
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/service/EmpService.java
@@ -11,4 +11,6 @@ import java.util.List;
public interface EmpService {
PageBean page(Integer page, Integer pageSize);
+
+ Emp login(Emp emp);
}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/service/impl/EmpServiceImpl.java b/case/server/tlias-web-management/src/main/java/top/lejings/service/impl/EmpServiceImpl.java
index 403d07e..bdedae5 100644
--- a/case/server/tlias-web-management/src/main/java/top/lejings/service/impl/EmpServiceImpl.java
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/service/impl/EmpServiceImpl.java
@@ -26,4 +26,9 @@ public class EmpServiceImpl implements EmpService {
return pageBean;
}
+ @Override
+ public Emp login(Emp emp) {
+ return empMapper.getByUsernameAndPassword(emp);
+ }
+
}
diff --git a/case/server/tlias-web-management/src/main/java/top/lejings/utils/JwtUtils.java b/case/server/tlias-web-management/src/main/java/top/lejings/utils/JwtUtils.java
new file mode 100644
index 0000000..dcc2171
--- /dev/null
+++ b/case/server/tlias-web-management/src/main/java/top/lejings/utils/JwtUtils.java
@@ -0,0 +1,40 @@
+package top.lejings.utils;
+
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import java.util.Date;
+import java.util.Map;
+
+public class JwtUtils {
+
+ private static String signKey = "lejings";
+ private static Long expire = 43200000L;
+
+ /**
+ * 生成JWT令牌
+ * @param claims JWT第二部分负载 payload 中存储的内容
+ * @return
+ */
+ public static String generateJwt(Map claims){
+ String jwt = Jwts.builder()
+ .addClaims(claims)
+ .signWith(SignatureAlgorithm.HS256, signKey)
+ .setExpiration(new Date(System.currentTimeMillis() + expire))
+ .compact();
+ return jwt;
+ }
+
+ /**
+ * 解析JWT令牌
+ * @param jwt JWT令牌
+ * @return JWT第二部分负载 payload 中存储的内容
+ */
+ public static Claims parseJWT(String jwt){
+ Claims claims = Jwts.parser()
+ .setSigningKey(signKey)
+ .parseClaimsJws(jwt)
+ .getBody();
+ return claims;
+ }
+}
diff --git a/case/server/tlias-web-management/src/test/java/top/lejings/TliasWebManagementApplicationTests.java b/case/server/tlias-web-management/src/test/java/top/lejings/TliasWebManagementApplicationTests.java
index af62d1d..da63e34 100644
--- a/case/server/tlias-web-management/src/test/java/top/lejings/TliasWebManagementApplicationTests.java
+++ b/case/server/tlias-web-management/src/test/java/top/lejings/TliasWebManagementApplicationTests.java
@@ -1,8 +1,15 @@
package top.lejings;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
@SpringBootTest
class TliasWebManagementApplicationTests {
@@ -10,4 +17,41 @@ class TliasWebManagementApplicationTests {
void contextLoads() {
}
+
+
+ /*
+ *
+ * Jwp令牌
+ * 指定算法,密钥
+ * 内容
+ * 有效期
+ * */
+ @Test
+ public void testGenJwt(){
+ Map claims = new HashMap<>();
+ claims.put("id", 1);
+ claims.put("username", "lejings");
+
+ String jwt =Jwts.builder()
+ .signWith(SignatureAlgorithm.HS256, "lejings")
+ .setClaims(claims)
+ .setExpiration(new Date(System.currentTimeMillis()+3600*1000))
+ .compact();
+
+ System.out.println(jwt);
+ }
+
+ /*
+ * 解析令牌
+ *
+ * */
+ @Test
+ public void testParseJwt(){
+ Claims claims = Jwts.parser()
+ .setSigningKey("lejings")
+ .parseClaimsJws("eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNzMzODQyMTk2LCJ1c2VybmFtZSI6ImxlamluZ3MifQ.P9U7bjcX9qE3W2FRlBeuNBzIbKnIshOcJGHVoZ1m4Fk")
+ .getBody();
+ System.out.println(claims);
+ }
+
}
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/TliasWebManagementApplication.class b/case/server/tlias-web-management/target/classes/top/lejings/TliasWebManagementApplication.class
index 179f6e9..a69d11f 100644
Binary files a/case/server/tlias-web-management/target/classes/top/lejings/TliasWebManagementApplication.class and b/case/server/tlias-web-management/target/classes/top/lejings/TliasWebManagementApplication.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/controller/LoginController.class b/case/server/tlias-web-management/target/classes/top/lejings/controller/LoginController.class
new file mode 100644
index 0000000..bdd21ce
Binary files /dev/null and b/case/server/tlias-web-management/target/classes/top/lejings/controller/LoginController.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/controller/SessionController.class b/case/server/tlias-web-management/target/classes/top/lejings/controller/SessionController.class
new file mode 100644
index 0000000..44eb343
Binary files /dev/null and b/case/server/tlias-web-management/target/classes/top/lejings/controller/SessionController.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/exception/GlobalExceptionHandler.class b/case/server/tlias-web-management/target/classes/top/lejings/exception/GlobalExceptionHandler.class
new file mode 100644
index 0000000..f8637c6
Binary files /dev/null and b/case/server/tlias-web-management/target/classes/top/lejings/exception/GlobalExceptionHandler.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/filter/LoginCheckFilter.class b/case/server/tlias-web-management/target/classes/top/lejings/filter/LoginCheckFilter.class
new file mode 100644
index 0000000..fbb5f6e
Binary files /dev/null and b/case/server/tlias-web-management/target/classes/top/lejings/filter/LoginCheckFilter.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/mapper/EmpMapper.class b/case/server/tlias-web-management/target/classes/top/lejings/mapper/EmpMapper.class
index 4702eb3..3d79f81 100644
Binary files a/case/server/tlias-web-management/target/classes/top/lejings/mapper/EmpMapper.class and b/case/server/tlias-web-management/target/classes/top/lejings/mapper/EmpMapper.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/service/EmpService.class b/case/server/tlias-web-management/target/classes/top/lejings/service/EmpService.class
index ab75656..0e5ed14 100644
Binary files a/case/server/tlias-web-management/target/classes/top/lejings/service/EmpService.class and b/case/server/tlias-web-management/target/classes/top/lejings/service/EmpService.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/service/impl/EmpServiceImpl.class b/case/server/tlias-web-management/target/classes/top/lejings/service/impl/EmpServiceImpl.class
index dfe17f1..f16eb1b 100644
Binary files a/case/server/tlias-web-management/target/classes/top/lejings/service/impl/EmpServiceImpl.class and b/case/server/tlias-web-management/target/classes/top/lejings/service/impl/EmpServiceImpl.class differ
diff --git a/case/server/tlias-web-management/target/classes/top/lejings/utils/JwtUtils.class b/case/server/tlias-web-management/target/classes/top/lejings/utils/JwtUtils.class
new file mode 100644
index 0000000..92363fe
Binary files /dev/null and b/case/server/tlias-web-management/target/classes/top/lejings/utils/JwtUtils.class differ
diff --git a/case/server/tlias-web-management/target/test-classes/top/lejings/TliasWebManagementApplicationTests.class b/case/server/tlias-web-management/target/test-classes/top/lejings/TliasWebManagementApplicationTests.class
new file mode 100644
index 0000000..55b31c8
Binary files /dev/null and b/case/server/tlias-web-management/target/test-classes/top/lejings/TliasWebManagementApplicationTests.class differ
diff --git a/case/server/tlias-web-management/tlias-web-management.iml b/case/server/tlias-web-management/tlias-web-management.iml
index e7b1d36..1daccae 100644
--- a/case/server/tlias-web-management/tlias-web-management.iml
+++ b/case/server/tlias-web-management/tlias-web-management.iml
@@ -1,99 +1,8 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file