完成了主窗口和增删改查
This commit is contained in:
290
hs_err_pid36376.log
Normal file
290
hs_err_pid36376.log
Normal file
@@ -0,0 +1,290 @@
|
||||
#
|
||||
# There is insufficient memory for the Java Runtime Environment to continue.
|
||||
# Native memory allocation (mmap) failed to map 8323072 bytes. Error detail: G1 virtual space
|
||||
# Possible reasons:
|
||||
# The system is out of physical RAM or swap space
|
||||
# This process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
|
||||
# Possible solutions:
|
||||
# Reduce memory load on the system
|
||||
# Increase physical memory or swap space
|
||||
# Check if swap backing store is full
|
||||
# Decrease Java heap size (-Xmx/-Xms)
|
||||
# Decrease number of Java threads
|
||||
# Decrease Java thread stack sizes (-Xss)
|
||||
# Set larger code cache with -XX:ReservedCodeCacheSize=
|
||||
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
|
||||
# placed in the first 32GB address space. The Java Heap base address is the
|
||||
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
|
||||
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
|
||||
# This output file may be truncated or incomplete.
|
||||
#
|
||||
# Out of Memory Error (os_windows.cpp:3828), pid=36376, tid=60436
|
||||
#
|
||||
# JRE version: (21.0.5+8) (build )
|
||||
# Java VM: OpenJDK 64-Bit Server VM (21.0.5+8-b631.30, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
|
||||
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
|
||||
#
|
||||
|
||||
--------------- S U M M A R Y ------------
|
||||
|
||||
Command Line: git4idea.http.GitAskPassApp Username for 'https://gitea.kronecker.cc':
|
||||
|
||||
Host: 13th Gen Intel(R) Core(TM) i7-13620H, 16 cores, 31G, Windows 11 , 64 bit Build 26100 (10.0.26100.3912)
|
||||
Time: Sun Dec 7 22:30:22 2025 Windows 11 , 64 bit Build 26100 (10.0.26100.3912) elapsed time: 1.502574 seconds (0d 0h 0m 1s)
|
||||
|
||||
--------------- T H R E A D ---------------
|
||||
|
||||
Current thread (0x00000297b3889a10): JavaThread "Unknown thread" [_thread_in_vm, id=60436, stack(0x000000d684000000,0x000000d684100000) (1024K)]
|
||||
|
||||
Stack: [0x000000d684000000,0x000000d684100000]
|
||||
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
|
||||
V [jvm.dll+0x6e52b9]
|
||||
V [jvm.dll+0x8c3633]
|
||||
V [jvm.dll+0x8c5b8e]
|
||||
V [jvm.dll+0x8c6273]
|
||||
V [jvm.dll+0x288f46]
|
||||
V [jvm.dll+0x6e1a35]
|
||||
V [jvm.dll+0x6d5e3a]
|
||||
V [jvm.dll+0x3634bb]
|
||||
V [jvm.dll+0x36b086]
|
||||
V [jvm.dll+0x3bd35b]
|
||||
V [jvm.dll+0x3bd618]
|
||||
V [jvm.dll+0x335c2c]
|
||||
V [jvm.dll+0x33691b]
|
||||
V [jvm.dll+0x88aa89]
|
||||
V [jvm.dll+0x3ca518]
|
||||
V [jvm.dll+0x873b98]
|
||||
V [jvm.dll+0x45eede]
|
||||
V [jvm.dll+0x460bc1]
|
||||
C [jli.dll+0x52ab]
|
||||
C [ucrtbase.dll+0x37b0]
|
||||
C [KERNEL32.DLL+0x2e8d7]
|
||||
C [ntdll.dll+0x9c5dc]
|
||||
|
||||
|
||||
--------------- P R O C E S S ---------------
|
||||
|
||||
Threads class SMR info:
|
||||
_java_thread_list=0x00007ffcc08aa148, length=0, elements={
|
||||
}
|
||||
|
||||
Java Threads: ( => current thread )
|
||||
Total: 0
|
||||
|
||||
Other Threads:
|
||||
0x00000297b54e98c0 WorkerThread "GC Thread#0" [id=35860, stack(0x000000d684100000,0x000000d684200000) (1024K)]
|
||||
0x00000297b54fb4e0 ConcurrentGCThread "G1 Main Marker" [id=58320, stack(0x000000d684200000,0x000000d684300000) (1024K)]
|
||||
0x00000297b54fc780 WorkerThread "G1 Conc#0" [id=60424, stack(0x000000d684300000,0x000000d684400000) (1024K)]
|
||||
|
||||
[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffcbff98ce7]
|
||||
VM state: not at safepoint (not fully initialized)
|
||||
|
||||
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
|
||||
[0x00007ffcc091eb30] Heap_lock - owner thread: 0x00000297b3889a10
|
||||
|
||||
Heap address: 0x0000000604800000, size: 8120 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
|
||||
|
||||
CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 1.
|
||||
Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0
|
||||
|
||||
GC Precious Log:
|
||||
CardTable entry size: 512
|
||||
Card Set container configuration: InlinePtr #cards 4 size 8 Array Of Cards #cards 32 size 80 Howl #buckets 8 coarsen threshold 7372 Howl Bitmap #cards 1024 size 144 coarsen threshold 921 Card regions per heap region 1 cards per card region 8192
|
||||
|
||||
Heap:
|
||||
garbage-first heap total 0K, used 0K [0x0000000604800000, 0x0000000800000000)
|
||||
region size 4096K, 0 young (0K), 0 survivors (0K)
|
||||
Metaspace used 0K, committed 0K, reserved 0K
|
||||
class space used 0K, committed 0K, reserved 0K
|
||||
|
||||
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, TAMS=top-at-mark-start, PB=parsable bottom
|
||||
|
||||
Card table byte_map: [0x00000297ca380000,0x00000297cb360000] _byte_map_base: 0x00000297c735c000
|
||||
|
||||
Marking Bits: (CMBitMap*) 0x00000297b54e9fc0
|
||||
Bits: [0x00000297cb360000, 0x00000297d3240000)
|
||||
|
||||
GC Heap History (0 events):
|
||||
No events
|
||||
|
||||
Dll operation events (1 events):
|
||||
Event: 0.007 Loaded shared library D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\java.dll
|
||||
|
||||
Deoptimization events (0 events):
|
||||
No events
|
||||
|
||||
Classes loaded (0 events):
|
||||
No events
|
||||
|
||||
Classes unloaded (0 events):
|
||||
No events
|
||||
|
||||
Classes redefined (0 events):
|
||||
No events
|
||||
|
||||
Internal exceptions (0 events):
|
||||
No events
|
||||
|
||||
ZGC Phase Switch (0 events):
|
||||
No events
|
||||
|
||||
VM Operations (0 events):
|
||||
No events
|
||||
|
||||
Memory protections (0 events):
|
||||
No events
|
||||
|
||||
Nmethod flushes (0 events):
|
||||
No events
|
||||
|
||||
Events (0 events):
|
||||
No events
|
||||
|
||||
|
||||
Dynamic libraries:
|
||||
0x00007ff676710000 - 0x00007ff67671a000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\java.exe
|
||||
0x00007ffe17fc0000 - 0x00007ffe18226000 C:\Windows\SYSTEM32\ntdll.dll
|
||||
0x00007ffe16180000 - 0x00007ffe16249000 C:\Windows\System32\KERNEL32.DLL
|
||||
0x00007ffe15220000 - 0x00007ffe155ec000 C:\Windows\System32\KERNELBASE.dll
|
||||
0x00007ffe15a00000 - 0x00007ffe15b4b000 C:\Windows\System32\ucrtbase.dll
|
||||
0x00007ffdf8950000 - 0x00007ffdf896b000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\VCRUNTIME140.dll
|
||||
0x00007ffdf89c0000 - 0x00007ffdf89d8000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\jli.dll
|
||||
0x00007ffe16340000 - 0x00007ffe1650a000 C:\Windows\System32\USER32.dll
|
||||
0x00007ffe15150000 - 0x00007ffe15177000 C:\Windows\System32\win32u.dll
|
||||
0x00007ffdf55a0000 - 0x00007ffdf583a000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.26100.3912_none_3e07963ce335137e\COMCTL32.dll
|
||||
0x00007ffe17c20000 - 0x00007ffe17c4b000 C:\Windows\System32\GDI32.dll
|
||||
0x00007ffe15d80000 - 0x00007ffe15e29000 C:\Windows\System32\msvcrt.dll
|
||||
0x00007ffe15830000 - 0x00007ffe15962000 C:\Windows\System32\gdi32full.dll
|
||||
0x00007ffe15cd0000 - 0x00007ffe15d73000 C:\Windows\System32\msvcp_win.dll
|
||||
0x00007ffe16250000 - 0x00007ffe16280000 C:\Windows\System32\IMM32.DLL
|
||||
0x00007ffe0f570000 - 0x00007ffe0f57c000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\vcruntime140_1.dll
|
||||
0x00007ffda1170000 - 0x00007ffda11fd000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\msvcp140.dll
|
||||
0x00007ffcbfc50000 - 0x00007ffcc0a11000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\server\jvm.dll
|
||||
0x00007ffe17630000 - 0x00007ffe176e2000 C:\Windows\System32\ADVAPI32.dll
|
||||
0x00007ffe16290000 - 0x00007ffe16336000 C:\Windows\System32\sechost.dll
|
||||
0x00007ffe15e30000 - 0x00007ffe15f46000 C:\Windows\System32\RPCRT4.dll
|
||||
0x00007ffe17ba0000 - 0x00007ffe17c14000 C:\Windows\System32\WS2_32.dll
|
||||
0x00007ffe140e0000 - 0x00007ffe1413e000 C:\Windows\SYSTEM32\POWRPROF.dll
|
||||
0x00007ffe11b40000 - 0x00007ffe11b76000 C:\Windows\SYSTEM32\WINMM.dll
|
||||
0x00007ffe0b240000 - 0x00007ffe0b24b000 C:\Windows\SYSTEM32\VERSION.dll
|
||||
0x00007ffe140c0000 - 0x00007ffe140d4000 C:\Windows\SYSTEM32\UMPDC.dll
|
||||
0x00007ffe13fa0000 - 0x00007ffe13fba000 C:\Windows\SYSTEM32\kernel.appcore.dll
|
||||
0x00007ffe0f520000 - 0x00007ffe0f52a000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\jimage.dll
|
||||
0x00007ffe12840000 - 0x00007ffe12a81000 C:\Windows\SYSTEM32\DBGHELP.DLL
|
||||
0x00007ffe17750000 - 0x00007ffe17ad4000 C:\Windows\System32\combase.dll
|
||||
0x00007ffe15f80000 - 0x00007ffe16060000 C:\Windows\System32\OLEAUT32.dll
|
||||
0x00007ffde3870000 - 0x00007ffde38a9000 C:\Windows\SYSTEM32\dbgcore.DLL
|
||||
0x00007ffe15180000 - 0x00007ffe15219000 C:\Windows\System32\bcryptPrimitives.dll
|
||||
0x00007ffdf8930000 - 0x00007ffdf8950000 D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\java.dll
|
||||
|
||||
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
|
||||
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.26100.3912_none_3e07963ce335137e;D:\IDEAUI\IntelliJ IDEA 2024.3.2.1\jbr\bin\server
|
||||
|
||||
VM Arguments:
|
||||
java_command: git4idea.http.GitAskPassApp Username for 'https://gitea.kronecker.cc':
|
||||
java_class_path (initial): D:/IDEAUI/IntelliJ IDEA 2024.3.2.1/plugins/vcs-git/lib/git4idea-rt.jar;D:/IDEAUI/IntelliJ IDEA 2024.3.2.1/lib/externalProcess-rt.jar
|
||||
Launcher Type: SUN_STANDARD
|
||||
|
||||
[Global flags]
|
||||
intx CICompilerCount = 12 {product} {ergonomic}
|
||||
uint ConcGCThreads = 3 {product} {ergonomic}
|
||||
uint G1ConcRefinementThreads = 13 {product} {ergonomic}
|
||||
size_t G1HeapRegionSize = 4194304 {product} {ergonomic}
|
||||
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
|
||||
size_t InitialHeapSize = 532676608 {product} {ergonomic}
|
||||
size_t MarkStackSize = 4194304 {product} {ergonomic}
|
||||
size_t MaxHeapSize = 8514437120 {product} {ergonomic}
|
||||
size_t MinHeapDeltaBytes = 4194304 {product} {ergonomic}
|
||||
size_t MinHeapSize = 8388608 {product} {ergonomic}
|
||||
uintx NonNMethodCodeHeapSize = 7602480 {pd product} {ergonomic}
|
||||
uintx NonProfiledCodeHeapSize = 122027880 {pd product} {ergonomic}
|
||||
uintx ProfiledCodeHeapSize = 122027880 {pd product} {ergonomic}
|
||||
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
|
||||
bool SegmentedCodeCache = true {product} {ergonomic}
|
||||
size_t SoftMaxHeapSize = 8514437120 {manageable} {ergonomic}
|
||||
bool UseCompressedOops = true {product lp64_product} {ergonomic}
|
||||
bool UseG1GC = true {product} {ergonomic}
|
||||
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
|
||||
|
||||
Logging:
|
||||
Log output configuration:
|
||||
#0: stdout all=warning uptime,level,tags foldmultilines=false
|
||||
#1: stderr all=off uptime,level,tags foldmultilines=false
|
||||
|
||||
Environment Variables:
|
||||
JAVA_HOME=E:\java21
|
||||
PATH=C:/Program Files/Git/mingw64/libexec/git-core;C:/Program Files/Git/mingw64/libexec/git-core;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\KiriAky\bin;C:\Program Files\Microsoft MPI\Bin\;E:\java21\bin;D:\mingw64\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\libnvvp;D:\VMware\bin\;C:\Python313\Scripts;C:\Python313;C:\Python312\Scripts\;C:\Python312\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Recovery\OEM\Backup\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Users\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\ProgramData\chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA app\NvDLISR;H:\platform-tools;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\NVIDIA Corporation\Nsight Compute 2024.3.2\;C:\mingw64\bin;C:\Program Files\GTK3-Runtime Win64\bin;C:\Program Files\Git\cmd;C:\Program Files\Pandoc\;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Microsoft SQL Server\170\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Python313\Scripts\;C:\Python313\;C:\Users\KiriAky\AppData\Local\Programs\Python\Python313\Scripts\;C:\Users\KiriAky\AppData\Local\Programs\Python\Python313\;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\\..\extras\CUPTI\lib64;E:\java21\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\libnvvp;D:\VMware\bin\;C:\Python312\Scripts\;C:\Python312\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Recovery\OEM\Backup\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Users\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Git\cmd;C:\Program Files\Microsof;D:\Microsoft VS Code\bin;C:\Users\KiriAky\AppData\Roaming\npm
|
||||
USERNAME=KiriAky
|
||||
DISPLAY=:0.0
|
||||
LC_ALL=en_US.UTF-8
|
||||
TERM=xterm-256color
|
||||
TMPDIR=C:\Users\KiriAky\AppData\Local\Temp
|
||||
OS=Windows_NT
|
||||
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 186 Stepping 2, GenuineIntel
|
||||
TMP=C:\Users\KiriAky\AppData\Local\Temp
|
||||
TEMP=C:\Users\KiriAky\AppData\Local\Temp
|
||||
|
||||
|
||||
|
||||
|
||||
Periodic native trim disabled
|
||||
|
||||
JNI global refs:
|
||||
JNI global refs: 0, weak refs: 0
|
||||
|
||||
JNI global refs memory usage: 0, weak refs: 0
|
||||
|
||||
Process memory usage:
|
||||
Resident Set Size: 13356K (0% of 33251192K total physical memory with 1375080K free physical memory)
|
||||
|
||||
OOME stack traces (most recent first):
|
||||
Classloader memory used:
|
||||
|
||||
--------------- S Y S T E M ---------------
|
||||
|
||||
OS:
|
||||
Windows 11 , 64 bit Build 26100 (10.0.26100.3912)
|
||||
OS uptime: 12 days 11:36 hours
|
||||
|
||||
CPU: total 16 (initial active 16) (8 cores per cpu, 2 threads per core) family 6 model 186 stepping 2 microcode 0x4114, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, clwb, serialize, rdtscp, rdpid, fsrm, f16c, pku, cet_ibt, cet_ss
|
||||
Processor Information for processor 0
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 1
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 2
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 3
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 4
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 5
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 6
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 7
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 8
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 9
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 10
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 11
|
||||
Max Mhz: 2400, Current Mhz: 2400, Mhz Limit: 2400
|
||||
Processor Information for processor 12
|
||||
Max Mhz: 2400, Current Mhz: 1800, Mhz Limit: 1800
|
||||
Processor Information for processor 13
|
||||
Max Mhz: 2400, Current Mhz: 1800, Mhz Limit: 1800
|
||||
Processor Information for processor 14
|
||||
Max Mhz: 2400, Current Mhz: 1800, Mhz Limit: 1800
|
||||
Processor Information for processor 15
|
||||
Max Mhz: 2400, Current Mhz: 1800, Mhz Limit: 1800
|
||||
|
||||
Memory: 4k page, system-wide physical 32471M (1342M free)
|
||||
TotalPageFile size 68431M (AvailPageFile size 9M)
|
||||
current process WorkingSet (physical memory assigned to process): 13M, peak: 13M
|
||||
current process commit charge ("private bytes"): 580M, peak: 588M
|
||||
|
||||
vm_info: OpenJDK 64-Bit Server VM (21.0.5+8-b631.30) for windows-amd64 JRE (21.0.5+8-b631.30), built on 2024-12-06 by "builduser" with MS VC++ 16.10 / 16.11 (VS2019)
|
||||
|
||||
END.
|
||||
2
src/Main.java
Normal file
2
src/Main.java
Normal file
@@ -0,0 +1,2 @@
|
||||
public class Main {
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
package backend;
|
||||
|
||||
import backend.model.enums.LoginStatus;
|
||||
import view.LoginFrame;
|
||||
import view.MainFrame;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
LoginFrame loginframe = new LoginFrame();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
156
src/backend/dao/impl/QuestionsDao.java
Normal file
156
src/backend/dao/impl/QuestionsDao.java
Normal file
@@ -0,0 +1,156 @@
|
||||
package backend.dao.impl;
|
||||
import backend.model.Questions;
|
||||
import backend.utils.DBConnectionPool;
|
||||
import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class QuestionsDao {
|
||||
List<Questions> commonResultSet(ResultSet rs) throws SQLException{
|
||||
List<Questions> questionPoList = new ArrayList<>();
|
||||
while(rs.next()){
|
||||
Questions questions = new Questions();
|
||||
questions.setId(rs.getInt("id"));
|
||||
questions.setName(rs.getString("name"));
|
||||
questions.setDescription(rs.getString("description"));
|
||||
questions.setAnswer(rs.getString("answer"));
|
||||
questions.setFrequency(rs.getInt("frequency"));
|
||||
questionPoList.add(questions);
|
||||
}
|
||||
return questionPoList;
|
||||
}
|
||||
public List<Questions> getAll() {
|
||||
List<Questions> questionPoList = new ArrayList<>();
|
||||
//1. 从连接池中拿到连接
|
||||
Connection conn = DBConnectionPool.getConnection();
|
||||
if(conn==null)
|
||||
return null;
|
||||
//2. 创建Statement对象
|
||||
String sql = "select id,name,description,answer,frequency from questions";
|
||||
try{
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
questionPoList=commonResultSet(rs);
|
||||
rs.close();
|
||||
stmt.close();
|
||||
|
||||
}catch(SQLException e){
|
||||
System.out.println("数据库异常:"+ e.getMessage());
|
||||
}finally {
|
||||
DBConnectionPool.releaseConnection(conn);
|
||||
}
|
||||
return questionPoList;
|
||||
}
|
||||
public List<Questions> getByCondition(Integer frequency,String key) {
|
||||
List<Questions> wordPoList = null;
|
||||
//1. 从连接池中拿到连接
|
||||
Connection conn = DBConnectionPool.getConnection();
|
||||
if(conn==null)
|
||||
return null;
|
||||
//2. 创建Statement对象
|
||||
String sql = "select id,name,description,answer,frequency from questions where name like ?";
|
||||
if(frequency != null)
|
||||
sql += " and frequency = ?";
|
||||
try{
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.setString(1, "%"+key+"%");
|
||||
if(frequency != null)
|
||||
stmt.setInt(2, frequency);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
wordPoList=commonResultSet(rs);
|
||||
rs.close();
|
||||
stmt.close();
|
||||
|
||||
}catch(SQLException e){
|
||||
System.out.println("数据库异常:"+ e.getMessage());
|
||||
}finally {
|
||||
DBConnectionPool.releaseConnection(conn);
|
||||
}
|
||||
return wordPoList;
|
||||
}
|
||||
|
||||
public boolean insert(Questions question){
|
||||
int row = 0;
|
||||
//1. 从连接池中拿到连接
|
||||
Connection conn = DBConnectionPool.getConnection();
|
||||
if(conn==null)
|
||||
return false;
|
||||
//2. 创建Statement对象
|
||||
String sql = "insert into questions(name,description,answer,frequency) values(?,?,?,?)";
|
||||
try{
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.setString(1, question.getName());
|
||||
stmt.setString(2, question.getDescription());
|
||||
stmt.setString(3, question.getAnswer());
|
||||
stmt.setInt(4, question.getFrequency());
|
||||
row = stmt.executeUpdate();
|
||||
stmt.close();
|
||||
|
||||
}catch(SQLException e){
|
||||
System.out.println("数据库异常:"+ e.getMessage());
|
||||
}finally {
|
||||
DBConnectionPool.releaseConnection(conn);
|
||||
}
|
||||
return row > 1;
|
||||
}
|
||||
public boolean delete(Integer id){
|
||||
int row = 0;
|
||||
//1. 从连接池中拿到连接
|
||||
Connection conn = DBConnectionPool.getConnection();
|
||||
if(conn==null)
|
||||
return false;
|
||||
//2. 创建Statement对象
|
||||
String sql = "delete from questions where id = ?";
|
||||
try{
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.setInt(1, id);
|
||||
row = stmt.executeUpdate();
|
||||
stmt.close();
|
||||
|
||||
}catch(SQLException e){
|
||||
System.out.println("数据库异常:"+ e.getMessage());
|
||||
}finally {
|
||||
DBConnectionPool.releaseConnection(conn);
|
||||
}
|
||||
return row > 1;
|
||||
}
|
||||
public boolean updata(Questions question){
|
||||
int row = 0;
|
||||
//1. 从连接池中拿到连接
|
||||
Connection conn = DBConnectionPool.getConnection();
|
||||
if(conn==null)
|
||||
return false;
|
||||
//2. 创建Statement对象
|
||||
String sql = "updata questions set name = ?,description = ?,answer = ?,frequency=? where id = ?";
|
||||
try{
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.setString(1, question.getName());
|
||||
stmt.setString(2, question.getDescription());
|
||||
stmt.setString(3, question.getAnswer());
|
||||
stmt.setInt(4, question.getFrequency());
|
||||
stmt.setInt(5, question.getId());
|
||||
row = stmt.executeUpdate();
|
||||
stmt.close();
|
||||
|
||||
}catch(SQLException e){
|
||||
System.out.println("数据库异常:"+ e.getMessage());
|
||||
}finally {
|
||||
DBConnectionPool.releaseConnection(conn);
|
||||
}
|
||||
return row > 1;
|
||||
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// WordDao wordDao = new WordDao();
|
||||
// //查询
|
||||
// List<WordPo> wordPoList = wordDao.getByCondition(3,"v");
|
||||
// if(wordPoList != null)
|
||||
// for(WordPo wordPo:wordPoList)
|
||||
// System.out.println(wordPo.getWord());
|
||||
// //增加
|
||||
// wordDao.insert(new WordPo("test", "test", "test", 1));
|
||||
// //更新
|
||||
// wordDao.updata(new WordPo(1, 1, "test", "test", "test"));
|
||||
// }
|
||||
}
|
||||
@@ -6,4 +6,44 @@ public class Questions {
|
||||
private String description;
|
||||
private String answer;
|
||||
private int frequency;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getAnswer() {
|
||||
return answer;
|
||||
}
|
||||
|
||||
public void setAnswer(String answer) {
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
public int getFrequency() {
|
||||
return frequency;
|
||||
}
|
||||
|
||||
public void setFrequency(int frequency) {
|
||||
this.frequency = frequency;
|
||||
}
|
||||
}
|
||||
|
||||
11
src/backend/model/enums/GlobalData.java
Normal file
11
src/backend/model/enums/GlobalData.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package backend.model.enums;
|
||||
import java.util.*;
|
||||
|
||||
public class GlobalData {
|
||||
public static final Map<Integer,String> FREQUENCY_MAP = new HashMap<>();
|
||||
static{
|
||||
FREQUENCY_MAP.put(1,"低频");
|
||||
FREQUENCY_MAP.put(2,"中频");
|
||||
FREQUENCY_MAP.put(3,"高频");
|
||||
}
|
||||
}
|
||||
48
src/backend/service/impl/QuestionsService.java
Normal file
48
src/backend/service/impl/QuestionsService.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package backend.service.impl;
|
||||
|
||||
import backend.dao.impl.QuestionsDao;
|
||||
import backend.model.Questions;
|
||||
import backend.model.enums.GlobalData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
public class QuestionsService {
|
||||
private QuestionsDao questionsDao = new QuestionsDao();
|
||||
private Vector<Vector<String>> commonHandler(List<Questions> questionsList){
|
||||
//加工数据 把数据库查到的List转成Vector<Vector<>>
|
||||
Vector<Vector<String>> questionsData = new Vector<>();
|
||||
if(questionsList != null) {
|
||||
for (Questions questionsPo : questionsList) {
|
||||
Vector<String> row = new Vector<>();
|
||||
row.add(String.valueOf(questionsPo.getId()));
|
||||
row.add(questionsPo.getName());
|
||||
row.add(questionsPo.getDescription());
|
||||
row.add(questionsPo.getAnswer());
|
||||
row.add(GlobalData.FREQUENCY_MAP.get(questionsPo.getFrequency()));
|
||||
questionsData.add(row);
|
||||
}
|
||||
}
|
||||
return questionsData;
|
||||
}
|
||||
public Vector<Vector<String>> getAll(){
|
||||
//从数据库中获取所有单词
|
||||
List<Questions> questionsList = questionsDao.getAll();
|
||||
//把List转成表格所需的格式
|
||||
return commonHandler(questionsList);
|
||||
//返回给前端
|
||||
}
|
||||
|
||||
public Vector<Vector<String>> getByCondition(Integer frequency,String key){
|
||||
//从数据库中获取所有单词
|
||||
List<Questions> wordPoList = questionsDao.getByCondition(frequency,key);
|
||||
//把List转成表格所需的格式
|
||||
return commonHandler(wordPoList);
|
||||
}
|
||||
public boolean insert(Questions question){
|
||||
return questionsDao.insert(question);
|
||||
}
|
||||
public void delete(Integer id){
|
||||
questionsDao.delete(id);
|
||||
}
|
||||
}
|
||||
11
src/view/ExamPanel.java
Normal file
11
src/view/ExamPanel.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package view;
|
||||
|
||||
import javax.swing.*;
|
||||
public class ExamPanel extends JPanel{
|
||||
public ExamPanel() {
|
||||
initView();
|
||||
}
|
||||
private void initView(){
|
||||
add(new JLabel("考试管理"));
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,12 @@ public class LoginFrame extends JFrame{
|
||||
private JButton loginButton;//登录按钮
|
||||
private JButton registerButton;//注册按钮
|
||||
private AuthService authService = new AuthService();
|
||||
private LoginStatus flag;
|
||||
|
||||
public LoginStatus Flag(){
|
||||
return this.flag;
|
||||
}
|
||||
|
||||
public LoginFrame() {
|
||||
//初始化界面
|
||||
initView();
|
||||
@@ -71,7 +77,7 @@ public class LoginFrame extends JFrame{
|
||||
LoginStatus loginStatus = authService.login(account);
|
||||
if(loginStatus == LoginStatus.SUCCESS) {
|
||||
//进入主界面
|
||||
MainFrame mainFrame = new MainFrame();
|
||||
new MainFrame();
|
||||
this.dispose();
|
||||
}
|
||||
else if(loginStatus == LoginStatus.USER_NOT_FOUND) {
|
||||
|
||||
@@ -1,7 +1,78 @@
|
||||
package view;
|
||||
|
||||
import javax.swing.*;
|
||||
import backend.model.Questions;
|
||||
|
||||
public class MainFrame {
|
||||
import javax.swing.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
public class MainFrame extends JFrame{
|
||||
private JPanel mainPanel;
|
||||
private JMenuBar menuBar;
|
||||
private JMenu questionsMenu;
|
||||
private JMenu examMenu;
|
||||
|
||||
public MainFrame(){
|
||||
initView();
|
||||
initListener();
|
||||
}
|
||||
private void initView(){
|
||||
//1.设置标题
|
||||
setTitle("主界面");
|
||||
//2.设置点击关闭时的动作
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
//3.中间层容器
|
||||
add(initPanel());
|
||||
//4.不允许窗口改变大小
|
||||
setResizable(false);
|
||||
//5.自动调整窗口大小 居中显示
|
||||
setSize(600,600);
|
||||
//pack();//自动调整窗口大小
|
||||
setLocationRelativeTo(null);
|
||||
//6.注册监听器
|
||||
initListener();
|
||||
//7.显示窗口
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
private void initListener(){
|
||||
questionsMenu.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
mainPanel.removeAll();
|
||||
mainPanel.add(new QuestionsPanel());
|
||||
mainPanel.revalidate();
|
||||
mainPanel.repaint();
|
||||
}
|
||||
});
|
||||
examMenu.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
mainPanel.removeAll();
|
||||
mainPanel.add(new ExamPanel());
|
||||
mainPanel.revalidate();
|
||||
mainPanel.repaint();
|
||||
}
|
||||
});
|
||||
}
|
||||
private JPanel initPanel(){
|
||||
mainPanel = new JPanel();
|
||||
mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
|
||||
setJMenuBar(initMenuBar());
|
||||
//默认为单词库界面
|
||||
mainPanel.add(new QuestionsPanel());
|
||||
mainPanel.setVisible(true);
|
||||
return mainPanel;
|
||||
}
|
||||
private JMenuBar initMenuBar(){
|
||||
menuBar = new JMenuBar();
|
||||
questionsMenu = new JMenu("问题库管理");
|
||||
examMenu = new JMenu("考试管理");
|
||||
menuBar.add(questionsMenu);
|
||||
menuBar.add(examMenu);
|
||||
return menuBar;
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
new MainFrame().initView();
|
||||
}
|
||||
}
|
||||
|
||||
108
src/view/QuestionsPanel.java
Normal file
108
src/view/QuestionsPanel.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package view;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.*;
|
||||
import java.util.Vector;
|
||||
|
||||
import backend.service.impl.QuestionsService;
|
||||
|
||||
public class QuestionsPanel extends JPanel{
|
||||
private QuestionsService questionsService = new QuestionsService();
|
||||
private static Vector<String> columNames = new Vector<>();
|
||||
private DefaultTableModel model;
|
||||
private JTable table;
|
||||
private JScrollPane scrollPane;
|
||||
private Vector<Vector<String>> tableData;
|
||||
//按钮界面
|
||||
private JButton addButton;
|
||||
private JButton deleteButton;
|
||||
private JButton editButton;
|
||||
//搜索界面
|
||||
private JComboBox frequencyComboBox;
|
||||
private JTextField keyTextField;
|
||||
private JButton queryButton;
|
||||
static {
|
||||
columNames.add("ID");
|
||||
columNames.add("题目");
|
||||
columNames.add("描述");
|
||||
columNames.add("答案");
|
||||
columNames.add("频率");
|
||||
}
|
||||
public void initListener(){
|
||||
queryButton.addActionListener(e->{
|
||||
int frequency = frequencyComboBox.getSelectedIndex()==0?null:frequencyComboBox.getSelectedIndex();
|
||||
String key = keyTextField.getText();
|
||||
//清楚已有数据
|
||||
model.setRowCount(0);
|
||||
//条件查询
|
||||
tableData = questionsService.getByCondition(frequency,key);
|
||||
//刷新表格
|
||||
refreshData();
|
||||
});
|
||||
deleteButton.addActionListener(e->{
|
||||
int row = table.getSelectedRow();
|
||||
if(row!=-1){
|
||||
int id = Integer.valueOf(tableData.get(row).get(0));
|
||||
String word = tableData.get(row).get(1);
|
||||
int option = JOptionPane.showConfirmDialog(this,"确认删除"+word+"吗?","提示",JOptionPane.YES_NO_CANCEL_OPTION);
|
||||
if(option == JOptionPane.YES_OPTION){
|
||||
questionsService.delete(id);
|
||||
model.removeRow(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
public QuestionsPanel(){
|
||||
initView();
|
||||
initListener();
|
||||
}
|
||||
private void initView(){
|
||||
//设置主面板的布局为盒子布局,垂直方向
|
||||
setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
|
||||
//1.按钮界面
|
||||
JPanel buttonPanel = new JPanel();
|
||||
buttonPanel.setLayout(new GridLayout(1,3,5,5));
|
||||
addButton = new JButton("添加");
|
||||
deleteButton = new JButton("删除");
|
||||
editButton = new JButton("修改");
|
||||
|
||||
buttonPanel.add(addButton);
|
||||
buttonPanel.add(deleteButton);
|
||||
buttonPanel.add(editButton);
|
||||
buttonPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE,50));
|
||||
add(buttonPanel);
|
||||
//添加垂直间隔
|
||||
add(Box.createVerticalStrut(10));
|
||||
//2.搜索界面
|
||||
JPanel queryPanel = new JPanel();
|
||||
queryPanel.setLayout(new GridLayout(1,3,5,5));
|
||||
frequencyComboBox = new JComboBox<String>(new String[]{"全部","低频","中频","高频"});
|
||||
keyTextField = new JTextField(15);
|
||||
queryButton = new JButton("查询");
|
||||
queryPanel.add(frequencyComboBox);
|
||||
queryPanel.add(keyTextField);
|
||||
queryPanel.add(queryButton);
|
||||
queryPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE,30));
|
||||
add(queryPanel);
|
||||
//添加垂直间隔
|
||||
add(Box.createVerticalStrut(10));
|
||||
//3.表格界面
|
||||
model = new DefaultTableModel(){
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int column) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
table = new JTable(model);
|
||||
scrollPane = new JScrollPane(table);
|
||||
add(scrollPane);
|
||||
|
||||
tableData = questionsService.getAll();
|
||||
//刷新数据
|
||||
refreshData();
|
||||
}
|
||||
private void refreshData(){
|
||||
model.setDataVector(tableData,columNames);
|
||||
model.fireTableDataChanged();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user