2024年12月9日18:59:31

main
LeJingS 3 months ago
parent e467b35344
commit 420fe3672f

@ -296,3 +296,54 @@
127.0.0.1 - - [08/Dec/2024:19:28:19 +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 - - [08/Dec/2024:19:28:19 +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 - - [08/Dec/2024:19:30:21 +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 - - [08/Dec/2024:19:30:21 +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 - - [08/Dec/2024:19:30:22 +0800] "GET /api/depts HTTP/1.1" 200 537 "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 - - [08/Dec/2024:19:30:22 +0800] "GET /api/depts HTTP/1.1" 200 537 "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:09:19:00 +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 - - [09/Dec/2024:09:19: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 - - [09/Dec/2024:09:19:03 +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 - - [09/Dec/2024:09:19: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 - - [09/Dec/2024:09:20: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 - - [09/Dec/2024:09:20:27 +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 - - [09/Dec/2024:09:20:27 +0800] "GET /api/depts HTTP/1.1" 499 0 "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:09:20:31 +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 - - [09/Dec/2024:09:23:23 +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 - - [09/Dec/2024:09:23: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 - - [09/Dec/2024:10:10:05 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1" 500 116 "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:10:05 +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 - - [09/Dec/2024:10:10:07 +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 - - [09/Dec/2024:10:10:07 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=5 HTTP/1.1" 500 116 "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:10:07 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:06 +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 - - [09/Dec/2024:10:13:09 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=2&pageSize=5 HTTP/1.1" 200 1121 "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:09 +0800] "GET /6.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:09 +0800] "GET /7.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:09 +0800] "GET /8.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:09 +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:09 +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:13:10 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=3&pageSize=5 HTTP/1.1" 200 1142 "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:10 +0800] "GET /11.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:10 +0800] "GET /12.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:10 +0800] "GET /13.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:10 +0800] "GET /14.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:10 +0800] "GET /15.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:10 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=4&pageSize=5 HTTP/1.1" 200 507 "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:10 +0800] "GET /16.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:10 +0800] "GET /17.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:12 +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 - - [09/Dec/2024:10:13:12 +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 - - [09/Dec/2024:10:13:12 +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 - - [09/Dec/2024:10:13:12 +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 - - [09/Dec/2024:10:13:12 +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 - - [09/Dec/2024:10:13:12 +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 - - [09/Dec/2024:10:13:15 +0800] "GET /api/emps?name=&gender=&begin=&end=&page=1&pageSize=10 HTTP/1.1" 200 2174 "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 /6.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 /7.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 /8.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 /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"

@ -6,3 +6,41 @@
2024/12/08 19:28:17 [error] 11036#25368: *4 CreateFile() "C:\Users\lejings\Desktop\gitea\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/08 19:28:17 [error] 11036#25368: *4 CreateFile() "C:\Users\lejings\Desktop\gitea\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/08 19:28:19 [error] 11036#25368: *4 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/08 19:28:19 [error] 11036#25368: *4 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/08 19:28:19 [error] 11036#25368: *4 CreateFile() "C:\Users\lejings\Desktop\gitea\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/08 19:28:19 [error] 11036#25368: *4 CreateFile() "C:\Users\lejings\Desktop\gitea\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/09 09:18:58 [error] 9660#11152: *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/09 09:19:00 [error] 9660#11152: *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/09 09:19:00 [error] 9660#11152: *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/09 09:19:02 [error] 9660#11152: *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/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/09 09:19:02 [error] 9660#11152: *2 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/09 09:19:02 [error] 9660#11152: *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/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 09:19:03 [error] 9660#11152: *2 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/09 09:19:03 [error] 9660#11152: *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/depts HTTP/1.1", upstream: "http://localhost/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 09:20:29 [error] 9660#11152: *7 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/09 09:20:31 [error] 9660#11152: *7 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://[::1]:8080/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 09:20:31 [error] 9660#11152: *7 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://[::1]:8080/depts", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:06 [error] 9660#11152: *21 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/09 10:13:06 [error] 9660#11152: *20 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/09 10:13:06 [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/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/"
2024/12/09 10:13:06 [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/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/09 10:13:06 [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/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/09 10:13:09 [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/6.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /6.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:09 [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/7.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /7.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:09 [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/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:09 [error] 9660#11152: *20 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:09 [error] 9660#11152: *21 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/09 10:13:10 [error] 9660#11152: *21 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/11.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /11.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [error] 9660#11152: *20 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/12.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /12.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [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/13.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /13.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [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/14.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /14.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [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/15.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /15.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [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/16.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /16.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:10 [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/17.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /17.jpg HTTP/1.1", host: "127.0.0.1:90", referrer: "http://127.0.0.1:90/"
2024/12/09 10:13:12 [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/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/"
2024/12/09 10:13:12 [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/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/09 10:13:12 [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/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/09 10:13:12 [error] 9660#11152: *20 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/09 10:13:12 [error] 9660#11152: *21 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/09 10:13:15 [error] 9660#11152: *21 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/6.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /6.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: *20 CreateFile() "C:\Users\LeJingS\Desktop\gitea_repo\java_learn\case\font\nginx-1.22.0-tlias\nginx-1.22.0-tlias/html/7.jpg" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /7.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: *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/"

@ -5,13 +5,33 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="d18bc836-b8df-46d0-a2f5-97532f2b72e1" name="更改" comment=""> <list default="true" id="d18bc836-b8df-46d0-a2f5-97532f2b72e1" name="更改" comment="">
<change beforePath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log" beforeDir="false" afterPath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/access.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log" beforeDir="false" afterPath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/error.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid" beforeDir="false" afterPath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid" beforeDir="false" afterPath="$PROJECT_DIR$/../../font/nginx-1.22.0-tlias/nginx-1.22.0-tlias/logs/nginx.pid" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources.local.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources.local.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/3fcacf9e-1712-4831-9be8-c8f53588bac7.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/3fcacf9e-1712-4831-9be8-c8f53588bac7.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/top/lejings/controller/EmpController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/top/lejings/controller/EmpController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/top/lejings/mapper/EmpMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/top/lejings/mapper/EmpMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/top/lejings/service/EmpService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/top/lejings/service/EmpService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/top/lejings/service/impl/EmpServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/top/lejings/service/impl/EmpServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/top/lejings/controller/EmpController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/top/lejings/controller/EmpController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/top/lejings/mapper/EmpMapper.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/top/lejings/mapper/EmpMapper.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/top/lejings/service/EmpService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/top/lejings/service/EmpService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/top/lejings/service/impl/EmpServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/top/lejings/service/impl/EmpServiceImpl.class" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component> </component>
@ -32,6 +52,9 @@
&quot;associatedIndex&quot;: 0 &quot;associatedIndex&quot;: 0
}</component> }</component>
<component name="ProjectId" id="2pvYksXrQVKv4OWQgcdFi2XFXyh" /> <component name="ProjectId" id="2pvYksXrQVKv4OWQgcdFi2XFXyh" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
@ -48,6 +71,7 @@
&quot;git-widget-placeholder&quot;: &quot;main&quot;, &quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;, &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/下载站/ConvertYamlAndProperties-1.0.5.jar&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
@ -56,7 +80,7 @@
&quot;project.structure.last.edited&quot;: &quot;项目&quot;, &quot;project.structure.last.edited&quot;: &quot;项目&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;, &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;, &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.keymap&quot;, &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
} }
}</component> }</component>
@ -80,6 +104,8 @@
<workItem from="1733648168131" duration="2395000" /> <workItem from="1733648168131" duration="2395000" />
<workItem from="1733654619772" duration="4984000" /> <workItem from="1733654619772" duration="4984000" />
<workItem from="1733663666585" duration="1237000" /> <workItem from="1733663666585" duration="1237000" />
<workItem from="1733705151732" duration="9239000" />
<workItem from="1733727287213" duration="613000" />
</task> </task>
<servers /> <servers />
</component> </component>

@ -0,0 +1,90 @@
## 文件上传
### 前端部分
三要素
```html
<from method ="post" enctype="multipart.from-data">
<input type = "file"><br>
</from>
```
### 后端部分
#### 文件接收
提交的文件在controller中使用springboot提供的api接收
`MultipartFile yourFileName`
#### 文件保存
## 登录认证功能
### 会话技术
由于同一会话之间需要数据共享http协议无状态。所以需要会话跟踪技术
- 客户端会话跟踪技术: Cookie
http支持浏览器自动
移动端App无法使用不安全用户可以自己禁用。不能跨域
- 服务端会话跟踪技术: Session
- 令牌技术
### JWT
## 异常处理
- 在contraller层处理异常
- 定义全局异常处理器(推荐)

@ -2,10 +2,9 @@ package top.lejings.controller;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import top.lejings.pojo.Emp; import top.lejings.pojo.Emp;
import top.lejings.pojo.PageBean;
import top.lejings.pojo.Result; import top.lejings.pojo.Result;
import top.lejings.service.EmpService; import top.lejings.service.EmpService;
@ -15,17 +14,19 @@ import java.util.List;
* Controller * Controller
*/ */
@Slf4j @Slf4j
@RestController("/emps") @RestController
@RequestMapping("/emps")
public class EmpController { public class EmpController {
@Autowired @Autowired
private EmpService empService; private EmpService empService;
@GetMapping() @GetMapping()
public Result list(@RequestBody Emp emp){ public Result page(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer pageSize){
log.info("查询员工数据,参数:{}",emp); log.info("查询员工数据,参数:page:{},size{}",page,pageSize);
List<Emp> empList = EmpService.list(emp); PageBean pageBean = empService.page(page, pageSize);
return Result.success(empList); return Result.success(pageBean);
} }
} }

@ -1,10 +1,19 @@
package top.lejings.mapper; package top.lejings.mapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.lejings.pojo.Emp;
import java.util.List;
/** /**
* *
*/ */
@Mapper @Mapper
public interface EmpMapper { public interface EmpMapper {
@Select("select count(*) from emp")
public Long count();
public List<Emp> page(Integer start, Integer pageSize);
} }

@ -0,0 +1,21 @@
package top.lejings.pojo;
/*
*
* */
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageBean {
private Long total;
public List rows;
}

@ -1,12 +1,14 @@
package top.lejings.service; package top.lejings.service;
import top.lejings.pojo.Emp; import top.lejings.pojo.Emp;
import top.lejings.pojo.PageBean;
import java.util.List; import java.util.List;
/** /**
* *
*/ */
public interface EmpService { public interface EmpService {
List<Emp> list(Emp emp); PageBean page(Integer page, Integer pageSize);
} }

@ -1,6 +1,9 @@
package top.lejings.service.impl; package top.lejings.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import top.lejings.mapper.EmpMapper;
import top.lejings.pojo.Emp; import top.lejings.pojo.Emp;
import top.lejings.pojo.PageBean;
import top.lejings.service.EmpService; import top.lejings.service.EmpService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -8,8 +11,19 @@ import java.util.List;
@Service @Service
public class EmpServiceImpl implements EmpService { public class EmpServiceImpl implements EmpService {
@Override
public List<Emp> list(Emp emp) {
return List.of(); @Autowired
private EmpMapper empMapper;
public PageBean page(Integer page, Integer pageSize){
//获取总记录数
Long count = empMapper.count();
//获取分页查询结果列表
List<Emp> empList=empMapper.page((page-1)*pageSize,pageSize);
//封装PageBean对象
PageBean pageBean=new PageBean(count,empList);
return pageBean;
} }
} }

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.lejings.mapper.EmpMapper">
<!-- 同包同名工作空间一致id一致返回值一致即resultType单条结果的封装类的全类名 -->
<select id="page" resultType="top.lejings.pojo.Emp">
select * from emp limit #{start},#{pageSize}
</select>
</mapper>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.lejings.mapper.EmpMapper">
<!-- 同包同名工作空间一致id一致返回值一致即resultType单条结果的封装类的全类名 -->
<select id="page" resultType="top.lejings.pojo.Emp">
select * from emp limit #{start},#{pageSize}
</select>
</mapper>
Loading…
Cancel
Save