mirror of
https://github.com/FatttSnake/ClassroomInteraction.git
synced 2026-04-06 00:31:27 +08:00
Optimize project structure, add log4j2.
This commit is contained in:
22
.gitignore
vendored
22
.gitignore
vendored
@@ -2,9 +2,25 @@
|
|||||||
*.class
|
*.class
|
||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
bin/
|
/gen/
|
||||||
gen/
|
/Library/gen/
|
||||||
out/
|
/Student/gen/
|
||||||
|
/Teacher/gen/
|
||||||
|
|
||||||
|
# build
|
||||||
|
/build/
|
||||||
|
/Library/build/
|
||||||
|
/Student/build/
|
||||||
|
/Teacher/build/
|
||||||
|
|
||||||
|
# idea
|
||||||
|
/out/
|
||||||
|
/Library/out/
|
||||||
|
/Student/out/
|
||||||
|
/Teacher/out/
|
||||||
|
|
||||||
|
# log
|
||||||
|
/**/logs/
|
||||||
|
|
||||||
# Version control
|
# Version control
|
||||||
vcs.xml
|
vcs.xml
|
||||||
12
.idea/dataSources.xml
generated
Normal file
12
.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
|
<data-source source="LOCAL" name="@10.14.0.7" uuid="0c1ff8c3-597c-4b0b-8aed-28afff151eb1">
|
||||||
|
<driver-ref>mysql.8</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:mysql://10.14.0.7:3306</jdbc-url>
|
||||||
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
16
.idea/libraries/JUnit5_8_1.xml
generated
Normal file
16
.idea/libraries/JUnit5_8_1.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="JUnit5.8.1">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/apiguardian-api-1.1.2.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-jupiter-5.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-jupiter-api-5.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-jupiter-engine-5.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-jupiter-params-5.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-platform-commons-1.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/junit-platform-engine-1.8.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/opentest4j-1.2.0.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
13
.idea/libraries/log4j_api_2_17_2.xml
generated
Normal file
13
.idea/libraries/log4j_api_2_17_2.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="log4j-api-2.17.2">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-api-2.17.2.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-api-2.17.2-javadoc.jar!/" />
|
||||||
|
</JAVADOC>
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-api-2.17.2-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
14
.idea/libraries/log4j_core_2_17_2.xml
generated
Normal file
14
.idea/libraries/log4j_core_2_17_2.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="log4j-core-2.17.2">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-core-2.17.2-tests.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-core-2.17.2.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-core-2.17.2-javadoc.jar!/" />
|
||||||
|
</JAVADOC>
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/log4j-core-2.17.2-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
</project>
|
</project>
|
||||||
13
.idea/modules.xml
generated
13
.idea/modules.xml
generated
@@ -2,9 +2,16 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/Library/Library.iml" filepath="$PROJECT_DIR$/Library/Library.iml" />
|
<module fileurl="file://$PROJECT_DIR$/ClassroomInteraction.iml" filepath="$PROJECT_DIR$/ClassroomInteraction.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/Student/Student.iml" filepath="$PROJECT_DIR$/Student/Student.iml" />
|
<module fileurl="file://$PROJECT_DIR$/Library/ClassroomInteraction.Library.iml" filepath="$PROJECT_DIR$/Library/ClassroomInteraction.Library.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/Teacher/Teacher.iml" filepath="$PROJECT_DIR$/Teacher/Teacher.iml" />
|
<module fileurl="file://$PROJECT_DIR$/Library/src/main/ClassroomInteraction.Library.main.iml" filepath="$PROJECT_DIR$/Library/src/main/ClassroomInteraction.Library.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Library/src/test/ClassroomInteraction.Library.test.iml" filepath="$PROJECT_DIR$/Library/src/test/ClassroomInteraction.Library.test.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Student/ClassroomInteraction.Student.iml" filepath="$PROJECT_DIR$/Student/ClassroomInteraction.Student.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Student/src/main/ClassroomInteraction.Student.main.iml" filepath="$PROJECT_DIR$/Student/src/main/ClassroomInteraction.Student.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Student/src/test/ClassroomInteraction.Student.test.iml" filepath="$PROJECT_DIR$/Student/src/test/ClassroomInteraction.Student.test.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Teacher/ClassroomInteraction.Teacher.iml" filepath="$PROJECT_DIR$/Teacher/ClassroomInteraction.Teacher.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Teacher/src/main/ClassroomInteraction.Teacher.main.iml" filepath="$PROJECT_DIR$/Teacher/src/main/ClassroomInteraction.Teacher.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Teacher/src/test/ClassroomInteraction.Teacher.test.iml" filepath="$PROJECT_DIR$/Teacher/src/test/ClassroomInteraction.Teacher.test.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,11 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file:///production/ClassroomInteraction" />
|
||||||
|
<output-test url="file:///test/ClassroomInteraction" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<excludeFolder url="file://$MODULE_DIR$/.idea/dataSources" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
13
Library/ClassroomInteraction.Library.iml
Normal file
13
Library/ClassroomInteraction.Library.iml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file:///production/ClassroomInteraction.Library" />
|
||||||
|
<output-test url="file:///test/ClassroomInteraction.Library" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
15
Library/src/main/ClassroomInteraction.Library.main.iml
Normal file
15
Library/src/main/ClassroomInteraction.Library.main.iml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/../../build/classes/java/main" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.cfive.classroom.interaction.library.database;
|
package com.cfive.classroom.library.database;
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void run() {
|
public static void run() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.cfive.classroom.interaction.library.net;
|
package com.cfive.classroom.library.net;
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void run() {
|
public static void run() {
|
||||||
36
Library/src/main/resources/log4j2.xml
Normal file
36
Library/src/main/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
17
Library/src/test/ClassroomInteraction.Library.test.iml
Normal file
17
Library/src/test/ClassroomInteraction.Library.test.iml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output-test url="file://$MODULE_DIR$/../../build/classes/java/test" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-test-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library.main" />
|
||||||
|
<orderEntry type="library" name="JUnit5.8.1" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
36
Library/src/test/resources/log4j2.xml
Normal file
36
Library/src/test/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
@@ -2,10 +2,11 @@
|
|||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="module" module-name="Library" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
16
Student/src/main/ClassroomInteraction.Student.main.iml
Normal file
16
Student/src/main/ClassroomInteraction.Student.main.iml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/../../build/classes/java/main" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library.main" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.cfive.classroom.interaction.teacher.MainWindow">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.cfive.classroom.student.MainWindow">
|
||||||
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.cfive.classroom.interaction.student;
|
package com.cfive.classroom.student;
|
||||||
|
|
||||||
import com.cfive.classroom.interaction.library.database.Test;
|
import com.cfive.classroom.library.database.Test;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ public class MainWindow {
|
|||||||
frame.pack();
|
frame.pack();
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
com.cfive.classroom.interaction.library.net.Test.run();
|
com.cfive.classroom.library.net.Test.run();
|
||||||
Test.run();
|
Test.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
36
Student/src/main/resources/log4j2.xml
Normal file
36
Student/src/main/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
18
Student/src/test/ClassroomInteraction.Student.test.iml
Normal file
18
Student/src/test/ClassroomInteraction.Student.test.iml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output-test url="file://$MODULE_DIR$/../../build/classes/java/test" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-test-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library.main" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Student.main" />
|
||||||
|
<orderEntry type="library" name="JUnit5.8.1" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
36
Student/src/test/resources/log4j2.xml
Normal file
36
Student/src/test/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module" module-name="Library" />
|
<orderEntry type="module" module-name="ClassroomInteraction.Library" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
16
Teacher/src/main/ClassroomInteraction.Teacher.main.iml
Normal file
16
Teacher/src/main/ClassroomInteraction.Teacher.main.iml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/../../build/classes/java/main" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library.main" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.cfive.classroom.interaction.student.MainWindow">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.cfive.classroom.teacher.MainWindow">
|
||||||
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.cfive.classroom.interaction.teacher;
|
package com.cfive.classroom.teacher;
|
||||||
|
|
||||||
import com.cfive.classroom.interaction.library.net.Test;
|
import com.cfive.classroom.library.net.Test;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ public class MainWindow {
|
|||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
Test.run();
|
Test.run();
|
||||||
com.cfive.classroom.interaction.library.database.Test.run();
|
com.cfive.classroom.library.database.Test.run();
|
||||||
|
|
||||||
System.out.println("This is a test");
|
System.out.println("This is a test");
|
||||||
}
|
}
|
||||||
36
Teacher/src/main/resources/log4j2.xml
Normal file
36
Teacher/src/main/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
18
Teacher/src/test/ClassroomInteraction.Teacher.test.iml
Normal file
18
Teacher/src/test/ClassroomInteraction.Teacher.test.iml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output-test url="file://$MODULE_DIR$/../../build/classes/java/test" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-test-resource" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Library.main" />
|
||||||
|
<orderEntry type="module" module-name="ClassroomInteraction.Teacher.main" />
|
||||||
|
<orderEntry type="library" name="JUnit5.8.1" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-core-2.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="log4j-api-2.17.2" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
36
Teacher/src/test/resources/log4j2.xml
Normal file
36
Teacher/src/test/resources/log4j2.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration>
|
||||||
|
<Properties>
|
||||||
|
<!-- 定义日志格式 -->
|
||||||
|
<Property name="log.pattern">[%d{DEFAULT}] [%t/%-5level] %logger{36}: %msg%n</Property>
|
||||||
|
<!-- 定义文件名变量 -->
|
||||||
|
<Property name="file.info.filename">logs/latest21.log</Property>
|
||||||
|
<Property name="file.info.pattern">logs/%d{yyyy-MM-dd}-%i.log.gz</Property>
|
||||||
|
</Properties>
|
||||||
|
<!-- 定义Appender,即目的地 -->
|
||||||
|
<Appenders>
|
||||||
|
<!-- 定义输出到屏幕 -->
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<!-- 日志格式引用上面定义的log.pattern -->
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
</Console>
|
||||||
|
<!-- 定义输出到文件,文件名引用上面定义的file.info.filename -->
|
||||||
|
<RollingFile name="file" bufferedIO="true" fileName="${file.info.filename}" filePattern="${file.info.pattern}">
|
||||||
|
<PatternLayout pattern="${log.pattern}" />
|
||||||
|
<Policies>
|
||||||
|
<!-- 根据文件大小自动切割日志 -->
|
||||||
|
<SizeBasedTriggeringPolicy size="1 MB" />
|
||||||
|
</Policies>
|
||||||
|
<!-- 保留最近10份 -->
|
||||||
|
<DefaultRolloverStrategy max="10" />
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="all">
|
||||||
|
<!-- 对info级别的日志,输出到console -->
|
||||||
|
<AppenderRef ref="console" level="all" />
|
||||||
|
<!-- 对info级别的日志,输出到file,即上面定义的RollingFile -->
|
||||||
|
<AppenderRef ref="file" level="all" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
BIN
lib/apiguardian-api-1.1.2.jar
Normal file
BIN
lib/apiguardian-api-1.1.2.jar
Normal file
Binary file not shown.
BIN
lib/junit-jupiter-5.8.1.jar
Normal file
BIN
lib/junit-jupiter-5.8.1.jar
Normal file
Binary file not shown.
BIN
lib/junit-jupiter-api-5.8.1.jar
Normal file
BIN
lib/junit-jupiter-api-5.8.1.jar
Normal file
Binary file not shown.
BIN
lib/junit-jupiter-engine-5.8.1.jar
Normal file
BIN
lib/junit-jupiter-engine-5.8.1.jar
Normal file
Binary file not shown.
BIN
lib/junit-jupiter-params-5.8.1.jar
Normal file
BIN
lib/junit-jupiter-params-5.8.1.jar
Normal file
Binary file not shown.
BIN
lib/junit-platform-commons-1.8.1.jar
Normal file
BIN
lib/junit-platform-commons-1.8.1.jar
Normal file
Binary file not shown.
BIN
lib/junit-platform-engine-1.8.1.jar
Normal file
BIN
lib/junit-platform-engine-1.8.1.jar
Normal file
Binary file not shown.
BIN
lib/log4j-api-2.17.2-javadoc.jar
Normal file
BIN
lib/log4j-api-2.17.2-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/log4j-api-2.17.2-sources.jar
Normal file
BIN
lib/log4j-api-2.17.2-sources.jar
Normal file
Binary file not shown.
BIN
lib/log4j-api-2.17.2.jar
Normal file
BIN
lib/log4j-api-2.17.2.jar
Normal file
Binary file not shown.
BIN
lib/log4j-core-2.17.2-javadoc.jar
Normal file
BIN
lib/log4j-core-2.17.2-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/log4j-core-2.17.2-sources.jar
Normal file
BIN
lib/log4j-core-2.17.2-sources.jar
Normal file
Binary file not shown.
BIN
lib/log4j-core-2.17.2-tests.jar
Normal file
BIN
lib/log4j-core-2.17.2-tests.jar
Normal file
Binary file not shown.
BIN
lib/log4j-core-2.17.2.jar
Normal file
BIN
lib/log4j-core-2.17.2.jar
Normal file
Binary file not shown.
BIN
lib/opentest4j-1.2.0.jar
Normal file
BIN
lib/opentest4j-1.2.0.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user