diff --git a/README.md b/README.md index 31f7778..778a4a2 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ JDK版本:1.8及以上,推荐JDK 11及以上 ```xml - cn.linghang + cn.wustlinghang.mywust mywust-core 0.0.1-fixed diff --git a/mywust-common/pom.xml b/mywust-common/pom.xml index 4a4fed2..55d8cbc 100644 --- a/mywust-common/pom.xml +++ b/mywust-common/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> mywust - cn.linghang + cn.wustlinghang.mywust ${revision} 4.0.0 diff --git a/mywust-common/src/main/java/cn/linghang/mywust/captcha/SolvedImageCaptcha.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/SolvedImageCaptcha.java similarity index 93% rename from mywust-common/src/main/java/cn/linghang/mywust/captcha/SolvedImageCaptcha.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/SolvedImageCaptcha.java index fe2e815..143efd3 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/captcha/SolvedImageCaptcha.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/SolvedImageCaptcha.java @@ -1,6 +1,5 @@ -package cn.linghang.mywust.captcha; +package cn.wustlinghang.mywust.captcha; -import lombok.Data; import lombok.Getter; /** diff --git a/mywust-common/src/main/java/cn/linghang/mywust/captcha/UnsolvedImageCaptcha.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/UnsolvedImageCaptcha.java similarity index 90% rename from mywust-common/src/main/java/cn/linghang/mywust/captcha/UnsolvedImageCaptcha.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/UnsolvedImageCaptcha.java index 6cd220b..19dc890 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/captcha/UnsolvedImageCaptcha.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/UnsolvedImageCaptcha.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.captcha; +package cn.wustlinghang.mywust.captcha; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Building.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Building.java similarity index 95% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/Building.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Building.java index 7889250..913f287 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Building.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Building.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import java.util.StringJoiner; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Campus.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Campus.java similarity index 92% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/Campus.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Campus.java index 3ee92db..be0a812 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Campus.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Campus.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import java.util.StringJoiner; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Classroom.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Classroom.java similarity index 93% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/Classroom.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Classroom.java index 3eb5515..b234a98 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Classroom.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Classroom.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/College.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/College.java similarity index 92% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/College.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/College.java index df24010..ce920c3 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/College.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/College.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import java.util.StringJoiner; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Course.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Course.java similarity index 98% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/Course.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Course.java index 067861a..f193777 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Course.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Course.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Score.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Score.java similarity index 97% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/Score.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Score.java index d371eda..664790b 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/Score.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Score.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/global/StudentInfo.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/StudentInfo.java similarity index 92% rename from mywust-common/src/main/java/cn/linghang/mywust/data/global/StudentInfo.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/StudentInfo.java index dba4ad5..e36aa3c 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/global/StudentInfo.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/StudentInfo.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.global; +package cn.wustlinghang.mywust.data.global; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/physics/PhysicsCourse.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/physics/PhysicsCourse.java similarity index 58% rename from mywust-common/src/main/java/cn/linghang/mywust/data/physics/PhysicsCourse.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/physics/PhysicsCourse.java index 83934b0..30ac213 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/physics/PhysicsCourse.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/physics/PhysicsCourse.java @@ -1,6 +1,6 @@ -package cn.linghang.mywust.data.physics; +package cn.wustlinghang.mywust.data.physics; -import cn.linghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.data.global.Course; import lombok.Getter; import lombok.Setter; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/data/undergrad/ExamDelayApplication.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/undergrad/ExamDelayApplication.java similarity index 92% rename from mywust-common/src/main/java/cn/linghang/mywust/data/undergrad/ExamDelayApplication.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/data/undergrad/ExamDelayApplication.java index 9037d6d..ac6c81a 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/data/undergrad/ExamDelayApplication.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/data/undergrad/ExamDelayApplication.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.data.undergrad; +package cn.wustlinghang.mywust.data.undergrad; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/exception/ApiException.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ApiException.java similarity index 98% rename from mywust-common/src/main/java/cn/linghang/mywust/exception/ApiException.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ApiException.java index 95b4bf5..18edd12 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/exception/ApiException.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ApiException.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.exception; +package cn.wustlinghang.mywust.exception; public class ApiException extends BasicException { private final Code code; diff --git a/mywust-common/src/main/java/cn/linghang/mywust/exception/BasicException.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/BasicException.java similarity index 86% rename from mywust-common/src/main/java/cn/linghang/mywust/exception/BasicException.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/exception/BasicException.java index 4454661..45c998f 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/exception/BasicException.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/BasicException.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.exception; +package cn.wustlinghang.mywust.exception; public class BasicException extends Exception { public BasicException() { diff --git a/mywust-common/src/main/java/cn/linghang/mywust/exception/ParseException.java b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ParseException.java similarity index 95% rename from mywust-common/src/main/java/cn/linghang/mywust/exception/ParseException.java rename to mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ParseException.java index 6a9f4f9..106a26d 100644 --- a/mywust-common/src/main/java/cn/linghang/mywust/exception/ParseException.java +++ b/mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ParseException.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.exception; +package cn.wustlinghang.mywust.exception; import java.util.StringJoiner; diff --git a/mywust-core/pom.xml b/mywust-core/pom.xml index bae1a93..528ae70 100644 --- a/mywust-core/pom.xml +++ b/mywust-core/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> mywust - cn.linghang + cn.wustlinghang.mywust ${revision} 4.0.0 @@ -12,13 +12,13 @@ mywust-core - cn.linghang + cn.wustlinghang.mywust mywust-network ${project.parent.version} compile - cn.linghang + cn.wustlinghang.mywust mywust-util ${project.parent.version} @@ -37,7 +37,7 @@ - cn.linghang + cn.wustlinghang.mywust mywust-common ${project.parent.version} compile diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/Parser.java b/mywust-core/src/main/java/cn/linghang/mywust/core/parser/Parser.java deleted file mode 100644 index ab59e58..0000000 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/Parser.java +++ /dev/null @@ -1,7 +0,0 @@ -package cn.linghang.mywust.core.parser; - -import cn.linghang.mywust.exception.ParseException; - -public interface Parser { - public T parse(String html) throws ParseException; -} diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java b/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java deleted file mode 100644 index 9e77c32..0000000 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java +++ /dev/null @@ -1,9 +0,0 @@ -package cn.linghang.mywust.core.request.service.captcha.solver; - -import cn.linghang.mywust.captcha.SolvedImageCaptcha; -import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; -import cn.linghang.mywust.exception.ApiException; - -public interface CaptchaSolver { - SolvedImageCaptcha solve(UnsolvedImageCaptcha unsolvedImageCaptcha) throws ApiException; -} diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/ConstantParams.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/ConstantParams.java similarity index 99% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/ConstantParams.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/ConstantParams.java index b1e9322..0fd5660 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/ConstantParams.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/ConstantParams.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; import java.util.Collections; import java.util.HashMap; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/GraduateUrls.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/GraduateUrls.java similarity index 94% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/GraduateUrls.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/GraduateUrls.java index a99c7c5..db6f509 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/GraduateUrls.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/GraduateUrls.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; public class GraduateUrls { public static final String GRADUATE_CAPTCHA_API = "http://59.68.177.189/pyxx/PageTemplate/NsoftPage/yzm/createyzm.aspx"; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/LibraryUrls.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/LibraryUrls.java similarity index 96% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/LibraryUrls.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/LibraryUrls.java index 79a562c..7760ab2 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/LibraryUrls.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/LibraryUrls.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; public class LibraryUrls { public static final String LIBRARY_SESSION_COOKIE_API = "https://libsys.wust.edu.cn/meta-local/opac/cas/rosetta?ticket=%s"; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/PhysicsSystemUrls.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/PhysicsSystemUrls.java similarity index 96% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/PhysicsSystemUrls.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/PhysicsSystemUrls.java index 8041fb5..9544488 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/PhysicsSystemUrls.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/PhysicsSystemUrls.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; public class PhysicsSystemUrls { public static final String PHYSICS_LOGIN_INDEX = "http://wlsy.wust.edu.cn/Page/BI/BI000.aspx"; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/UndergradUrls.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UndergradUrls.java similarity index 98% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/UndergradUrls.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UndergradUrls.java index 138d4ca..f24cb4c 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/UndergradUrls.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UndergradUrls.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; import lombok.Getter; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/api/UnionAuthUrls.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UnionAuthUrls.java similarity index 94% rename from mywust-core/src/main/java/cn/linghang/mywust/core/api/UnionAuthUrls.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UnionAuthUrls.java index ea041b7..5173b15 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/api/UnionAuthUrls.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UnionAuthUrls.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.api; +package cn.wustlinghang.mywust.core.api; public class UnionAuthUrls { /** diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/HuangjiahuClassroomNameParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/HuangjiahuClassroomNameParser.java similarity index 93% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/HuangjiahuClassroomNameParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/HuangjiahuClassroomNameParser.java index 2fc8f8d..1370bdd 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/HuangjiahuClassroomNameParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/HuangjiahuClassroomNameParser.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.core.parser; +package cn.wustlinghang.mywust.core.parser; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.data.global.Classroom; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.data.global.Classroom; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/Parser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/Parser.java new file mode 100644 index 0000000..4336f3b --- /dev/null +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/Parser.java @@ -0,0 +1,7 @@ +package cn.wustlinghang.mywust.core.parser; + +import cn.wustlinghang.mywust.exception.ParseException; + +public interface Parser { + public T parse(String html) throws ParseException; +} diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateCourseTableParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateCourseTableParser.java similarity index 95% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateCourseTableParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateCourseTableParser.java index 6651be5..e825fa4 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateCourseTableParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateCourseTableParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.graduate; +package cn.wustlinghang.mywust.core.parser.graduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.data.global.Classroom; -import cn.linghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.data.global.Classroom; +import cn.wustlinghang.mywust.data.global.Course; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateScoreParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateScoreParser.java similarity index 84% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateScoreParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateScoreParser.java index f92d67a..51a9ada 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateScoreParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateScoreParser.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.parser.graduate; +package cn.wustlinghang.mywust.core.parser.graduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.data.global.Score; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.data.global.Score; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java similarity index 88% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java index 43bb63c..3f9aecd 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.graduate; +package cn.wustlinghang.mywust.core.parser.graduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.global.StudentInfo; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.global.StudentInfo; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java similarity index 86% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java index 1403bb4..1c6d703 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.parser.graduate; +package cn.wustlinghang.mywust.core.parser.graduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsCoursePageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsCoursePageParser.java similarity index 91% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsCoursePageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsCoursePageParser.java index 890209b..ac8830a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsCoursePageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsCoursePageParser.java @@ -1,10 +1,10 @@ -package cn.linghang.mywust.core.parser.physics; +package cn.wustlinghang.mywust.core.parser.physics; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.HuangjiahuClassroomNameParser; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.data.global.Classroom; -import cn.linghang.mywust.data.physics.PhysicsCourse; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.HuangjiahuClassroomNameParser; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.data.global.Classroom; +import cn.wustlinghang.mywust.data.physics.PhysicsCourse; import org.jsoup.Jsoup; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsIndexPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsIndexPageParser.java similarity index 80% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsIndexPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsIndexPageParser.java index 60e0aa3..db7512d 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsIndexPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsIndexPageParser.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.core.parser.physics; +package cn.wustlinghang.mywust.core.parser.physics; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java similarity index 85% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java index 89aae7f..a1f0faf 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.parser.physics; +package cn.wustlinghang.mywust.core.parser.physics; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; import lombok.Data; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScorePageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScorePageParser.java similarity index 83% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScorePageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScorePageParser.java index 1ec631a..202e8d8 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/physics/PhysicsScorePageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScorePageParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.physics; +package cn.wustlinghang.mywust.core.parser.physics; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.global.Score; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.global.Score; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java similarity index 95% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java index c8c83a0..8895a3d 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.parser.undergraduate; - -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.global.Classroom; -import cn.linghang.mywust.data.global.Course; -import cn.linghang.mywust.util.StringUtil; +package cn.wustlinghang.mywust.core.parser.undergraduate; + +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.global.Classroom; +import cn.wustlinghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.util.StringUtil; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java similarity index 85% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java index 22c87d8..ef73855 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java similarity index 77% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java index 5e11eab..fb73555 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; import org.jsoup.Jsoup; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java similarity index 90% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java index a8bb3ed..2e72960 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.undergrad.ExamDelayApplication; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.undergrad.ExamDelayApplication; import lombok.extern.slf4j.Slf4j; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradScoreParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradScoreParser.java similarity index 90% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradScoreParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradScoreParser.java index 081f545..e95e181 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradScoreParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradScoreParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.global.Score; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.global.Score; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java similarity index 93% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java index 582acea..ae5ba68 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.core.util.JsoupUtil; -import cn.linghang.mywust.data.global.StudentInfo; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.core.util.JsoupUtil; +import cn.wustlinghang.mywust.data.global.StudentInfo; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java similarity index 83% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java index dc88487..49fca76 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.core.parser.undergraduate; +package cn.wustlinghang.mywust.core.parser.undergraduate; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; import org.jsoup.Jsoup; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java similarity index 95% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java index 7d3f3a3..5642028 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.parser.undergraduate.global; +package cn.wustlinghang.mywust.core.parser.undergraduate.global; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.data.global.Classroom; -import cn.linghang.mywust.data.global.Course; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.data.global.Classroom; +import cn.wustlinghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.util.StringUtil; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java similarity index 81% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java index 6fa090d..a69c62b 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.parser.undergraduate.global; +package cn.wustlinghang.mywust.core.parser.undergraduate.global; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.data.global.Course; import java.util.List; import java.util.regex.Pattern; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java similarity index 83% rename from mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java index c981571..c0bda43 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.parser.undergraduate.global; +package cn.wustlinghang.mywust.core.parser.undergraduate.global; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.Parser; -import cn.linghang.mywust.data.global.Course; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.Parser; +import cn.wustlinghang.mywust.data.global.Course; import java.util.List; import java.util.regex.Pattern; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/RequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/RequestFactory.java similarity index 94% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/RequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/RequestFactory.java index 1175ef4..d5547bd 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/RequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/RequestFactory.java @@ -1,6 +1,6 @@ -package cn.linghang.mywust.core.request.factory; +package cn.wustlinghang.mywust.core.request.factory; -import cn.linghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; import java.net.URL; import java.nio.charset.StandardCharsets; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java similarity index 78% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java index fea70db..ea54f9a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java @@ -1,9 +1,9 @@ -package cn.linghang.mywust.core.request.factory.auth; +package cn.wustlinghang.mywust.core.request.factory.auth; -import cn.linghang.mywust.core.api.UnionAuthUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.core.api.UnionAuthUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.util.StringUtil; import java.nio.charset.StandardCharsets; import java.util.HashMap; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java similarity index 91% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java index ac58069..a8d1b1b 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.factory.graduate; - -import cn.linghang.mywust.captcha.SolvedImageCaptcha; -import cn.linghang.mywust.core.api.GraduateUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.util.PageFormExtractor; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.util.StringUtil; +package cn.wustlinghang.mywust.core.request.factory.graduate; + +import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha; +import cn.wustlinghang.mywust.core.api.GraduateUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.util.PageFormExtractor; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.util.StringUtil; import lombok.Builder; import lombok.Data; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/LibraryRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/LibraryRequestFactory.java similarity index 89% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/LibraryRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/LibraryRequestFactory.java index 223302d..61886e3 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/LibraryRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/LibraryRequestFactory.java @@ -1,10 +1,9 @@ -package cn.linghang.mywust.core.request.factory.library; +package cn.wustlinghang.mywust.core.request.factory.library; -import cn.hutool.core.util.URLUtil; -import cn.linghang.mywust.core.api.LibraryUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.request.factory.library.request.SearchRequest; -import cn.linghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.core.api.LibraryUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.request.factory.library.request.SearchRequest; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/request/SearchRequest.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/request/SearchRequest.java similarity index 93% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/request/SearchRequest.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/request/SearchRequest.java index 39e24a3..0944850 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/request/SearchRequest.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/request/SearchRequest.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.request.factory.library.request; +package cn.wustlinghang.mywust.core.request.factory.library.request; import lombok.Data; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java similarity index 91% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java index 54502a1..531a38a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java @@ -1,10 +1,10 @@ -package cn.linghang.mywust.core.request.factory.physics; +package cn.wustlinghang.mywust.core.request.factory.physics; -import cn.linghang.mywust.core.api.PhysicsSystemUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.util.PageFormExtractor; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.core.api.PhysicsSystemUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.util.PageFormExtractor; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.util.StringUtil; import java.util.HashMap; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java similarity index 93% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java index fe8a2db..c5531bc 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java @@ -1,17 +1,16 @@ -package cn.linghang.mywust.core.request.factory.undergrade; +package cn.wustlinghang.mywust.core.request.factory.undergrade; -import cn.linghang.mywust.core.api.UndergradUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.data.global.Campus; -import cn.linghang.mywust.network.entitys.FormBodyBuilder; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.core.api.UndergradUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.data.global.Campus; +import cn.wustlinghang.mywust.network.entitys.FormBodyBuilder; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.util.StringUtil; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.TreeMap; public class BkjxRequestFactory extends RequestFactory { public static HttpRequest sessionCookieRequest(String serviceTicket) { diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java similarity index 86% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java index 585b497..fc8127f 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.factory.undergrade.global; +package cn.wustlinghang.mywust.core.request.factory.undergrade.global; -import cn.linghang.mywust.core.api.ConstantParams; -import cn.linghang.mywust.core.api.UndergradUrls; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.entitys.FormBodyBuilder; -import cn.linghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.core.api.ConstantParams; +import cn.wustlinghang.mywust.core.api.UndergradUrls; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.entitys.FormBodyBuilder; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; public class BkjxAllCourseRequestFactory extends BkjxRequestFactory { public static HttpRequest classroomCoursePageRequest(String cookies, String term, String timeMode, String collegeId, String campusId, String buildingId, String classroomName) { @@ -54,7 +54,7 @@ public class BkjxAllCourseRequestFactory extends BkjxRequestFactory { .add("kbjcmsid", timeMode == null ? ConstantParams.DEFAULT_TIME_MODEL : timeMode) // 上课学院,虽然能获取到,但是不符合预期的功能,得到的结果是这个学院上的课,而不是这个学院开的课 .add("skyx", "") - // 开课学院应该在这里指定,但是直接用学院id是获取不到的,只能用学院下级的id来获取,相关参数详见cn.linghang.mywust.core.api.ConstantParams + // 开课学院应该在这里指定,但是直接用学院id是获取不到的,只能用学院下级的id来获取,相关参数详见cn.wustlinghang.mywust.core.api.ConstantParams .add("kkyx", subCollegeId) .add("kcmc", courseName) .add("zzdKcSX", "") diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/GraduateLogin.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/GraduateLogin.java similarity index 82% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/GraduateLogin.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/GraduateLogin.java index c6f0e09..6ce19f1 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/GraduateLogin.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/GraduateLogin.java @@ -1,16 +1,16 @@ -package cn.linghang.mywust.core.request.service.auth; - -import cn.linghang.mywust.captcha.SolvedImageCaptcha; -import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; -import cn.linghang.mywust.core.api.GraduateUrls; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory; -import cn.linghang.mywust.core.request.service.captcha.solver.CaptchaSolver; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.auth; + +import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha; +import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha; +import cn.wustlinghang.mywust.core.api.GraduateUrls; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory; +import cn.wustlinghang.mywust.core.request.service.captcha.solver.CaptchaSolver; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import javax.imageio.ImageIO; import java.awt.*; @@ -49,7 +49,8 @@ public class GraduateLogin { SolvedImageCaptcha solvedImageCaptcha = captchaSolver.solve(unsolvedImageCaptcha); // 进行登录 - HttpRequest loginRequest = GraduateRequestFactory.loginRequest(username, password, loginIndexResponse.getStringBody(), solvedImageCaptcha); + String loginIndexHtml = loginIndexResponse.getStringBody(); + HttpRequest loginRequest = GraduateRequestFactory.loginRequest(username, password, loginIndexHtml, solvedImageCaptcha); HttpResponse loginResponse = requester.post(loginRequest, option); // 登陆成功,应该会是302跳转,不是的话多半是认证错误 diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/LibraryLogin.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/LibraryLogin.java similarity index 76% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/LibraryLogin.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/LibraryLogin.java index 11b8029..af85574 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/LibraryLogin.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/LibraryLogin.java @@ -1,13 +1,13 @@ -package cn.linghang.mywust.core.request.service.auth; - -import cn.linghang.mywust.core.api.LibraryUrls; -import cn.linghang.mywust.core.api.UnionAuthUrls; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.library.LibraryRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.auth; + +import cn.wustlinghang.mywust.core.api.LibraryUrls; +import cn.wustlinghang.mywust.core.api.UnionAuthUrls; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.library.LibraryRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/PhysicsLogin.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/PhysicsLogin.java similarity index 82% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/PhysicsLogin.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/PhysicsLogin.java index 62c5456..09759c5 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/PhysicsLogin.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/PhysicsLogin.java @@ -1,13 +1,13 @@ -package cn.linghang.mywust.core.request.service.auth; +package cn.wustlinghang.mywust.core.request.service.auth; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.physics.PhysicsIndexPageParser; -import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.physics.PhysicsIndexPageParser; +import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +55,7 @@ public class PhysicsLogin { String redirect = physicsIndexPageParser.parse(indexHtml); HttpRequest systemIndexRequest = PhysicsSystemRequestFactory.physicsSystemIndexRequest(redirect, loginCookies); - requestClientOption.setFallowUrlRedirect(true); + requestClientOption.setFollowUrlRedirect(true); HttpResponse response = requester.get(systemIndexRequest, requestClientOption); if (response.getStatusCode() != HttpResponse.HTTP_OK) { throw new ApiException(ApiException.Code.COOKIE_INVALID); diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UndergraduateLogin.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UndergraduateLogin.java similarity index 90% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UndergraduateLogin.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UndergraduateLogin.java index 1948f49..981c33a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UndergraduateLogin.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UndergraduateLogin.java @@ -1,14 +1,14 @@ -package cn.linghang.mywust.core.request.service.auth; - -import cn.linghang.mywust.core.api.UndergradUrls; -import cn.linghang.mywust.core.api.UnionAuthUrls; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; -import cn.linghang.mywust.util.PasswordEncoder; +package cn.wustlinghang.mywust.core.request.service.auth; + +import cn.wustlinghang.mywust.core.api.UndergradUrls; +import cn.wustlinghang.mywust.core.api.UnionAuthUrls; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.util.PasswordEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UnionLogin.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UnionLogin.java similarity index 87% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UnionLogin.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UnionLogin.java index 4a14237..2e5c099 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UnionLogin.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UnionLogin.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.auth; +package cn.wustlinghang.mywust.core.request.service.auth; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.auth.UnionAuthRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; -import cn.linghang.mywust.util.PasswordEncoder; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.auth.UnionAuthRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.util.PasswordEncoder; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java new file mode 100644 index 0000000..c3da913 --- /dev/null +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java @@ -0,0 +1,9 @@ +package cn.wustlinghang.mywust.core.request.service.captcha.solver; + +import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha; +import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha; +import cn.wustlinghang.mywust.exception.ApiException; + +public interface CaptchaSolver { + SolvedImageCaptcha solve(UnsolvedImageCaptcha unsolvedImageCaptcha) throws ApiException; +} diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java similarity index 70% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java index 102225d..28d4711 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.captcha.solver; - -import cn.linghang.mywust.captcha.SolvedImageCaptcha; -import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.captcha.solver; + +import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha; +import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Base64; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java similarity index 79% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java index bbfd4b3..aed10cf 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java @@ -1,14 +1,14 @@ -package cn.linghang.mywust.core.request.service.captcha.solver; - -import cn.linghang.mywust.captcha.SolvedImageCaptcha; -import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; -import cn.linghang.mywust.util.StringUtil; +package cn.wustlinghang.mywust.core.request.service.captcha.solver; + +import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha; +import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.util.StringUtil; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.codec.binary.Base64; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java similarity index 69% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java index 340c0ec..95fc26b 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.graduate; - -import cn.linghang.mywust.core.api.GraduateUrls; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.graduate; + +import cn.wustlinghang.mywust.core.api.GraduateUrls; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java similarity index 58% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java index 9dd0c76..8f723c1 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.graduate; +package cn.wustlinghang.mywust.core.request.service.graduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; @@ -23,6 +23,6 @@ public class GraduateCourseTableApiService extends GraduateApiServiceBase { HttpResponse response = requester.get(request, option); super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } } diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateScoreApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateScoreApiService.java similarity index 55% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateScoreApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateScoreApiService.java index 8816904..efb13ef 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateScoreApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateScoreApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.graduate; +package cn.wustlinghang.mywust.core.request.service.graduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; @@ -22,6 +22,6 @@ public class GraduateScoreApiService extends GraduateApiServiceBase { HttpResponse response = requester.get(request, option); super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } } diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java similarity index 55% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java index 7e3cad7..1eb58bd 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.graduate; +package cn.wustlinghang.mywust.core.request.service.graduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; @@ -22,6 +22,6 @@ public class GraduateStudentInfoApiService extends GraduateApiServiceBase { HttpResponse response = requester.get(request, option); super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } } diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java similarity index 55% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java index 45e98dd..739ac4b 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.graduate; +package cn.wustlinghang.mywust.core.request.service.graduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; @@ -22,6 +22,6 @@ public class GraduateTrainingPlanApiService extends GraduateApiServiceBase { HttpResponse response = requester.get(request, option); super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } } diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiService.java similarity index 85% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiService.java index 7803ffb..a5ee439 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiService.java @@ -1,10 +1,10 @@ -package cn.linghang.mywust.core.request.service.library; +package cn.wustlinghang.mywust.core.request.service.library; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.library.LibraryRequestFactory; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.library.LibraryRequestFactory; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiServiceBase.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiServiceBase.java similarity index 66% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiServiceBase.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiServiceBase.java index edb1b8a..d30f5ad 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/library/LibraryApiServiceBase.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiServiceBase.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.request.service.library; +package cn.wustlinghang.mywust.core.request.service.library; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; public abstract class LibraryApiServiceBase { protected final Requester requester; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java similarity index 65% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java index 4c99be5..5273d35 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java @@ -1,8 +1,8 @@ -package cn.linghang.mywust.core.request.service.physics; +package cn.wustlinghang.mywust.core.request.service.physics; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; public abstract class PhysicsApiServiceBase { protected final Requester requester; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsCourseApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsCourseApiService.java similarity index 56% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsCourseApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsCourseApiService.java index 91d04bc..a1b7e76 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsCourseApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsCourseApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.physics; +package cn.wustlinghang.mywust.core.request.service.physics; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; @@ -15,7 +15,7 @@ public class PhysicsCourseApiService extends PhysicsApiServiceBase { } public String getPage(String cookie, RequestClientOption requestClientOption) throws IOException, ApiException { - requestClientOption.setFallowUrlRedirect(false); + requestClientOption.setFollowUrlRedirect(false); // 直接请求真正的课表页 HttpRequest coursePageRequest = PhysicsSystemRequestFactory.physicsCourseRequest(cookie); diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsScoreApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsScoreApiService.java similarity index 75% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsScoreApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsScoreApiService.java index fb2a930..ac0d67a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsScoreApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsScoreApiService.java @@ -1,14 +1,14 @@ -package cn.linghang.mywust.core.request.service.physics; - -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.physics.PhysicsScoreListPageParser; -import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; -import cn.linghang.mywust.core.util.PageFormExtractor; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.physics; + +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.physics.PhysicsScoreListPageParser; +import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory; +import cn.wustlinghang.mywust.core.util.PageFormExtractor; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.ArrayList; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java similarity index 71% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java index 40c58be..b3bba3d 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java @@ -1,13 +1,13 @@ -package cn.linghang.mywust.core.request.service.undergraduate; - -import cn.linghang.mywust.core.api.UndergradUrls; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.RequestFactory; -import cn.linghang.mywust.core.util.BkjxUtil; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate; + +import cn.wustlinghang.mywust.core.api.UndergradUrls; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.RequestFactory; +import cn.wustlinghang.mywust.core.util.BkjxUtil; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java similarity index 74% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java index 5bc1d4b..809c7a9 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.undergraduate; +package cn.wustlinghang.mywust.core.request.service.undergraduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; @@ -40,7 +40,7 @@ public class UndergradCourseTableApiService extends UndergradApiServiceBase { super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } public String getPage(String term, String cookies) throws IOException, ApiException { diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java similarity index 75% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java index 4a97dbf..e9ba36b 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java @@ -1,13 +1,13 @@ -package cn.linghang.mywust.core.request.service.undergraduate; - -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.exception.ParseException; -import cn.linghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate; + +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.exception.ParseException; +import cn.wustlinghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java similarity index 86% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java index fa5ca2e..b08a92d 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.undergraduate; +package cn.wustlinghang.mywust.core.request.service.undergraduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.AllArgsConstructor; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java similarity index 69% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java index c17659b..d5e9f74 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.undergraduate; +package cn.wustlinghang.mywust.core.request.service.undergraduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; @@ -32,7 +32,7 @@ public class UndergradScoreApiService extends UndergradApiServiceBase { super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } public String getPage(String cookies) throws IOException, ApiException { diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java similarity index 69% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java index 08fa284..46e493a 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.undergraduate; +package cn.wustlinghang.mywust.core.request.service.undergraduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; @@ -32,7 +32,7 @@ public class UndergradStudentInfoApiService extends UndergradApiServiceBase { super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } public String getPage(String cookies) throws IOException, ApiException { diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java similarity index 69% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java index 80e98a0..130f7f3 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java @@ -1,11 +1,11 @@ -package cn.linghang.mywust.core.request.service.undergraduate; +package cn.wustlinghang.mywust.core.request.service.undergraduate; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; @@ -32,7 +32,7 @@ public class UndergradTrainingPlanApiService extends UndergradApiServiceBase { super.checkResponse(response); - return new String(response.getBody()); + return response.getStringBody(); } public String getPage(String cookies) throws IOException, ApiException { diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java similarity index 74% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java index 92dea33..f0f7ecf 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.undergraduate.global; - -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; -import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate.global; + +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; +import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java similarity index 78% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java index 0c45776..81759d4 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java @@ -1,15 +1,15 @@ -package cn.linghang.mywust.core.request.service.undergraduate.global; - -import cn.linghang.mywust.core.api.ConstantParams; -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; -import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; -import cn.linghang.mywust.data.global.Building; -import cn.linghang.mywust.data.global.Campus; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate.global; + +import cn.wustlinghang.mywust.core.api.ConstantParams; +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory; +import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; +import cn.wustlinghang.mywust.data.global.Building; +import cn.wustlinghang.mywust.data.global.Campus; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java similarity index 75% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java index 1e10f4a..d84bab7 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.undergraduate.global; - -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; -import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate.global; + +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; +import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java similarity index 73% rename from mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java index 1d63db4..30e0317 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java @@ -1,12 +1,12 @@ -package cn.linghang.mywust.core.request.service.undergraduate.global; - -import cn.linghang.mywust.exception.ApiException; -import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; -import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +package cn.wustlinghang.mywust.core.request.service.undergraduate.global; + +import cn.wustlinghang.mywust.exception.ApiException; +import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory; +import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; import java.util.Map; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/util/BkjxUtil.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/BkjxUtil.java similarity index 96% rename from mywust-core/src/main/java/cn/linghang/mywust/core/util/BkjxUtil.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/BkjxUtil.java index 964af17..6f8a440 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/util/BkjxUtil.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/BkjxUtil.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.util; +package cn.wustlinghang.mywust.core.util; import java.nio.charset.StandardCharsets; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/util/JsoupUtil.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/JsoupUtil.java similarity index 98% rename from mywust-core/src/main/java/cn/linghang/mywust/core/util/JsoupUtil.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/JsoupUtil.java index bc386bb..59ed30c 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/util/JsoupUtil.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/JsoupUtil.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.util; +package cn.wustlinghang.mywust.core.util; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; diff --git a/mywust-core/src/main/java/cn/linghang/mywust/core/util/PageFormExtractor.java b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/PageFormExtractor.java similarity index 97% rename from mywust-core/src/main/java/cn/linghang/mywust/core/util/PageFormExtractor.java rename to mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/PageFormExtractor.java index 8123575..cb9da8d 100644 --- a/mywust-core/src/main/java/cn/linghang/mywust/core/util/PageFormExtractor.java +++ b/mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/PageFormExtractor.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.core.util; +package cn.wustlinghang.mywust.core.util; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; diff --git a/mywust-network-httpclient/pom.xml b/mywust-network-httpclient/pom.xml index 07191c8..b8a3b83 100644 --- a/mywust-network-httpclient/pom.xml +++ b/mywust-network-httpclient/pom.xml @@ -5,7 +5,7 @@ 4.0.0 mywust - cn.linghang + cn.wustlinghang.mywust ${revision} mywust-network-httpclient diff --git a/mywust-network-okhttp/pom.xml b/mywust-network-okhttp/pom.xml index 8a5cdfc..cea2204 100644 --- a/mywust-network-okhttp/pom.xml +++ b/mywust-network-okhttp/pom.xml @@ -5,7 +5,7 @@ mywust - cn.linghang + cn.wustlinghang.mywust ${revision} 4.0.0 @@ -34,12 +34,12 @@ - cn.linghang + cn.wustlinghang.mywust mywust-network ${project.parent.version} - cn.linghang + cn.wustlinghang.mywust mywust-util ${project.parent.version} compile diff --git a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/RedirectInterceptor.java b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/RedirectInterceptor.java similarity index 91% rename from mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/RedirectInterceptor.java rename to mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/RedirectInterceptor.java index 74c6a83..6370d49 100644 --- a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/RedirectInterceptor.java +++ b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/RedirectInterceptor.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.network.okhttp; +package cn.wustlinghang.mywust.network.okhttp; import okhttp3.Interceptor; import okhttp3.Response; diff --git a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/SimpleOkhttpRequester.java b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/SimpleOkhttpRequester.java similarity index 97% rename from mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/SimpleOkhttpRequester.java rename to mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/SimpleOkhttpRequester.java index d7e9b12..194be06 100644 --- a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/SimpleOkhttpRequester.java +++ b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/SimpleOkhttpRequester.java @@ -1,10 +1,10 @@ -package cn.linghang.mywust.network.okhttp; +package cn.wustlinghang.mywust.network.okhttp; -import cn.linghang.mywust.network.RequestClientOption; -import cn.linghang.mywust.network.Requester; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.network.RequestClientOption; +import cn.wustlinghang.mywust.network.Requester; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.util.StringUtil; import okhttp3.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -149,7 +149,7 @@ public class SimpleOkhttpRequester implements Requester { builder.callTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS) .readTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS) .connectTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS) - .followRedirects(requestClientOption.isFallowUrlRedirect()) + .followRedirects(requestClientOption.isFollowUrlRedirect()) .addInterceptor(new RedirectInterceptor()); // 是否忽略SSL错误 diff --git a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/TrustAllCert.java b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/TrustAllCert.java similarity index 97% rename from mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/TrustAllCert.java rename to mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/TrustAllCert.java index 3e14a13..27890ce 100644 --- a/mywust-network-okhttp/src/main/java/cn/linghang/mywust/network/okhttp/TrustAllCert.java +++ b/mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/TrustAllCert.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.network.okhttp; +package cn.wustlinghang.mywust.network.okhttp; import javax.net.ssl.*; import java.security.KeyStore; diff --git a/mywust-network/pom.xml b/mywust-network/pom.xml index 128cfe2..6e92f3a 100644 --- a/mywust-network/pom.xml +++ b/mywust-network/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> mywust - cn.linghang + cn.wustlinghang.mywust ${revision} 4.0.0 @@ -19,7 +19,7 @@ - cn.linghang + cn.wustlinghang.mywust mywust-util ${project.parent.version} compile diff --git a/mywust-network/src/main/java/cn/linghang/mywust/network/RequestClientOption.java b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/RequestClientOption.java similarity index 84% rename from mywust-network/src/main/java/cn/linghang/mywust/network/RequestClientOption.java rename to mywust-network/src/main/java/cn/wustlinghang/mywust/network/RequestClientOption.java index 53b0706..b8faa6e 100644 --- a/mywust-network/src/main/java/cn/linghang/mywust/network/RequestClientOption.java +++ b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/RequestClientOption.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.network; +package cn.wustlinghang.mywust.network; import lombok.Builder; import lombok.Data; @@ -7,7 +7,7 @@ import lombok.Data; public class RequestClientOption { private Proxy proxy; private long timeout; - private boolean fallowUrlRedirect; + private boolean followUrlRedirect; private boolean ignoreSSLError; @@ -21,14 +21,14 @@ public class RequestClientOption { public RequestClientOption() { this.proxy = null; this.timeout = 5; - this.fallowUrlRedirect = false; + this.followUrlRedirect = false; this.ignoreSSLError = true; } - public RequestClientOption(Proxy proxy, long timeout, boolean fallowUrlRedirect, boolean ignoreSSLError) { + public RequestClientOption(Proxy proxy, long timeout, boolean followUrlRedirect, boolean ignoreSSLError) { this.proxy = proxy; this.timeout = timeout; - this.fallowUrlRedirect = fallowUrlRedirect; + this.followUrlRedirect = followUrlRedirect; this.ignoreSSLError = ignoreSSLError; } @@ -53,8 +53,8 @@ public class RequestClientOption { } @Override - public boolean isFallowUrlRedirect() { - return super.isFallowUrlRedirect(); + public boolean isFollowUrlRedirect() { + return super.isFollowUrlRedirect(); } @Override @@ -64,7 +64,7 @@ public class RequestClientOption { public void setTimeout(long timeout) {} @Override - public void setFallowUrlRedirect(boolean fallowUrlRedirect) {} + public void setFollowUrlRedirect(boolean followUrlRedirect) {} } public static RequestClientOptionBuilder builder() { @@ -89,7 +89,7 @@ public class RequestClientOption { } public RequestClientOptionBuilder fallowUrlRedirect(boolean fallowUrlRedirect) { - requestClientOption.setFallowUrlRedirect(fallowUrlRedirect); + requestClientOption.setFollowUrlRedirect(fallowUrlRedirect); return this; } diff --git a/mywust-network/src/main/java/cn/linghang/mywust/network/Requester.java b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/Requester.java similarity index 93% rename from mywust-network/src/main/java/cn/linghang/mywust/network/Requester.java rename to mywust-network/src/main/java/cn/wustlinghang/mywust/network/Requester.java index 1aed9f5..199ec75 100644 --- a/mywust-network/src/main/java/cn/linghang/mywust/network/Requester.java +++ b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/Requester.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.network; +package cn.wustlinghang.mywust.network; -import cn.linghang.mywust.network.entitys.HttpRequest; -import cn.linghang.mywust.network.entitys.HttpResponse; +import cn.wustlinghang.mywust.network.entitys.HttpRequest; +import cn.wustlinghang.mywust.network.entitys.HttpResponse; import java.io.IOException; diff --git a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/FormBodyBuilder.java b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/FormBodyBuilder.java similarity index 89% rename from mywust-network/src/main/java/cn/linghang/mywust/network/entitys/FormBodyBuilder.java rename to mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/FormBodyBuilder.java index f1c3770..c0afbb6 100644 --- a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/FormBodyBuilder.java +++ b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/FormBodyBuilder.java @@ -1,7 +1,7 @@ -package cn.linghang.mywust.network.entitys; +package cn.wustlinghang.mywust.network.entitys; -import cn.linghang.mywust.util.RepeatableComparator; -import cn.linghang.mywust.util.StringUtil; +import cn.wustlinghang.mywust.util.RepeatableComparator; +import cn.wustlinghang.mywust.util.StringUtil; import java.util.Comparator; import java.util.HashMap; diff --git a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpRequest.java b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpRequest.java similarity index 98% rename from mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpRequest.java rename to mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpRequest.java index fc78ef5..d00b482 100644 --- a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpRequest.java +++ b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpRequest.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.network.entitys; +package cn.wustlinghang.mywust.network.entitys; import lombok.Builder; import lombok.Data; diff --git a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpResponse.java b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpResponse.java similarity index 85% rename from mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpResponse.java rename to mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpResponse.java index ef0dec0..368365e 100644 --- a/mywust-network/src/main/java/cn/linghang/mywust/network/entitys/HttpResponse.java +++ b/mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpResponse.java @@ -1,10 +1,11 @@ -package cn.linghang.mywust.network.entitys; +package cn.wustlinghang.mywust.network.entitys; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Map; @@ -34,7 +35,11 @@ public class HttpResponse { private byte[] body; public String getStringBody() { - return new String(body); + return new String(body, StandardCharsets.UTF_8); + } + + public String getStringBody(Charset charsets) { + return new String(body, charsets); } public void setBody(byte[] body) { diff --git a/mywust-test/pom.xml b/mywust-test/pom.xml index 1bbc000..c7fb507 100644 --- a/mywust-test/pom.xml +++ b/mywust-test/pom.xml @@ -5,7 +5,7 @@ 4.0.0 - cn.linghang + cn.wustlinghang.mywust mywust ${revision} @@ -14,13 +14,13 @@ - cn.linghang + cn.wustlinghang.mywust mywust-core ${project.parent.version} test - cn.linghang + cn.wustlinghang.mywust mywust-network-okhttp ${project.parent.version} test diff --git a/mywust-util/pom.xml b/mywust-util/pom.xml index b146440..7f0ea53 100644 --- a/mywust-util/pom.xml +++ b/mywust-util/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> mywust - cn.linghang + cn.wustlinghang.mywust ${revision} 4.0.0 diff --git a/mywust-util/src/main/java/cn/linghang/mywust/util/PasswordEncoder.java b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/PasswordEncoder.java similarity index 97% rename from mywust-util/src/main/java/cn/linghang/mywust/util/PasswordEncoder.java rename to mywust-util/src/main/java/cn/wustlinghang/mywust/util/PasswordEncoder.java index 66f17c3..6f31e41 100644 --- a/mywust-util/src/main/java/cn/linghang/mywust/util/PasswordEncoder.java +++ b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/PasswordEncoder.java @@ -1,137 +1,137 @@ -package cn.linghang.mywust.util; - - -import org.apache.commons.codec.binary.Hex; - -import javax.crypto.BadPaddingException; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import java.math.BigInteger; -import java.nio.charset.StandardCharsets; -import java.security.InvalidKeyException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.interfaces.RSAPublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.RSAPublicKeySpec; - -import static java.lang.Integer.parseInt; - -/** - * 密码加密工具类 - * - *

使用统一登陆的加密方法对密码进行加密的工具类

- *

研究发现统一认证登录对密码的加密方式只是简单的RSA NoPadding加密(虽然但是,貌似私钥也放在前端了...)

- *

加密过程大概如下:

- *

- 通过modulus模数和exponent指数生成rsa公钥

- *

- 将明文反转后用上面生成的公钥进行RSA加密,明文填充使用NoPadding填充(0填充)

- *

- 将生成的字节数组转换成16进制字符串,得到加密后的数据

- *
- *

希望不要再改登录方式了 [拜]

- * - * @author : lensfrex - * @description : 使用统一登陆的加密方法对密码进行加密的工具类 - * @create : 2022-09-18 14:42:06 - * @edit : 2022-10-14 14:42:06 - */ -public class PasswordEncoder { - private static final String MODULUS = "b5eeb166e069920e80bebd1fea4829d3d1f3216f2aabe79b6c47a3c18dcee5fd22c2e7ac519cab59198ece036dcf289ea8201e2a0b9ded307f8fb704136eaeb670286f5ad44e691005ba9ea5af04ada5367cd724b5a26fdb5120cc95b6431604bd219c6b7d83a6f8f24b43918ea988a76f93c333aa5a20991493d4eb1117e7b1"; - private static final String EXPONENT = "10001"; - - private static final RSAPublicKey PUBLIC_KEY = PasswordEncoder.generatePublicKey(); - - private static Cipher cipher; - - // 单例加密/解密器 - static { - try { - cipher = Cipher.getInstance("RSA/ECB/NoPadding"); - cipher.init(Cipher.ENCRYPT_MODE, PUBLIC_KEY); - } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException e) { - // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 - // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 - System.err.println("加密出错"); - e.printStackTrace(); - } - } - - /** - * 按照统一登陆的加密方法,加密密码 - * - * @param password 密码明文 - * @return 加密后的密码(小写) - */ - public static String encodePassword(String password) { - try { - // 反转明文 - byte[] reversedTextData = new StringBuffer(password) - .reverse() - .toString() - .getBytes(StandardCharsets.UTF_8); - - // 完成加密 - return Hex.encodeHexString(cipher.doFinal(reversedTextData)); - } catch (IllegalBlockSizeException | BadPaddingException e) { - // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 - // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 - System.err.println("加密出错"); - e.printStackTrace(); - } - - return ""; - } - - /** - * 使用modulus模数和exponent指数生成rsa公钥 - * - * @return 公钥 - */ - private static RSAPublicKey generatePublicKey() { - try { - BigInteger mod = new BigInteger(PasswordEncoder.MODULUS, 16); - BigInteger exp = new BigInteger(PasswordEncoder.EXPONENT, 16); - - RSAPublicKeySpec keySpec = new RSAPublicKeySpec(mod, exp); - - return (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(keySpec); - } catch (NoSuchAlgorithmException | InvalidKeySpecException e) { - // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 - // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 - System.err.println("生成公钥出错"); - e.printStackTrace(); - } - - return null; - } - - /** - *

使用旧版登录页的方法加密密码(bkjx系统直接登录)

- *

是直接照搬官网js代码的,只是经过了一点小修改,没有具体研究是什么加密方式(大概率可能是自创的),性能可能会有点差

- * - * @param dataString 加密前置字符串 - * @param password 密码明文 - * @return 加密后的密文 - */ - public static String legacyPassword(String username, String password, String dataString) { - String[] parts = dataString.split("#"); - StringBuilder scode = new StringBuilder(parts[0]); - String sxh = parts[1]; - - String code = username + "%%%" + password; - - StringBuilder encoded = new StringBuilder(); - for (int i = 0, codeLength = code.length(); i < codeLength; i++) { - if (i < 20) { - int index = sxh.charAt(i) - 48; - encoded.append(code.charAt(i)).append(scode, 0, index); - scode.delete(0, index); - } else { - encoded.append(code, i, codeLength); - i = codeLength; - } - } - - return encoded.toString(); - } -} +package cn.wustlinghang.mywust.util; + + +import org.apache.commons.codec.binary.Hex; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.RSAPublicKeySpec; + +import static java.lang.Integer.parseInt; + +/** + * 密码加密工具类 + * + *

使用统一登陆的加密方法对密码进行加密的工具类

+ *

研究发现统一认证登录对密码的加密方式只是简单的RSA NoPadding加密(虽然但是,貌似私钥也放在前端了...)

+ *

加密过程大概如下:

+ *

- 通过modulus模数和exponent指数生成rsa公钥

+ *

- 将明文反转后用上面生成的公钥进行RSA加密,明文填充使用NoPadding填充(0填充)

+ *

- 将生成的字节数组转换成16进制字符串,得到加密后的数据

+ *
+ *

希望不要再改登录方式了 [拜]

+ * + * @author : lensfrex + * @description : 使用统一登陆的加密方法对密码进行加密的工具类 + * @create : 2022-09-18 14:42:06 + * @edit : 2022-10-14 14:42:06 + */ +public class PasswordEncoder { + private static final String MODULUS = "b5eeb166e069920e80bebd1fea4829d3d1f3216f2aabe79b6c47a3c18dcee5fd22c2e7ac519cab59198ece036dcf289ea8201e2a0b9ded307f8fb704136eaeb670286f5ad44e691005ba9ea5af04ada5367cd724b5a26fdb5120cc95b6431604bd219c6b7d83a6f8f24b43918ea988a76f93c333aa5a20991493d4eb1117e7b1"; + private static final String EXPONENT = "10001"; + + private static final RSAPublicKey PUBLIC_KEY = PasswordEncoder.generatePublicKey(); + + private static Cipher cipher; + + // 单例加密/解密器 + static { + try { + cipher = Cipher.getInstance("RSA/ECB/NoPadding"); + cipher.init(Cipher.ENCRYPT_MODE, PUBLIC_KEY); + } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException e) { + // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 + // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 + System.err.println("加密出错"); + e.printStackTrace(); + } + } + + /** + * 按照统一登陆的加密方法,加密密码 + * + * @param password 密码明文 + * @return 加密后的密码(小写) + */ + public static String encodePassword(String password) { + try { + // 反转明文 + byte[] reversedTextData = new StringBuffer(password) + .reverse() + .toString() + .getBytes(StandardCharsets.UTF_8); + + // 完成加密 + return Hex.encodeHexString(cipher.doFinal(reversedTextData)); + } catch (IllegalBlockSizeException | BadPaddingException e) { + // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 + // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 + System.err.println("加密出错"); + e.printStackTrace(); + } + + return ""; + } + + /** + * 使用modulus模数和exponent指数生成rsa公钥 + * + * @return 公钥 + */ + private static RSAPublicKey generatePublicKey() { + try { + BigInteger mod = new BigInteger(PasswordEncoder.MODULUS, 16); + BigInteger exp = new BigInteger(PasswordEncoder.EXPONENT, 16); + + RSAPublicKeySpec keySpec = new RSAPublicKeySpec(mod, exp); + + return (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(keySpec); + } catch (NoSuchAlgorithmException | InvalidKeySpecException e) { + // 会报错的地方都是因为算法不正确,这里都是固定的值,出错了就是程序写错了,在测试的时候就应该发现的问题 + // 对于调用者不必处理这种异常,但是开发测试的时候应该要打日志来发现问题 + System.err.println("生成公钥出错"); + e.printStackTrace(); + } + + return null; + } + + /** + *

使用旧版登录页的方法加密密码(bkjx系统直接登录)

+ *

是直接照搬官网js代码的,只是经过了一点小修改,没有具体研究是什么加密方式(大概率可能是自创的),性能可能会有点差

+ * + * @param dataString 加密前置字符串 + * @param password 密码明文 + * @return 加密后的密文 + */ + public static String legacyPassword(String username, String password, String dataString) { + String[] parts = dataString.split("#"); + StringBuilder scode = new StringBuilder(parts[0]); + String sxh = parts[1]; + + String code = username + "%%%" + password; + + StringBuilder encoded = new StringBuilder(); + for (int i = 0, codeLength = code.length(); i < codeLength; i++) { + if (i < 20) { + int index = sxh.charAt(i) - 48; + encoded.append(code.charAt(i)).append(scode, 0, index); + scode.delete(0, index); + } else { + encoded.append(code, i, codeLength); + i = codeLength; + } + } + + return encoded.toString(); + } +} diff --git a/mywust-util/src/main/java/cn/linghang/mywust/util/RepeatableComparator.java b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/RepeatableComparator.java similarity index 83% rename from mywust-util/src/main/java/cn/linghang/mywust/util/RepeatableComparator.java rename to mywust-util/src/main/java/cn/wustlinghang/mywust/util/RepeatableComparator.java index d8668f2..b00de97 100644 --- a/mywust-util/src/main/java/cn/linghang/mywust/util/RepeatableComparator.java +++ b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/RepeatableComparator.java @@ -1,4 +1,4 @@ -package cn.linghang.mywust.util; +package cn.wustlinghang.mywust.util; import java.util.Comparator; diff --git a/mywust-util/src/main/java/cn/linghang/mywust/util/StringUtil.java b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/StringUtil.java similarity index 97% rename from mywust-util/src/main/java/cn/linghang/mywust/util/StringUtil.java rename to mywust-util/src/main/java/cn/wustlinghang/mywust/util/StringUtil.java index 59bc893..2fe5f38 100644 --- a/mywust-util/src/main/java/cn/linghang/mywust/util/StringUtil.java +++ b/mywust-util/src/main/java/cn/wustlinghang/mywust/util/StringUtil.java @@ -1,10 +1,9 @@ -package cn.linghang.mywust.util; +package cn.wustlinghang.mywust.util; import cn.hutool.core.util.URLUtil; import com.google.common.base.Joiner; import org.apache.commons.codec.binary.Base64; -import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.util.*; diff --git a/pom.xml b/pom.xml index 6672e78..2a61e79 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - cn.linghang + cn.wustlinghang.mywust mywust pom ${revision}