From 040f9480ecfe95e689ed704cc5f316c54475c80a Mon Sep 17 00:00:00 2001
From: robert <6708314@qq.com>
Date: Thu, 25 Aug 2022 21:36:30 +0800
Subject: [PATCH] add
---
src/hoj-springboot/.gitignore | 36 +
src/hoj-springboot/DataBackup/pom.xml | 208 +
.../druid/pool/DruidAbstractDataSource.java | 2118 ++
.../top/hcode/hoj/DataBackupApplication.java | 26 +
.../hoj/advice/GlobalExceptionAdvice.java | 299 +
.../top/hcode/hoj/annotation/HOJAccess.java | 16 +
.../hcode/hoj/annotation/HOJAccessEnum.java | 42 +
.../StatusAccessDeniedException.java | 28 +
.../common/exception/StatusFailException.java | 27 +
.../exception/StatusForbiddenException.java | 28 +
.../exception/StatusNotFoundException.java | 28 +
.../exception/StatusSystemErrorException.java | 28 +
.../hcode/hoj/common/result/CommonResult.java | 73 +
.../hcode/hoj/common/result/ResultStatus.java | 31 +
.../top/hcode/hoj/config/AsyncTaskConfig.java | 62 +
.../hcode/hoj/config/DataSourceConfigure.java | 27 +
.../top/hcode/hoj/config/DruidConfigure.java | 130 +
.../hcode/hoj/config/JedisPoolConfigure.java | 22 +
.../hoj/config/JudgeAsyncTaskConfig.java | 39 +
.../hcode/hoj/config/MyMetaObjectConfig.java | 26 +
.../hcode/hoj/config/MybatisPlusConfig.java | 31 +
.../top/hcode/hoj/config/RedisAutoConfig.java | 72 +
.../top/hcode/hoj/config/RedisConfig.java | 50 +
.../hcode/hoj/config/RestTemplateConfig.java | 30 +
.../top/hcode/hoj/config/ShiroConfig.java | 101 +
.../top/hcode/hoj/config/StartupRunner.java | 448 +
.../top/hcode/hoj/config/SwaggerConfig.java | 56 +
.../top/hcode/hoj/config/TomcatConfig.java | 30 +
.../top/hcode/hoj/config/WebMvcConfig.java | 56 +
.../admin/AdminAccountController.java | 42 +
.../admin/AdminContestController.java | 236 +
.../admin/AdminDiscussionController.java | 60 +
.../admin/AdminGroupProblemController.java | 40 +
.../admin/AdminJudgeController.java | 64 +
.../admin/AdminProblemController.java | 108 +
.../controller/admin/AdminTagController.java | 78 +
.../AdminTrainingCategoryController.java | 48 +
.../admin/AdminTrainingController.java | 128 +
.../controller/admin/AdminUserController.java | 69 +
.../admin/AnnouncementController.java | 53 +
.../controller/admin/ConfigController.java | 105 +
.../controller/admin/DashboardController.java | 46 +
.../controller/admin/SwitchController.java | 37 +
.../file/ContestFileController.java | 57 +
.../hoj/controller/file/ImageController.java | 55 +
.../file/ImportFpsProblemController.java | 46 +
.../file/ImportQDUOJProblemController.java | 45 +
.../file/MarkDownFileController.java | 54 +
.../file/ProblemFileController.java | 59 +
.../controller/file/TestCaseController.java | 42 +
.../controller/file/UserFileController.java | 34 +
.../group/GroupAnnouncementController.java | 54 +
.../group/GroupContestController.java | 151 +
.../hoj/controller/group/GroupController.java | 71 +
.../group/GroupDiscussionController.java | 57 +
.../group/GroupMemberController.java | 71 +
.../group/GroupProblemController.java | 100 +
.../controller/group/GroupRankController.java | 32 +
.../group/GroupTrainingController.java | 104 +
.../controller/msg/AdminNoticeController.java | 61 +
.../hoj/controller/msg/NoticeController.java | 43 +
.../controller/msg/UserMessageController.java | 103 +
.../hoj/controller/oj/AccountController.java | 95 +
.../hoj/controller/oj/CommentController.java | 81 +
.../hoj/controller/oj/CommonController.java | 77 +
.../controller/oj/ContestAdminController.java | 83 +
.../hoj/controller/oj/ContestController.java | 193 +
.../oj/ContestScoreboardController.java | 47 +
.../controller/oj/DiscussionController.java | 93 +
.../hoj/controller/oj/HomeController.java | 113 +
.../hoj/controller/oj/JudgeController.java | 160 +
.../hoj/controller/oj/PassportController.java | 109 +
.../hoj/controller/oj/ProblemController.java | 88 +
.../hoj/controller/oj/RankController.java | 38 +
.../hoj/controller/oj/TrainingController.java | 121 +
.../language/AtCoderLanguageStrategy.java | 326 +
.../hoj/crawler/language/LanguageContext.java | 45 +
.../crawler/language/LanguageStrategy.java | 119 +
.../language/SPOJLanguageStrategy.java | 143 +
.../problem/AtCoderProblemStrategy.java | 128 +
.../crawler/problem/CFProblemStrategy.java | 197 +
.../crawler/problem/GYMProblemStrategy.java | 134 +
.../crawler/problem/HDUProblemStrategy.java | 66 +
.../crawler/problem/POJProblemStrategy.java | 63 +
.../hoj/crawler/problem/ProblemContext.java | 31 +
.../hoj/crawler/problem/ProblemStrategy.java | 24 +
.../crawler/problem/SPOJProblemStrategy.java | 89 +
.../dao/common/AnnouncementEntityService.java | 21 +
.../hoj/dao/common/FileEntityService.java | 28 +
.../impl/AnnouncementEntityServiceImpl.java | 39 +
.../impl/FileEntityEntityServiceImpl.java | 184 +
.../ContestAnnouncementEntityService.java | 8 +
.../hoj/dao/contest/ContestEntityService.java | 25 +
.../ContestExplanationEntityService.java | 16 +
.../contest/ContestPrintEntityService.java | 12 +
.../contest/ContestProblemEntityService.java | 28 +
.../contest/ContestRecordEntityService.java | 32 +
.../contest/ContestRegisterEntityService.java | 16 +
.../contest/ContestScoreEntityService.java | 16 +
.../ContestAnnouncementEntityServiceImpl.java | 16 +
.../impl/ContestEntityServiceImpl.java | 83 +
.../ContestExplanationEntityServiceImpl.java | 20 +
.../impl/ContestPrintEntityServiceImpl.java | 17 +
.../impl/ContestProblemEntityServiceImpl.java | 71 +
.../impl/ContestRecordEntityServiceImpl.java | 170 +
.../ContestRegisterEntityServiceImpl.java | 20 +
.../impl/ContestScoreEntityServiceImpl.java | 20 +
.../dao/discussion/CommentEntityService.java | 27 +
.../discussion/CommentLikeEntityService.java | 8 +
.../discussion/DiscussionEntityService.java | 13 +
.../DiscussionLikeEntityService.java | 7 +
.../DiscussionReportEntityService.java | 12 +
.../dao/discussion/ReplyEntityService.java | 20 +
.../impl/CommentEntityServiceImpl.java | 142 +
.../impl/CommentLikeEntityServiceImpl.java | 17 +
.../impl/DiscussionEntityServiceImpl.java | 54 +
.../impl/DiscussionLikeEntityServiceImpl.java | 16 +
.../DiscussionReportEntityServiceImpl.java | 30 +
.../impl/ReplyEntityServiceImpl.java | 100 +
.../group/GroupAnnouncementEntityService.java | 19 +
.../dao/group/GroupContestEntityService.java | 19 +
.../group/GroupDiscussionEntityService.java | 13 +
.../hoj/dao/group/GroupEntityService.java | 21 +
.../dao/group/GroupMemberEntityService.java | 30 +
.../dao/group/GroupProblemEntityService.java | 19 +
.../dao/group/GroupTrainingEntityService.java | 19 +
.../GroupAnnouncementEntityServiceImpl.java | 44 +
.../impl/GroupContestEntityServiceImpl.java | 43 +
.../GroupDiscussionEntityServiceImpl.java | 16 +
.../group/impl/GroupEntityServiceImpl.java | 39 +
.../impl/GroupMemberEntityServiceImpl.java | 138 +
.../impl/GroupProblemEntityServiceImpl.java | 44 +
.../impl/GroupTrainingEntityServiceImpl.java | 44 +
.../hoj/dao/judge/JudgeCaseEntityService.java | 16 +
.../hoj/dao/judge/JudgeEntityService.java | 63 +
.../dao/judge/JudgeServerEntityService.java | 9 +
.../RemoteJudgeAccountEntityService.java | 7 +
.../impl/JudgeCaseEntityServiceImpl.java | 20 +
.../judge/impl/JudgeEntityServiceImpl.java | 152 +
.../impl/JudgeServerEntityServiceImpl.java | 19 +
.../RemoteJudgeAccountEntityServiceImpl.java | 17 +
.../dao/msg/AdminSysNoticeEntityService.java | 18 +
.../hoj/dao/msg/MsgRemindEntityService.java | 21 +
.../dao/msg/UserSysNoticeEntityService.java | 13 +
.../impl/AdminSysNoticeEntityServiceImpl.java | 31 +
.../msg/impl/MsgRemindEntityServiceImpl.java | 37 +
.../impl/UserSysNoticeEntityServiceImpl.java | 36 +
.../dao/problem/CategoryEntityService.java | 8 +
.../problem/CodeTemplateEntityService.java | 7 +
.../dao/problem/LanguageEntityService.java | 7 +
.../dao/problem/ProblemCaseEntityService.java | 12 +
.../problem/ProblemCountEntityService.java | 16 +
.../hoj/dao/problem/ProblemEntityService.java | 32 +
.../problem/ProblemLanguageEntityService.java | 12 +
.../dao/problem/ProblemTagEntityService.java | 7 +
.../TagClassificationEntityService.java | 11 +
.../hoj/dao/problem/TagEntityService.java | 16 +
.../impl/CategoryEntityServiceImpl.java | 16 +
.../impl/CodeTemplateEntityServiceImpl.java | 16 +
.../impl/LanguageEntityServiceImpl.java | 16 +
.../impl/ProblemCaseEntityServiceImpl.java | 16 +
.../problem/impl/ProblemCountServiceImpl.java | 28 +
.../impl/ProblemEntityServiceImpl.java | 690 +
.../ProblemLanguageEntityServiceImpl.java | 16 +
.../impl/ProblemTagEntityServiceImpl.java | 16 +
.../TagClassificationEntityServiceImpl.java | 15 +
.../problem/impl/TagEntityServiceImpl.java | 20 +
.../MappingTrainingCategoryEntityService.java | 7 +
.../TrainingCategoryEntityService.java | 9 +
.../dao/training/TrainingEntityService.java | 12 +
.../TrainingProblemEntityService.java | 21 +
.../training/TrainingRecordEntityService.java | 19 +
.../TrainingRegisterEntityService.java | 12 +
...pingTrainingCategoryEntityServiceImpl.java | 16 +
.../TrainingCategoryEntityServiceImpl.java | 26 +
.../impl/TrainingEntityServiceImpl.java | 49 +
.../TrainingProblemEntityServiceImpl.java | 65 +
.../impl/TrainingRecordEntityServiceImpl.java | 29 +
.../TrainingRegisterEntityServiceImpl.java | 33 +
.../hcode/hoj/dao/user/AuthEntityService.java | 16 +
.../hoj/dao/user/RoleAuthEntityService.java | 16 +
.../hcode/hoj/dao/user/RoleEntityService.java | 16 +
.../hoj/dao/user/SessionEntityService.java | 10 +
.../dao/user/UserAcproblemEntityService.java | 16 +
.../hoj/dao/user/UserInfoEntityService.java | 24 +
.../hoj/dao/user/UserRecordEntityService.java | 36 +
.../hoj/dao/user/UserRoleEntityService.java | 25 +
.../dao/user/impl/AuthEntityServiceImpl.java | 20 +
.../user/impl/RoleAuthEntityServiceImpl.java | 20 +
.../dao/user/impl/RoleEntityServiceImpl.java | 20 +
.../user/impl/SessionEntityServiceImpl.java | 129 +
.../impl/UserAcproblemEntityServiceImpl.java | 22 +
.../user/impl/UserInfoEntityServiceImpl.java | 54 +
.../impl/UserRecordEntityServiceImpl.java | 84 +
.../user/impl/UserRoleEntityServiceImpl.java | 128 +
.../hcode/hoj/exception/AccessException.java | 27 +
.../hoj/interceptor/AccessInterceptor.java | 55 +
.../top/hcode/hoj/judge/AbstractReceiver.java | 24 +
.../java/top/hcode/hoj/judge/ChooseUtils.java | 214 +
.../java/top/hcode/hoj/judge/Dispatcher.java | 379 +
.../judge/remote/RemoteJudgeDispatcher.java | 61 +
.../hoj/judge/remote/RemoteJudgeReceiver.java | 329 +
.../hcode/hoj/judge/self/JudgeDispatcher.java | 81 +
.../hcode/hoj/judge/self/JudgeReceiver.java | 99 +
.../admin/account/AdminAccountManager.java | 100 +
.../AdminAnnouncementManager.java | 52 +
.../AdminContestAnnouncementManager.java | 59 +
.../admin/contest/AdminContestManager.java | 179 +
.../contest/AdminContestProblemManager.java | 341 +
.../discussion/AdminDiscussionManager.java | 54 +
.../problem/AdminGroupProblemManager.java | 74 +
.../admin/problem/AdminProblemManager.java | 264 +
.../admin/problem/RemoteProblemManager.java | 149 +
.../manager/admin/rejudge/RejudgeManager.java | 351 +
.../manager/admin/system/ConfigManager.java | 514 +
.../admin/system/DashboardManager.java | 61 +
.../manager/admin/tag/AdminTagManager.java | 100 +
.../AdminTrainingCategoryManager.java | 55 +
.../admin/training/AdminTrainingManager.java | 216 +
.../training/AdminTrainingProblemManager.java | 237 +
.../training/AdminTrainingRecordManager.java | 155 +
.../manager/admin/user/AdminUserManager.java | 257 +
.../hcode/hoj/manager/email/EmailManager.java | 235 +
.../hoj/manager/file/ContestFileManager.java | 469 +
.../hcode/hoj/manager/file/ImageManager.java | 216 +
.../manager/file/ImportFpsProblemManager.java | 325 +
.../file/ImportQDUOJProblemManager.java | 273 +
.../hoj/manager/file/MarkDownFileManager.java | 173 +
.../hoj/manager/file/ProblemFileManager.java | 417 +
.../hoj/manager/file/TestCaseManager.java | 271 +
.../hoj/manager/file/UserFileManager.java | 49 +
.../hcode/hoj/manager/group/GroupManager.java | 317 +
.../hoj/manager/group/GroupRankManager.java | 100 +
.../GroupAnnouncementManager.java | 163 +
.../GroupContestAnnouncementManager.java | 187 +
.../group/contest/GroupContestManager.java | 276 +
.../contest/GroupContestProblemManager.java | 365 +
.../discussion/GroupDiscussionManager.java | 241 +
.../group/member/GroupMemberManager.java | 297 +
.../group/problem/GroupProblemManager.java | 477 +
.../group/training/GroupTrainingManager.java | 336 +
.../training/GroupTrainingProblemManager.java | 277 +
.../hoj/manager/msg/AdminNoticeManager.java | 142 +
.../hcode/hoj/manager/msg/NoticeManager.java | 108 +
.../hoj/manager/msg/UserMessageManager.java | 288 +
.../hcode/hoj/manager/oj/AccountManager.java | 415 +
.../manager/oj/BeforeDispatchInitManager.java | 221 +
.../hcode/hoj/manager/oj/CommentManager.java | 552 +
.../hcode/hoj/manager/oj/CommonManager.java | 226 +
.../hoj/manager/oj/ContestAdminManager.java | 156 +
.../oj/ContestCalculateRankManager.java | 545 +
.../hcode/hoj/manager/oj/ContestManager.java | 585 +
.../hoj/manager/oj/ContestRankManager.java | 180 +
.../manager/oj/ContestScoreboardManager.java | 150 +
.../hoj/manager/oj/DiscussionManager.java | 363 +
.../top/hcode/hoj/manager/oj/HomeManager.java | 147 +
.../hcode/hoj/manager/oj/JudgeManager.java | 641 +
.../hcode/hoj/manager/oj/PassportManager.java | 325 +
.../hcode/hoj/manager/oj/ProblemManager.java | 292 +
.../top/hcode/hoj/manager/oj/RankManager.java | 134 +
.../hcode/hoj/manager/oj/TrainingManager.java | 383 +
.../hoj/mapper/AdminSysNoticeMapper.java | 16 +
.../hcode/hoj/mapper/AnnouncementMapper.java | 25 +
.../java/top/hcode/hoj/mapper/AuthMapper.java | 16 +
.../top/hcode/hoj/mapper/CategoryMapper.java | 11 +
.../hcode/hoj/mapper/CodeTemplateMapper.java | 13 +
.../hcode/hoj/mapper/CommentLikeMapper.java | 12 +
.../top/hcode/hoj/mapper/CommentMapper.java | 32 +
.../hoj/mapper/ContestAnnouncementMapper.java | 11 +
.../hoj/mapper/ContestExplanationMapper.java | 16 +
.../top/hcode/hoj/mapper/ContestMapper.java | 33 +
.../hcode/hoj/mapper/ContestPrintMapper.java | 16 +
.../hoj/mapper/ContestProblemMapper.java | 27 +
.../hcode/hoj/mapper/ContestRecordMapper.java | 43 +
.../hoj/mapper/ContestRegisterMapper.java | 20 +
.../hcode/hoj/mapper/ContestScoreMapper.java | 16 +
.../hoj/mapper/DiscussionLikeMapper.java | 12 +
.../hcode/hoj/mapper/DiscussionMapper.java | 15 +
.../hoj/mapper/DiscussionReportMapper.java | 16 +
.../java/top/hcode/hoj/mapper/FileMapper.java | 31 +
.../hoj/mapper/GroupAnnouncementMapper.java | 26 +
.../hcode/hoj/mapper/GroupContestMapper.java | 26 +
.../hoj/mapper/GroupDiscussionMapper.java | 17 +
.../top/hcode/hoj/mapper/GroupMapper.java | 27 +
.../hcode/hoj/mapper/GroupMemberMapper.java | 23 +
.../hcode/hoj/mapper/GroupProblemMapper.java | 25 +
.../hcode/hoj/mapper/GroupTrainingMapper.java | 26 +
.../top/hcode/hoj/mapper/JudgeCaseMapper.java | 20 +
.../top/hcode/hoj/mapper/JudgeMapper.java | 63 +
.../hcode/hoj/mapper/JudgeServerMapper.java | 13 +
.../top/hcode/hoj/mapper/LanguageMapper.java | 11 +
.../mapper/MappingTrainingCategoryMapper.java | 11 +
.../top/hcode/hoj/mapper/MsgRemindMapper.java | 20 +
.../hcode/hoj/mapper/ProblemCaseMapper.java | 16 +
.../hcode/hoj/mapper/ProblemCountMapper.java | 21 +
.../hoj/mapper/ProblemLanguageMapper.java | 11 +
.../top/hcode/hoj/mapper/ProblemMapper.java | 31 +
.../hcode/hoj/mapper/ProblemTagMapper.java | 11 +
.../hoj/mapper/RemoteJudgeAccountMapper.java | 24 +
.../top/hcode/hoj/mapper/ReplyMapper.java | 24 +
.../top/hcode/hoj/mapper/RoleAuthMapper.java | 23 +
.../java/top/hcode/hoj/mapper/RoleMapper.java | 20 +
.../top/hcode/hoj/mapper/SessionMapper.java | 12 +
.../hoj/mapper/TagClassificationMapper.java | 15 +
.../java/top/hcode/hoj/mapper/TagMapper.java | 20 +
.../hoj/mapper/TrainingCategoryMapper.java | 14 +
.../top/hcode/hoj/mapper/TrainingMapper.java | 24 +
.../hoj/mapper/TrainingProblemMapper.java | 20 +
.../hoj/mapper/TrainingRecordMapper.java | 23 +
.../hoj/mapper/TrainingRegisterMapper.java | 12 +
.../hcode/hoj/mapper/UserAcproblemMapper.java | 21 +
.../top/hcode/hoj/mapper/UserInfoMapper.java | 28 +
.../hcode/hoj/mapper/UserRecordMapper.java | 40 +
.../top/hcode/hoj/mapper/UserRoleMapper.java | 38 +
.../hcode/hoj/mapper/UserSysNoticeMapper.java | 18 +
.../hoj/mapper/xml/AdminSysNoticeMapper.xml | 36 +
.../hoj/mapper/xml/AnnouncementMapper.xml | 36 +
.../hcode/hoj/mapper/xml/CommentMapper.xml | 54 +
.../mapper/xml/ContestExplanationMapper.xml | 5 +
.../hcode/hoj/mapper/xml/ContestMapper.xml | 47 +
.../hoj/mapper/xml/ContestProblemMapper.xml | 55 +
.../hoj/mapper/xml/ContestRecordMapper.xml | 128 +
.../hoj/mapper/xml/ContestRegisterMapper.xml | 5 +
.../hoj/mapper/xml/ContestScoreMapper.xml | 5 +
.../hcode/hoj/mapper/xml/DiscussionMapper.xml | 42 +
.../hoj/mapper/xml/DiscussionReportMapper.xml | 27 +
.../mapper/xml/GroupAnnouncementMapper.xml | 27 +
.../hoj/mapper/xml/GroupContestMapper.xml | 18 +
.../hoj/mapper/xml/GroupDiscussionMapper.xml | 4 +
.../top/hcode/hoj/mapper/xml/GroupMapper.xml | 46 +
.../hoj/mapper/xml/GroupMemberMapper.xml | 45 +
.../hoj/mapper/xml/GroupProblemMapper.xml | 42 +
.../hoj/mapper/xml/GroupTrainingMapper.xml | 44 +
.../top/hcode/hoj/mapper/xml/JudgeMapper.xml | 180 +
.../hcode/hoj/mapper/xml/MsgRemindMapper.xml | 62 +
.../hoj/mapper/xml/ProblemCountMapper.xml | 17 +
.../hcode/hoj/mapper/xml/ProblemMapper.xml | 63 +
.../top/hcode/hoj/mapper/xml/ReplyMapper.xml | 21 +
.../hcode/hoj/mapper/xml/RoleAuthMapper.xml | 24 +
.../top/hcode/hoj/mapper/xml/RoleMapper.xml | 5 +
.../hcode/hoj/mapper/xml/SessionMapper.xml | 6 +
.../top/hcode/hoj/mapper/xml/TagMapper.xml | 5 +
.../hoj/mapper/xml/TrainingCategoryMapper.xml | 8 +
.../hcode/hoj/mapper/xml/TrainingMapper.xml | 48 +
.../hoj/mapper/xml/TrainingProblemMapper.xml | 46 +
.../hoj/mapper/xml/TrainingRecordMapper.xml | 14 +
.../hoj/mapper/xml/UserAcproblemMapper.xml | 5 +
.../hcode/hoj/mapper/xml/UserInfoMapper.xml | 16 +
.../hcode/hoj/mapper/xml/UserRecordMapper.xml | 151 +
.../hcode/hoj/mapper/xml/UserRoleMapper.xml | 116 +
.../hoj/mapper/xml/UserSysNoticeMapper.xml | 36 +
.../top/hcode/hoj/pojo/bo/EmailRuleBo.java | 60 +
.../hcode/hoj/pojo/dto/AdminEditUserDto.java | 36 +
.../hcode/hoj/pojo/dto/AnnouncementDto.java | 19 +
.../hoj/pojo/dto/ApplyResetPasswordDto.java | 18 +
.../hcode/hoj/pojo/dto/ChangeEmailDto.java | 16 +
.../dto/ChangeGroupProblemProgressDto.java | 21 +
.../hcode/hoj/pojo/dto/ChangePasswordDto.java | 16 +
.../top/hcode/hoj/pojo/dto/CheckACDto.java | 23 +
.../hoj/pojo/dto/CheckUsernameOrEmailDto.java | 16 +
.../hcode/hoj/pojo/dto/ContestPrintDto.java | 20 +
.../hcode/hoj/pojo/dto/ContestProblemDto.java | 23 +
.../hcode/hoj/pojo/dto/ContestRankDto.java | 33 +
.../hoj/pojo/dto/DBAndRedisConfigDto.java | 58 +
.../hcode/hoj/pojo/dto/EmailConfigDto.java | 48 +
.../java/top/hcode/hoj/pojo/dto/LoginDto.java | 20 +
.../top/hcode/hoj/pojo/dto/PidListDto.java | 27 +
.../top/hcode/hoj/pojo/dto/ProblemDto.java | 38 +
.../hcode/hoj/pojo/dto/QDOJProblemDto.java | 79 +
.../hoj/pojo/dto/RegisterContestDto.java | 20 +
.../top/hcode/hoj/pojo/dto/RegisterDto.java | 35 +
.../hoj/pojo/dto/RegisterTrainingDto.java | 20 +
.../java/top/hcode/hoj/pojo/dto/ReplyDto.java | 23 +
.../hcode/hoj/pojo/dto/ResetPasswordDto.java | 19 +
.../hcode/hoj/pojo/dto/SubmitIdListDto.java | 19 +
.../hcode/hoj/pojo/dto/SubmitJudgeDto.java | 34 +
.../hcode/hoj/pojo/dto/SwitchConfigDto.java | 115 +
.../top/hcode/hoj/pojo/dto/TestEmailDto.java | 16 +
.../top/hcode/hoj/pojo/dto/TestJudgeDto.java | 45 +
.../top/hcode/hoj/pojo/dto/TrainingDto.java | 20 +
.../hoj/pojo/dto/TrainingProblemDto.java | 23 +
.../dto/UserReadContestAnnouncementDto.java | 19 +
.../top/hcode/hoj/pojo/dto/WebConfigDto.java | 63 +
.../hcode/hoj/pojo/vo/ACMContestRankVo.java | 53 +
.../java/top/hcode/hoj/pojo/vo/ACMRankVo.java | 50 +
.../java/top/hcode/hoj/pojo/vo/AccessVo.java | 16 +
.../top/hcode/hoj/pojo/vo/AdminContestVo.java | 98 +
.../hcode/hoj/pojo/vo/AdminSysNoticeVo.java | 40 +
.../top/hcode/hoj/pojo/vo/AnnouncementVo.java | 44 +
.../java/top/hcode/hoj/pojo/vo/CaptchaVo.java | 19 +
.../hcode/hoj/pojo/vo/ChangeAccountVo.java | 18 +
.../hoj/pojo/vo/CheckUsernameOrEmailVo.java | 16 +
.../top/hcode/hoj/pojo/vo/CommentListVo.java | 19 +
.../java/top/hcode/hoj/pojo/vo/CommentVo.java | 53 +
.../java/top/hcode/hoj/pojo/vo/ConfigVo.java | 226 +
.../hcode/hoj/pojo/vo/ContestOutsideInfo.java | 24 +
.../hcode/hoj/pojo/vo/ContestProblemVo.java | 43 +
.../hcode/hoj/pojo/vo/ContestRecordVo.java | 79 +
.../hoj/pojo/vo/ContestRegisterCountVo.java | 23 +
.../java/top/hcode/hoj/pojo/vo/ContestVo.java | 80 +
.../hcode/hoj/pojo/vo/DiscussionReportVo.java | 51 +
.../top/hcode/hoj/pojo/vo/DiscussionVo.java | 78 +
.../top/hcode/hoj/pojo/vo/ExcelUserVo.java | 22 +
.../top/hcode/hoj/pojo/vo/GroupMemberVo.java | 41 +
.../java/top/hcode/hoj/pojo/vo/GroupVo.java | 50 +
.../hcode/hoj/pojo/vo/ImportProblemVo.java | 99 +
.../java/top/hcode/hoj/pojo/vo/JudgeVo.java | 86 +
.../hcode/hoj/pojo/vo/OIContestRankVo.java | 54 +
.../java/top/hcode/hoj/pojo/vo/OIRankVo.java | 48 +
.../top/hcode/hoj/pojo/vo/ProblemCountVo.java | 57 +
.../top/hcode/hoj/pojo/vo/ProblemInfoVo.java | 23 +
.../top/hcode/hoj/pojo/vo/ProblemTagVo.java | 26 +
.../java/top/hcode/hoj/pojo/vo/ProblemVo.java | 86 +
.../hcode/hoj/pojo/vo/RandomProblemVo.java | 16 +
.../top/hcode/hoj/pojo/vo/RegisterCodeVo.java | 19 +
.../java/top/hcode/hoj/pojo/vo/ReplyVo.java | 57 +
.../top/hcode/hoj/pojo/vo/RoleAuthsVo.java | 40 +
.../hcode/hoj/pojo/vo/SubmissionInfoVo.java | 20 +
.../java/top/hcode/hoj/pojo/vo/SysMsgVo.java | 38 +
.../top/hcode/hoj/pojo/vo/TestJudgeVo.java | 51 +
.../top/hcode/hoj/pojo/vo/TrainingRankVo.java | 47 +
.../hcode/hoj/pojo/vo/TrainingRecordVo.java | 61 +
.../top/hcode/hoj/pojo/vo/TrainingVo.java | 56 +
.../hoj/pojo/vo/UserCalendarHeatmapVo.java | 24 +
.../top/hcode/hoj/pojo/vo/UserHomeVo.java | 67 +
.../top/hcode/hoj/pojo/vo/UserInfoVo.java | 67 +
.../java/top/hcode/hoj/pojo/vo/UserMsgVo.java | 63 +
.../top/hcode/hoj/pojo/vo/UserRolesVo.java | 85 +
.../hoj/pojo/vo/UserUnreadMsgCountVo.java | 34 +
.../hcode/hoj/schedule/ScheduleService.java | 21 +
.../hoj/schedule/ScheduleServiceImpl.java | 442 +
.../admin/account/AdminAccountService.java | 18 +
.../account/impl/AdminAccountServiceImpl.java | 43 +
.../AdminAnnouncementService.java | 22 +
.../impl/AdminAnnouncementServiceImpl.java | 59 +
.../AdminContestAnnouncementService.java | 19 +
.../contest/AdminContestProblemService.java | 34 +
.../admin/contest/AdminContestService.java | 26 +
.../AdminContestAnnouncementServiceImpl.java | 60 +
.../impl/AdminContestProblemServiceImpl.java | 115 +
.../contest/impl/AdminContestServiceImpl.java | 99 +
.../discussion/AdminDiscussionService.java | 25 +
.../impl/AdminDiscussionServiceImpl.java | 64 +
.../problem/AdminGroupProblemService.java | 17 +
.../admin/problem/AdminProblemService.java | 34 +
.../impl/AdminGroupProblemServiceImpl.java | 39 +
.../problem/impl/AdminProblemServiceImpl.java | 119 +
.../service/admin/rejudge/RejudgeService.java | 15 +
.../rejudge/impl/RejudgeServiceImpl.java | 61 +
.../service/admin/system/ConfigService.java | 35 +
.../admin/system/DashboardService.java | 18 +
.../admin/system/impl/ConfigServiceImpl.java | 114 +
.../system/impl/DashboardServiceImpl.java | 32 +
.../service/admin/tag/AdminTagService.java | 24 +
.../admin/tag/impl/AdminTagServiceImpl.java | 88 +
.../AdminTrainingCategoryService.java | 18 +
.../training/AdminTrainingProblemService.java | 20 +
.../admin/training/AdminTrainingService.java | 21 +
.../AdminTrainingCategoryServiceImpl.java | 51 +
.../impl/AdminTrainingProblemServiceImpl.java | 70 +
.../impl/AdminTrainingServiceImpl.java | 86 +
.../service/admin/user/AdminUserService.java | 28 +
.../admin/user/impl/AdminUserServiceImpl.java | 70 +
.../hoj/service/file/ContestFileService.java | 23 +
.../hcode/hoj/service/file/ImageService.java | 16 +
.../service/file/ImportFpsProblemService.java | 14 +
.../file/ImportQDUOJProblemService.java | 9 +
.../hoj/service/file/MarkDownFileService.java | 15 +
.../hoj/service/file/ProblemFileService.java | 14 +
.../hoj/service/file/TestCaseService.java | 21 +
.../hoj/service/file/UserFileService.java | 9 +
.../file/impl/ContestFileServiceImpl.java | 38 +
.../service/file/impl/ImageServiceImpl.java | 62 +
.../impl/ImportFpsProblemServiceImpl.java | 33 +
.../impl/ImportQDUOJProblemServiceImpl.java | 35 +
.../file/impl/MarkDownFileServiceImpl.java | 64 +
.../file/impl/ProblemFileServiceImpl.java | 43 +
.../file/impl/TestCaseServiceImpl.java | 45 +
.../file/impl/UserFileServiceImpl.java | 27 +
.../hoj/service/group/GroupRankService.java | 14 +
.../hcode/hoj/service/group/GroupService.java | 29 +
.../GroupAnnouncementService.java | 25 +
.../impl/GroupAnnouncementServiceImpl.java | 91 +
.../GroupContestAnnouncementService.java | 23 +
.../contest/GroupContestProblemService.java | 32 +
.../group/contest/GroupContestService.java | 30 +
.../GroupContestAnnouncementServiceImpl.java | 79 +
.../impl/GroupContestProblemServiceImpl.java | 122 +
.../contest/impl/GroupContestServiceImpl.java | 118 +
.../discussion/GroupDiscussionService.java | 24 +
.../impl/GroupDiscussionServiceImpl.java | 91 +
.../group/impl/GroupRankServiceImpl.java | 36 +
.../service/group/impl/GroupServiceImpl.java | 99 +
.../group/member/GroupMemberService.java | 26 +
.../member/impl/GroupMemberServiceImpl.java | 106 +
.../group/problem/GroupProblemService.java | 44 +
.../problem/impl/GroupProblemServiceImpl.java | 189 +
.../training/GroupTrainingProblemService.java | 30 +
.../group/training/GroupTrainingService.java | 30 +
.../impl/GroupTrainingProblemServiceImpl.java | 95 +
.../impl/GroupTrainingServiceImpl.java | 118 +
.../hoj/service/msg/AdminNoticeService.java | 17 +
.../hcode/hoj/service/msg/NoticeService.java | 12 +
.../hoj/service/msg/UserMessageService.java | 20 +
.../msg/impl/AdminNoticeServiceImpl.java | 60 +
.../service/msg/impl/NoticeServiceImpl.java | 32 +
.../msg/impl/UserMessageServiceImpl.java | 54 +
.../hcode/hoj/service/oj/AccountService.java | 24 +
.../hcode/hoj/service/oj/CommentService.java | 28 +
.../hcode/hoj/service/oj/CommonService.java | 31 +
.../hoj/service/oj/ContestAdminService.java | 18 +
.../service/oj/ContestScoreboardService.java | 20 +
.../hcode/hoj/service/oj/ContestService.java | 46 +
.../hoj/service/oj/DiscussionService.java | 36 +
.../top/hcode/hoj/service/oj/HomeService.java | 32 +
.../hcode/hoj/service/oj/JudgeService.java | 45 +
.../hcode/hoj/service/oj/PassportService.java | 31 +
.../hcode/hoj/service/oj/ProblemService.java | 29 +
.../top/hcode/hoj/service/oj/RankService.java | 9 +
.../hcode/hoj/service/oj/TrainingService.java | 31 +
.../service/oj/impl/AccountServiceImpl.java | 81 +
.../service/oj/impl/CommentServiceImpl.java | 106 +
.../service/oj/impl/CommonServiceImpl.java | 68 +
.../oj/impl/ContestAdminServiceImpl.java | 70 +
.../oj/impl/ContestScoreboardServiceImpl.java | 49 +
.../service/oj/impl/ContestServiceImpl.java | 160 +
.../oj/impl/DiscussionServiceImpl.java | 113 +
.../hoj/service/oj/impl/HomeServiceImpl.java | 57 +
.../hoj/service/oj/impl/JudgeServiceImpl.java | 151 +
.../service/oj/impl/PassportServiceImpl.java | 86 +
.../service/oj/impl/ProblemServiceImpl.java | 65 +
.../hoj/service/oj/impl/RankServiceImpl.java | 31 +
.../service/oj/impl/TrainingServiceImpl.java | 96 +
.../top/hcode/hoj/shiro/AccountProfile.java | 56 +
.../top/hcode/hoj/shiro/AccountRealm.java | 92 +
.../java/top/hcode/hoj/shiro/JwtFilter.java | 143 +
.../java/top/hcode/hoj/shiro/JwtToken.java | 27 +
.../top/hcode/hoj/utils/CodeForcesUtils.java | 82 +
.../java/top/hcode/hoj/utils/ConfigUtils.java | 128 +
.../java/top/hcode/hoj/utils/Constants.java | 333 +
.../java/top/hcode/hoj/utils/IpUtils.java | 65 +
.../java/top/hcode/hoj/utils/JsoupUtils.java | 84 +
.../java/top/hcode/hoj/utils/JwtUtils.java | 74 +
.../java/top/hcode/hoj/utils/RedisUtils.java | 664 +
.../hcode/hoj/utils/ServiceContextUtils.java | 29 +
.../java/top/hcode/hoj/utils/ShiroUtils.java | 21 +
.../hcode/hoj/validator/AccessValidator.java | 57 +
.../hcode/hoj/validator/ContestValidator.java | 152 +
.../hcode/hoj/validator/GroupValidator.java | 60 +
.../hcode/hoj/validator/JudgeValidator.java | 146 +
.../hoj/validator/TrainingValidator.java | 109 +
.../src/main/resources/CodeForcesAES.js | 722 +
.../src/main/resources/application-dev.yml | 120 +
.../src/main/resources/application-prod.yml | 124 +
.../src/main/resources/application.yml | 13 +
.../DataBackup/src/main/resources/banner.txt | 21 +
.../src/main/resources/bootstrap.yml | 31 +
.../src/main/resources/email-rule.yml | 39 +
.../src/main/resources/logback-spring.xml | 78 +
.../templates/emailTemplate_registerCode.html | 74 +
.../emailTemplate_resetPassword.html | 72 +
.../templates/emailTemplate_testEmail.html | 72 +
.../hcode/hoj/DataBackupApplicationTests.java | 269 +
src/hoj-springboot/JudgeServer/pom.xml | 134 +
.../druid/pool/DruidAbstractDataSource.java | 2098 ++
.../top/hcode/hoj/JudgeServerApplication.java | 22 +
.../top/hcode/hoj/common/CommonResult.java | 73 +
.../top/hcode/hoj/common/ResultStatus.java | 31 +
.../hoj/common/exception/CompileError.java | 22 +
.../hoj/common/exception/RuntimeError.java | 22 +
.../hoj/common/exception/SubmitError.java | 22 +
.../hoj/common/exception/SystemError.java | 23 +
.../top/hcode/hoj/config/AsyncTaskConfig.java | 48 +
.../hcode/hoj/config/DruidConfiguration.java | 65 +
.../hcode/hoj/config/MyMetaObjectConfig.java | 27 +
.../hcode/hoj/config/MybatisPlusConfig.java | 24 +
.../top/hcode/hoj/config/NacosConfig.java | 75 +
.../hcode/hoj/config/RestTemplateConfig.java | 23 +
.../top/hcode/hoj/config/StartupRunner.java | 97 +
.../hcode/hoj/controller/JudgeController.java | 138 +
.../controller/SystemConfigController.java | 25 +
.../hcode/hoj/dao/ContestEntityService.java | 17 +
.../hoj/dao/ContestRecordEntityService.java | 16 +
.../hcode/hoj/dao/JudgeCaseEntityService.java | 16 +
.../top/hcode/hoj/dao/JudgeEntityService.java | 17 +
.../hoj/dao/JudgeServerEntityService.java | 11 +
.../hoj/dao/ProblemCaseEntityService.java | 12 +
.../hoj/dao/ProblemCountEntityService.java | 18 +
.../hcode/hoj/dao/ProblemEntityService.java | 18 +
.../dao/RemoteJudgeAccountEntityService.java | 7 +
.../hoj/dao/UserAcproblemEntityService.java | 16 +
.../hoj/dao/UserRecordEntityService.java | 18 +
.../dao/impl/ContestEntityServiceImpl.java | 21 +
.../impl/ContestRecordEntityServiceImpl.java | 90 +
.../dao/impl/JudgeCaseEntityServiceImpl.java | 20 +
.../hoj/dao/impl/JudgeEntityServiceImpl.java | 21 +
.../impl/JudgeServerEntityServiceImpl.java | 82 +
.../impl/ProblemCaseEntityServiceImpl.java | 16 +
.../impl/ProblemCountEntityServiceImpl.java | 128 +
.../dao/impl/ProblemEntityServiceImpl.java | 21 +
.../RemoteJudgeAccountEntityServiceImpl.java | 17 +
.../impl/UserAcproblemEntityServiceImpl.java | 21 +
.../dao/impl/UserRecordEntityServiceImpl.java | 120 +
.../top/hcode/hoj/judge/AbstractJudge.java | 168 +
.../java/top/hcode/hoj/judge/Compiler.java | 137 +
.../top/hcode/hoj/judge/JudgeContext.java | 117 +
.../java/top/hcode/hoj/judge/JudgeRun.java | 218 +
.../top/hcode/hoj/judge/JudgeStrategy.java | 409 +
.../hcode/hoj/judge/ProblemTestCaseUtils.java | 212 +
.../java/top/hcode/hoj/judge/SandboxRun.java | 844 +
.../top/hcode/hoj/judge/entity/JudgeDTO.java | 53 +
.../hoj/judge/entity/JudgeGlobalDTO.java | 107 +
.../hcode/hoj/judge/entity/SandBoxRes.java | 49 +
.../hcode/hoj/judge/task/DefaultJudge.java | 129 +
.../hoj/judge/task/InteractiveJudge.java | 176 +
.../hcode/hoj/judge/task/SpecialJudge.java | 213 +
.../top/hcode/hoj/judge/task/TestJudge.java | 115 +
.../top/hcode/hoj/mapper/ContestMapper.java | 21 +
.../hcode/hoj/mapper/ContestRecordMapper.java | 21 +
.../top/hcode/hoj/mapper/JudgeCaseMapper.java | 20 +
.../top/hcode/hoj/mapper/JudgeMapper.java | 21 +
.../hcode/hoj/mapper/JudgeServerMapper.java | 11 +
.../hcode/hoj/mapper/ProblemCaseMapper.java | 16 +
.../hcode/hoj/mapper/ProblemCountMapper.java | 20 +
.../top/hcode/hoj/mapper/ProblemMapper.java | 21 +
.../hoj/mapper/RemoteJudgeAccountMapper.java | 11 +
.../hcode/hoj/mapper/UserAcproblemMapper.java | 21 +
.../hcode/hoj/mapper/UserRecordMapper.java | 21 +
.../hcode/hoj/mapper/xml/JudgeCaseMapper.xml | 5 +
.../top/hcode/hoj/mapper/xml/JudgeMapper.xml | 5 +
.../hoj/remoteJudge/RemoteJudgeContext.java | 116 +
.../hoj/remoteJudge/RemoteJudgeGetResult.java | 196 +
.../hoj/remoteJudge/RemoteJudgeToSubmit.java | 91 +
.../remoteJudge/entity/RemoteJudgeDTO.java | 154 +
.../remoteJudge/entity/RemoteJudgeRes.java | 33 +
.../remoteJudge/task/Impl/AtCoderJudge.java | 259 +
.../task/Impl/CodeForcesJudge.java | 500 +
.../hoj/remoteJudge/task/Impl/GYMJudge.java | 102 +
.../hoj/remoteJudge/task/Impl/HDUJudge.java | 219 +
.../hoj/remoteJudge/task/Impl/POJJudge.java | 222 +
.../hoj/remoteJudge/task/Impl/SPOJJudge.java | 256 +
.../remoteJudge/task/RemoteJudgeFactory.java | 27 +
.../remoteJudge/task/RemoteJudgeStrategy.java | 26 +
.../top/hcode/hoj/service/JudgeService.java | 23 +
.../hcode/hoj/service/RemoteJudgeService.java | 8 +
.../hoj/service/SystemConfigService.java | 7 +
.../hoj/service/impl/JudgeServiceImpl.java | 150 +
.../service/impl/RemoteJudgeServiceImpl.java | 110 +
.../service/impl/SystemConfigServiceImpl.java | 35 +
.../top/hcode/hoj/util/CodeForcesUtils.java | 38 +
.../java/top/hcode/hoj/util/Constants.java | 402 +
.../main/java/top/hcode/hoj/util/IpUtils.java | 88 +
.../java/top/hcode/hoj/util/JsoupUtils.java | 62 +
.../java/top/hcode/hoj/util/JudgeUtils.java | 91 +
.../top/hcode/hoj/util/ThreadPoolUtils.java | 40 +
.../src/main/resources/CodeForcesAES.js | 722 +
.../src/main/resources/application.yml | 54 +
.../JudgeServer/src/main/resources/banner.txt | 21 +
.../src/main/resources/bootstrap.yml | 35 +
.../src/main/resources/logback-spring.xml | 76 +
.../hoj/JudgeServerApplicationTests.java | 9 +
.../task/Impl/CodeForcesJudgeTest.java | 35 +
.../remoteJudge/task/Impl/HDUJudgeTest.java | 18 +
.../java/top/hcode/hoj/remoteJudge/test.html | 3340 ++
src/hoj-springboot/api/pom.xml | 56 +
.../top/hcode/hoj/pojo/dto/CompileDTO.java | 43 +
.../top/hcode/hoj/pojo/dto/TestJudgeReq.java | 82 +
.../top/hcode/hoj/pojo/dto/TestJudgeRes.java | 61 +
.../top/hcode/hoj/pojo/dto/ToJudgeDTO.java | 69 +
.../hoj/pojo/entity/common/Announcement.java | 50 +
.../hcode/hoj/pojo/entity/common/File.java | 62 +
.../hoj/pojo/entity/contest/Contest.java | 118 +
.../entity/contest/ContestAnnouncement.java | 48 +
.../entity/contest/ContestExplanation.java | 50 +
.../hoj/pojo/entity/contest/ContestPrint.java | 50 +
.../pojo/entity/contest/ContestProblem.java | 57 +
.../pojo/entity/contest/ContestRecord.java | 86 +
.../pojo/entity/contest/ContestRegister.java | 51 +
.../hoj/pojo/entity/contest/ContestScore.java | 53 +
.../hoj/pojo/entity/discussion/Comment.java | 67 +
.../pojo/entity/discussion/CommentLike.java | 42 +
.../pojo/entity/discussion/Discussion.java | 78 +
.../entity/discussion/DiscussionLike.java | 42 +
.../entity/discussion/DiscussionReport.java | 47 +
.../hoj/pojo/entity/discussion/Reply.java | 65 +
.../hcode/hoj/pojo/entity/group/Group.java | 68 +
.../hoj/pojo/entity/group/GroupMember.java | 49 +
.../hcode/hoj/pojo/entity/judge/Judge.java | 120 +
.../hoj/pojo/entity/judge/JudgeCase.java | 74 +
.../hoj/pojo/entity/judge/JudgeServer.java | 63 +
.../pojo/entity/judge/RemoteJudgeAccount.java | 48 +
.../hoj/pojo/entity/msg/AdminSysNotice.java | 54 +
.../hcode/hoj/pojo/entity/msg/MsgRemind.java | 68 +
.../hoj/pojo/entity/msg/UserSysNotice.java | 48 +
.../hoj/pojo/entity/problem/Category.java | 38 +
.../hoj/pojo/entity/problem/CodeTemplate.java | 47 +
.../hoj/pojo/entity/problem/Language.java | 59 +
.../hoj/pojo/entity/problem/Problem.java | 136 +
.../hoj/pojo/entity/problem/ProblemCase.java | 50 +
.../hoj/pojo/entity/problem/ProblemCount.java | 70 +
.../pojo/entity/problem/ProblemLanguage.java | 38 +
.../hoj/pojo/entity/problem/ProblemTag.java | 38 +
.../hcode/hoj/pojo/entity/problem/Tag.java | 55 +
.../entity/problem/TagClassification.java | 45 +
.../training/MappingTrainingCategory.java | 43 +
.../hoj/pojo/entity/training/Training.java | 68 +
.../entity/training/TrainingCategory.java | 47 +
.../pojo/entity/training/TrainingProblem.java | 51 +
.../pojo/entity/training/TrainingRecord.java | 53 +
.../entity/training/TrainingRegister.java | 46 +
.../top/hcode/hoj/pojo/entity/user/Auth.java | 51 +
.../top/hcode/hoj/pojo/entity/user/Role.java | 53 +
.../hcode/hoj/pojo/entity/user/RoleAuth.java | 40 +
.../hcode/hoj/pojo/entity/user/Session.java | 41 +
.../hoj/pojo/entity/user/UserAcproblem.java | 51 +
.../hcode/hoj/pojo/entity/user/UserInfo.java | 103 +
.../hoj/pojo/entity/user/UserRecord.java | 45 +
.../hcode/hoj/pojo/entity/user/UserRole.java | 45 +
src/hoj-springboot/pom.xml | 126 +
src/hoj-vue/.gitignore | 23 +
src/hoj-vue/README.md | 19 +
src/hoj-vue/babel.config.js | 5 +
src/hoj-vue/package-lock.json | 25960 ++++++++++++++++
src/hoj-vue/package.json | 59 +
src/hoj-vue/public/favicon.ico | Bin 0 -> 17750 bytes
src/hoj-vue/public/index.html | 218 +
src/hoj-vue/src/App.vue | 709 +
src/hoj-vue/src/assets/acm.jpg | Bin 0 -> 13574 bytes
src/hoj-vue/src/assets/atcoder-logo.png | Bin 0 -> 11143 bytes
src/hoj-vue/src/assets/backstage.png | Bin 0 -> 9449 bytes
src/hoj-vue/src/assets/codeforces-logo.png | Bin 0 -> 33908 bytes
src/hoj-vue/src/assets/default.jpg | Bin 0 -> 16184 bytes
src/hoj-vue/src/assets/gym-logo.png | Bin 0 -> 31119 bytes
src/hoj-vue/src/assets/hdu-logo.png | Bin 0 -> 35182 bytes
src/hoj-vue/src/assets/home1.jfif | Bin 0 -> 286527 bytes
src/hoj-vue/src/assets/home2.jpeg | Bin 0 -> 58258 bytes
src/hoj-vue/src/assets/icon.png | Bin 0 -> 4568 bytes
src/hoj-vue/src/assets/logo.png | Bin 0 -> 8675 bytes
src/hoj-vue/src/assets/oi.jpg | Bin 0 -> 12205 bytes
src/hoj-vue/src/assets/poj-logo.png | Bin 0 -> 6508 bytes
src/hoj-vue/src/assets/spoj-logo.png | Bin 0 -> 31489 bytes
src/hoj-vue/src/common/api.js | 1866 ++
src/hoj-vue/src/common/codeblock.js | 32 +
src/hoj-vue/src/common/constants.js | 317 +
src/hoj-vue/src/common/filters.js | 52 +
src/hoj-vue/src/common/highlight.js | 26 +
src/hoj-vue/src/common/katex.js | 36 +
src/hoj-vue/src/common/logo.js | 15 +
src/hoj-vue/src/common/message.js | 42 +
src/hoj-vue/src/common/storage.js | 37 +
src/hoj-vue/src/common/time.js | 79 +
src/hoj-vue/src/common/utils.js | 187 +
.../src/components/admin/Accordion.vue | 91 +
.../src/components/admin/AddExtraFile.vue | 146 +
.../src/components/admin/AddPublicProblem.vue | 170 +
.../src/components/admin/CodeMirror.vue | 107 +
src/hoj-vue/src/components/admin/Editor.vue | 193 +
.../src/components/admin/KatexEditor.vue | 45 +
.../components/admin/RemoteJudgeAccount.vue | 133 +
src/hoj-vue/src/components/admin/infoCard.vue | 90 +
.../src/components/oj/comment/comment.vue | 1279 +
.../src/components/oj/comment/emoji.json | 1 +
.../components/oj/common/Announcements.vue | 236 +
.../src/components/oj/common/CodeMirror.vue | 834 +
.../src/components/oj/common/Highlight.vue | 50 +
.../src/components/oj/common/Login.vue | 217 +
.../src/components/oj/common/Marquee.vue | 80 +
.../src/components/oj/common/NavBar.vue | 845 +
.../src/components/oj/common/Pagination.vue | 94 +
.../src/components/oj/common/Register.vue | 315 +
.../components/oj/common/ResetPassword.vue | 208 +
.../components/oj/group/AddGroupProblem.vue | 87 +
.../components/oj/group/AddPublicProblem.vue | 190 +
.../src/components/oj/group/Announcement.vue | 203 +
.../components/oj/group/AnnouncementList.vue | 354 +
.../src/components/oj/group/Contest.vue | 659 +
.../src/components/oj/group/ContestList.vue | 313 +
.../components/oj/group/DiscussionList.vue | 248 +
.../src/components/oj/group/MemberList.vue | 288 +
.../src/components/oj/group/Problem.vue | 1499 +
.../src/components/oj/group/ProblemList.vue | 459 +
.../src/components/oj/group/Training.vue | 320 +
.../src/components/oj/group/TrainingList.vue | 208 +
.../oj/group/TrainingProblemList.vue | 292 +
src/hoj-vue/src/components/oj/msg/msgSvg.vue | 23 +
.../src/components/oj/setting/Account.vue | 428 +
.../src/components/oj/setting/UserInfo.vue | 454 +
src/hoj-vue/src/i18n/admin/en-US.js | 442 +
src/hoj-vue/src/i18n/admin/zh-CN.js | 438 +
src/hoj-vue/src/i18n/index.js | 32 +
src/hoj-vue/src/i18n/oj/en-US.js | 696 +
src/hoj-vue/src/i18n/oj/zh-CN.js | 696 +
src/hoj-vue/src/main.js | 101 +
src/hoj-vue/src/router/adminRoutes.js | 198 +
src/hoj-vue/src/router/index.js | 142 +
src/hoj-vue/src/router/ojRoutes.js | 435 +
src/hoj-vue/src/store/contest.js | 282 +
src/hoj-vue/src/store/group.js | 99 +
src/hoj-vue/src/store/index.js | 139 +
src/hoj-vue/src/store/training.js | 126 +
src/hoj-vue/src/store/user.js | 110 +
src/hoj-vue/src/views/404.vue | 263 +
src/hoj-vue/src/views/admin/Dashboard.vue | 422 +
src/hoj-vue/src/views/admin/Home.vue | 732 +
src/hoj-vue/src/views/admin/Login.vue | 151 +
.../src/views/admin/contest/Contest.vue | 644 +
.../src/views/admin/contest/ContestList.vue | 324 +
.../src/views/admin/discussion/Discussion.vue | 451 +
.../src/views/admin/general/Announcement.vue | 388 +
.../src/views/admin/general/SysNotice.vue | 331 +
.../src/views/admin/general/SysSwitch.vue | 276 +
.../src/views/admin/general/SystemConfig.vue | 474 +
src/hoj-vue/src/views/admin/general/User.vue | 920 +
.../views/admin/problem/GroupProblemList.vue | 250 +
.../views/admin/problem/ImportAndExport.vue | 312 +
.../src/views/admin/problem/Problem.vue | 1589 +
.../src/views/admin/problem/ProblemList.vue | 675 +
src/hoj-vue/src/views/admin/problem/Tag.vue | 434 +
.../src/views/admin/training/Category.vue | 190 +
.../src/views/admin/training/Training.vue | 250 +
.../src/views/admin/training/TrainingList.vue | 246 +
.../admin/training/TrainingProblemList.vue | 435 +
src/hoj-vue/src/views/oj/Home.vue | 679 +
src/hoj-vue/src/views/oj/about/Developer.vue | 118 +
.../src/views/oj/about/Introduction.vue | 196 +
.../src/views/oj/contest/ContestDetails.vue | 573 +
.../src/views/oj/contest/ContestList.vue | 482 +
.../oj/contest/children/ACMContestRank.vue | 699 +
.../oj/contest/children/ACMInfoAdmin.vue | 241 +
.../oj/contest/children/ContestAdminPrint.vue | 195 +
.../oj/contest/children/ContestComment.vue | 12 +
.../oj/contest/children/ContestPrint.vue | 96 +
.../contest/children/ContestProblemList.vue | 249 +
.../views/oj/contest/children/ContestRank.vue | 46 +
.../contest/children/ContestRejudgeAdmin.vue | 110 +
.../oj/contest/children/OIContestRank.vue | 593 +
.../oj/contest/children/contestRankMixin.js | 111 +
.../oj/contest/outside/ACMScoreBoard.vue | 605 +
.../views/oj/contest/outside/OIScoreBoard.vue | 552 +
.../oj/contest/outside/scoreBoardMixin.js | 162 +
.../src/views/oj/discussion/discussion.vue | 471 +
.../views/oj/discussion/discussionList.vue | 822 +
.../src/views/oj/group/GroupDetails.vue | 628 +
src/hoj-vue/src/views/oj/group/GroupList.vue | 683 +
.../group/children/GroupAnnouncementList.vue | 68 +
.../oj/group/children/GroupContestList.vue | 580 +
.../oj/group/children/GroupDiscussionList.vue | 605 +
.../oj/group/children/GroupMemberList.vue | 200 +
.../oj/group/children/GroupProblemList.vue | 359 +
.../src/views/oj/group/children/GroupRank.vue | 269 +
.../views/oj/group/children/GroupSetting.vue | 551 +
.../oj/group/children/GroupTrainingList.vue | 367 +
src/hoj-vue/src/views/oj/message/SysMsg.vue | 226 +
src/hoj-vue/src/views/oj/message/UserMsg.vue | 343 +
src/hoj-vue/src/views/oj/message/message.vue | 147 +
src/hoj-vue/src/views/oj/problem/Problem.vue | 1832 ++
.../src/views/oj/problem/ProblemList.vue | 852 +
src/hoj-vue/src/views/oj/problem/chartData.js | 123 +
src/hoj-vue/src/views/oj/rank/ACMRank.vue | 347 +
src/hoj-vue/src/views/oj/rank/OIRank.vue | 326 +
.../src/views/oj/status/SubmissionDetails.vue | 540 +
.../src/views/oj/status/SubmissionList.vue | 1130 +
.../src/views/oj/training/TrainingDetails.vue | 363 +
.../src/views/oj/training/TrainingList.vue | 347 +
.../views/oj/training/TrainingProblemList.vue | 228 +
.../src/views/oj/training/TrainingRank.vue | 350 +
src/hoj-vue/src/views/oj/user/Logout.vue | 17 +
.../src/views/oj/user/SetNewPassword.vue | 180 +
src/hoj-vue/src/views/oj/user/Setting.vue | 48 +
src/hoj-vue/src/views/oj/user/UserHome.vue | 506 +
src/hoj-vue/vue.config.js | 119 +
src/judger/README.md | 1 +
src/judger/SandBox-v1.5.1 | Bin 0 -> 14360576 bytes
src/sqlAndsetting/README.md | 1 +
src/sqlAndsetting/hoj-update.sql | 922 +
src/sqlAndsetting/hoj.sql | 1156 +
src/sqlAndsetting/nacos.sql | 222 +
877 files changed, 138706 insertions(+)
create mode 100644 src/hoj-springboot/.gitignore
create mode 100644 src/hoj-springboot/DataBackup/pom.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminDiscussionController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminGroupProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTagController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingCategoryController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminUserController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AnnouncementController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/ConfigController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/DashboardController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/SwitchController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ContestFileController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImageController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportFpsProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportQDUOJProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/MarkDownFileController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ProblemFileController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/TestCaseController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/UserFileController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupAnnouncementController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupContestController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupDiscussionController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupMemberController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupRankController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupTrainingController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/AdminNoticeController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/NoticeController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/UserMessageController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommentController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommonController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestAdminController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestScoreboardController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/DiscussionController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/HomeController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/PassportController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ProblemController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/RankController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/TrainingController.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageContext.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/AtCoderProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemContext.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/AnnouncementEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/FileEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/AnnouncementEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestAnnouncementEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestExplanationEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestPrintEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestProblemEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRecordEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRegisterEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestScoreEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestAnnouncementEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestExplanationEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestPrintEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestProblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRegisterEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestScoreEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentLikeEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionLikeEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionReportEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/ReplyEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentLikeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionLikeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionReportEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupAnnouncementEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupContestEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupDiscussionEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupMemberEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupProblemEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupTrainingEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupContestEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupDiscussionEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupMemberEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupProblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeCaseEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeServerEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/RemoteJudgeAccountEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeCaseEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeServerEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/RemoteJudgeAccountEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/AdminSysNoticeEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/MsgRemindEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/UserSysNoticeEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/AdminSysNoticeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/MsgRemindEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/UserSysNoticeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CategoryEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CodeTemplateEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/LanguageEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCaseEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCountEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemLanguageEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemTagEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagClassificationEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CategoryEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CodeTemplateEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/LanguageEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCaseEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCountServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemLanguageEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemTagEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagClassificationEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/MappingTrainingCategoryEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingCategoryEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingProblemEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRecordEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRegisterEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/MappingTrainingCategoryEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingCategoryEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRecordEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRegisterEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/AuthEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleAuthEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/SessionEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserAcproblemEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserInfoEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRecordEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRoleEntityService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/AuthEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleAuthEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/SessionEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserAcproblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserInfoEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRecordEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRoleEntityServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/interceptor/AccessInterceptor.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/AbstractReceiver.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeDispatcher.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestAnnouncementManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminGroupProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/RemoteProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/DashboardManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportFpsProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/UserFileManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupRankManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AdminSysNoticeMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AnnouncementMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AuthMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CategoryMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CodeTemplateMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentLikeMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestAnnouncementMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestExplanationMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestPrintMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestProblemMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRegisterMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestScoreMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionLikeMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionReportMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/FileMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupAnnouncementMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupContestMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupDiscussionMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMemberMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupProblemMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupTrainingMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/LanguageMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MappingTrainingCategoryMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MsgRemindMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemLanguageMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemTagMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ReplyMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleAuthMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/SessionMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagClassificationMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingCategoryMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingProblemMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRecordMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRegisterMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserInfoMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRoleMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserSysNoticeMapper.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AdminSysNoticeMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AnnouncementMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/CommentMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestExplanationMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestProblemMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRecordMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRegisterMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestScoreMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionReportMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupAnnouncementMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupContestMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupDiscussionMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMemberMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupProblemMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupTrainingMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/MsgRemindMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemCountMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ReplyMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleAuthMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/SessionMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TagMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingCategoryMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingProblemMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingRecordMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserAcproblemMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserInfoMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRecordMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRoleMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserSysNoticeMapper.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/EmailRuleBo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AdminEditUserDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AnnouncementDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ApplyResetPasswordDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeEmailDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeGroupProblemProgressDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangePasswordDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckACDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckUsernameOrEmailDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestPrintDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestProblemDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestRankDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/DBAndRedisConfigDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/EmailConfigDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/LoginDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/PidListDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ProblemDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/QDOJProblemDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterContestDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterTrainingDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ReplyDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ResetPasswordDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitIdListDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitJudgeDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SwitchConfigDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestEmailDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingProblemDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/UserReadContestAnnouncementDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/WebConfigDto.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMContestRankVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMRankVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AccessVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminContestVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminSysNoticeVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AnnouncementVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CaptchaVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ChangeAccountVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CheckUsernameOrEmailVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentListVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ConfigVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestOutsideInfo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestProblemVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRecordVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRegisterCountVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionReportVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ExcelUserVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupMemberVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ImportProblemVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/JudgeVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIContestRankVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIRankVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemCountVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemInfoVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemTagVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RandomProblemVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RegisterCodeVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ReplyVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RoleAuthsVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SubmissionInfoVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SysMsgVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TestJudgeVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRankVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRecordVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserCalendarHeatmapVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserHomeVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserInfoVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserMsgVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserRolesVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserUnreadMsgCountVo.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/AdminAccountService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/AdminAnnouncementService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestAnnouncementService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/AdminDiscussionService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/impl/AdminDiscussionServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminGroupProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminGroupProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/RejudgeService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/ConfigService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/DashboardService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/ConfigServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/DashboardServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/AdminTagService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/impl/AdminTagServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingCategoryService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingCategoryServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/AdminUserService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/impl/AdminUserServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ContestFileService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImageService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportFpsProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportQDUOJProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/MarkDownFileService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ProblemFileService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/TestCaseService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/UserFileService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ContestFileServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportFpsProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportQDUOJProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ProblemFileServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/UserFileServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupRankService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/GroupAnnouncementService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestAnnouncementService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/GroupDiscussionService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/GroupMemberService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/GroupProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/AdminNoticeService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/NoticeService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/UserMessageService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/AdminNoticeServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/NoticeServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/UserMessageServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/AccountService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommentService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommonService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestAdminService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestScoreboardService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/DiscussionService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/HomeService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/JudgeService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/PassportService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ProblemService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/RankService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/TrainingService.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommonServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestAdminServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/HomeServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/RankServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountProfile.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountRealm.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtFilter.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtToken.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/CodeForcesUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ConfigUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JwtUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ServiceContextUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ShiroUtils.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/AccessValidator.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/TrainingValidator.java
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/application-dev.yml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/application-prod.yml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/application.yml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/banner.txt
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/bootstrap.yml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/email-rule.yml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/logback-spring.xml
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_registerCode.html
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_resetPassword.html
create mode 100644 src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_testEmail.html
create mode 100644 src/hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java
create mode 100644 src/hoj-springboot/JudgeServer/pom.xml
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/JudgeServerApplication.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/ResultStatus.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/CompileError.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/RuntimeError.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SubmitError.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SystemError.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/DruidConfiguration.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/NacosConfig.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/JudgeController.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/SystemConfigController.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestRecordEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeCaseEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeServerEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCaseEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCountEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/RemoteJudgeAccountEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserAcproblemEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserRecordEntityService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestRecordEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeCaseEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeServerEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCaseEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/RemoteJudgeAccountEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserAcproblemEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeDTO.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeGlobalDTO.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/SandBoxRes.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeCaseMapper.xml
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeContext.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeDTO.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeRes.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/GYMJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/POJJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeFactory.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeStrategy.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/JudgeService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/RemoteJudgeService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/SystemConfigService.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/CodeForcesUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/ThreadPoolUtils.java
create mode 100644 src/hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js
create mode 100644 src/hoj-springboot/JudgeServer/src/main/resources/application.yml
create mode 100644 src/hoj-springboot/JudgeServer/src/main/resources/banner.txt
create mode 100644 src/hoj-springboot/JudgeServer/src/main/resources/bootstrap.yml
create mode 100644 src/hoj-springboot/JudgeServer/src/main/resources/logback-spring.xml
create mode 100644 src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/JudgeServerApplicationTests.java
create mode 100644 src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java
create mode 100644 src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudgeTest.java
create mode 100644 src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/test.html
create mode 100644 src/hoj-springboot/api/pom.xml
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/CompileDTO.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeReq.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeRes.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/ToJudgeDTO.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/Announcement.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/File.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/Contest.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestAnnouncement.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestExplanation.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestPrint.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestProblem.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRecord.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRegister.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestScore.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Comment.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/CommentLike.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Discussion.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionLike.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionReport.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Reply.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/Group.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/GroupMember.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeCase.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeServer.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/RemoteJudgeAccount.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/AdminSysNotice.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/MsgRemind.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/UserSysNotice.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Category.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/CodeTemplate.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Language.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Problem.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCase.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCount.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemLanguage.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemTag.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Tag.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/TagClassification.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/MappingTrainingCategory.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/Training.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingCategory.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingProblem.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRecord.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRegister.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Auth.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Role.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/RoleAuth.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Session.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserAcproblem.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserInfo.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRecord.java
create mode 100644 src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRole.java
create mode 100644 src/hoj-springboot/pom.xml
create mode 100644 src/hoj-vue/.gitignore
create mode 100644 src/hoj-vue/README.md
create mode 100644 src/hoj-vue/babel.config.js
create mode 100644 src/hoj-vue/package-lock.json
create mode 100644 src/hoj-vue/package.json
create mode 100644 src/hoj-vue/public/favicon.ico
create mode 100644 src/hoj-vue/public/index.html
create mode 100644 src/hoj-vue/src/App.vue
create mode 100644 src/hoj-vue/src/assets/acm.jpg
create mode 100644 src/hoj-vue/src/assets/atcoder-logo.png
create mode 100644 src/hoj-vue/src/assets/backstage.png
create mode 100644 src/hoj-vue/src/assets/codeforces-logo.png
create mode 100644 src/hoj-vue/src/assets/default.jpg
create mode 100644 src/hoj-vue/src/assets/gym-logo.png
create mode 100644 src/hoj-vue/src/assets/hdu-logo.png
create mode 100644 src/hoj-vue/src/assets/home1.jfif
create mode 100644 src/hoj-vue/src/assets/home2.jpeg
create mode 100644 src/hoj-vue/src/assets/icon.png
create mode 100644 src/hoj-vue/src/assets/logo.png
create mode 100644 src/hoj-vue/src/assets/oi.jpg
create mode 100644 src/hoj-vue/src/assets/poj-logo.png
create mode 100644 src/hoj-vue/src/assets/spoj-logo.png
create mode 100644 src/hoj-vue/src/common/api.js
create mode 100644 src/hoj-vue/src/common/codeblock.js
create mode 100644 src/hoj-vue/src/common/constants.js
create mode 100644 src/hoj-vue/src/common/filters.js
create mode 100644 src/hoj-vue/src/common/highlight.js
create mode 100644 src/hoj-vue/src/common/katex.js
create mode 100644 src/hoj-vue/src/common/logo.js
create mode 100644 src/hoj-vue/src/common/message.js
create mode 100644 src/hoj-vue/src/common/storage.js
create mode 100644 src/hoj-vue/src/common/time.js
create mode 100644 src/hoj-vue/src/common/utils.js
create mode 100644 src/hoj-vue/src/components/admin/Accordion.vue
create mode 100644 src/hoj-vue/src/components/admin/AddExtraFile.vue
create mode 100644 src/hoj-vue/src/components/admin/AddPublicProblem.vue
create mode 100644 src/hoj-vue/src/components/admin/CodeMirror.vue
create mode 100644 src/hoj-vue/src/components/admin/Editor.vue
create mode 100644 src/hoj-vue/src/components/admin/KatexEditor.vue
create mode 100644 src/hoj-vue/src/components/admin/RemoteJudgeAccount.vue
create mode 100644 src/hoj-vue/src/components/admin/infoCard.vue
create mode 100644 src/hoj-vue/src/components/oj/comment/comment.vue
create mode 100644 src/hoj-vue/src/components/oj/comment/emoji.json
create mode 100644 src/hoj-vue/src/components/oj/common/Announcements.vue
create mode 100644 src/hoj-vue/src/components/oj/common/CodeMirror.vue
create mode 100644 src/hoj-vue/src/components/oj/common/Highlight.vue
create mode 100644 src/hoj-vue/src/components/oj/common/Login.vue
create mode 100644 src/hoj-vue/src/components/oj/common/Marquee.vue
create mode 100644 src/hoj-vue/src/components/oj/common/NavBar.vue
create mode 100644 src/hoj-vue/src/components/oj/common/Pagination.vue
create mode 100644 src/hoj-vue/src/components/oj/common/Register.vue
create mode 100644 src/hoj-vue/src/components/oj/common/ResetPassword.vue
create mode 100644 src/hoj-vue/src/components/oj/group/AddGroupProblem.vue
create mode 100644 src/hoj-vue/src/components/oj/group/AddPublicProblem.vue
create mode 100644 src/hoj-vue/src/components/oj/group/Announcement.vue
create mode 100644 src/hoj-vue/src/components/oj/group/AnnouncementList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/Contest.vue
create mode 100644 src/hoj-vue/src/components/oj/group/ContestList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/DiscussionList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/MemberList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/Problem.vue
create mode 100644 src/hoj-vue/src/components/oj/group/ProblemList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/Training.vue
create mode 100644 src/hoj-vue/src/components/oj/group/TrainingList.vue
create mode 100644 src/hoj-vue/src/components/oj/group/TrainingProblemList.vue
create mode 100644 src/hoj-vue/src/components/oj/msg/msgSvg.vue
create mode 100644 src/hoj-vue/src/components/oj/setting/Account.vue
create mode 100644 src/hoj-vue/src/components/oj/setting/UserInfo.vue
create mode 100644 src/hoj-vue/src/i18n/admin/en-US.js
create mode 100644 src/hoj-vue/src/i18n/admin/zh-CN.js
create mode 100644 src/hoj-vue/src/i18n/index.js
create mode 100644 src/hoj-vue/src/i18n/oj/en-US.js
create mode 100644 src/hoj-vue/src/i18n/oj/zh-CN.js
create mode 100644 src/hoj-vue/src/main.js
create mode 100644 src/hoj-vue/src/router/adminRoutes.js
create mode 100644 src/hoj-vue/src/router/index.js
create mode 100644 src/hoj-vue/src/router/ojRoutes.js
create mode 100644 src/hoj-vue/src/store/contest.js
create mode 100644 src/hoj-vue/src/store/group.js
create mode 100644 src/hoj-vue/src/store/index.js
create mode 100644 src/hoj-vue/src/store/training.js
create mode 100644 src/hoj-vue/src/store/user.js
create mode 100644 src/hoj-vue/src/views/404.vue
create mode 100644 src/hoj-vue/src/views/admin/Dashboard.vue
create mode 100644 src/hoj-vue/src/views/admin/Home.vue
create mode 100644 src/hoj-vue/src/views/admin/Login.vue
create mode 100644 src/hoj-vue/src/views/admin/contest/Contest.vue
create mode 100644 src/hoj-vue/src/views/admin/contest/ContestList.vue
create mode 100644 src/hoj-vue/src/views/admin/discussion/Discussion.vue
create mode 100644 src/hoj-vue/src/views/admin/general/Announcement.vue
create mode 100644 src/hoj-vue/src/views/admin/general/SysNotice.vue
create mode 100644 src/hoj-vue/src/views/admin/general/SysSwitch.vue
create mode 100644 src/hoj-vue/src/views/admin/general/SystemConfig.vue
create mode 100644 src/hoj-vue/src/views/admin/general/User.vue
create mode 100644 src/hoj-vue/src/views/admin/problem/GroupProblemList.vue
create mode 100644 src/hoj-vue/src/views/admin/problem/ImportAndExport.vue
create mode 100644 src/hoj-vue/src/views/admin/problem/Problem.vue
create mode 100644 src/hoj-vue/src/views/admin/problem/ProblemList.vue
create mode 100644 src/hoj-vue/src/views/admin/problem/Tag.vue
create mode 100644 src/hoj-vue/src/views/admin/training/Category.vue
create mode 100644 src/hoj-vue/src/views/admin/training/Training.vue
create mode 100644 src/hoj-vue/src/views/admin/training/TrainingList.vue
create mode 100644 src/hoj-vue/src/views/admin/training/TrainingProblemList.vue
create mode 100644 src/hoj-vue/src/views/oj/Home.vue
create mode 100644 src/hoj-vue/src/views/oj/about/Developer.vue
create mode 100644 src/hoj-vue/src/views/oj/about/Introduction.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/ContestDetails.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/ContestList.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ACMContestRank.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestComment.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestPrint.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestProblemList.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestRank.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/ContestRejudgeAdmin.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/OIContestRank.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/children/contestRankMixin.js
create mode 100644 src/hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue
create mode 100644 src/hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js
create mode 100644 src/hoj-vue/src/views/oj/discussion/discussion.vue
create mode 100644 src/hoj-vue/src/views/oj/discussion/discussionList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/GroupDetails.vue
create mode 100644 src/hoj-vue/src/views/oj/group/GroupList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupAnnouncementList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupContestList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupMemberList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupProblemList.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupRank.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupSetting.vue
create mode 100644 src/hoj-vue/src/views/oj/group/children/GroupTrainingList.vue
create mode 100644 src/hoj-vue/src/views/oj/message/SysMsg.vue
create mode 100644 src/hoj-vue/src/views/oj/message/UserMsg.vue
create mode 100644 src/hoj-vue/src/views/oj/message/message.vue
create mode 100644 src/hoj-vue/src/views/oj/problem/Problem.vue
create mode 100644 src/hoj-vue/src/views/oj/problem/ProblemList.vue
create mode 100644 src/hoj-vue/src/views/oj/problem/chartData.js
create mode 100644 src/hoj-vue/src/views/oj/rank/ACMRank.vue
create mode 100644 src/hoj-vue/src/views/oj/rank/OIRank.vue
create mode 100644 src/hoj-vue/src/views/oj/status/SubmissionDetails.vue
create mode 100644 src/hoj-vue/src/views/oj/status/SubmissionList.vue
create mode 100644 src/hoj-vue/src/views/oj/training/TrainingDetails.vue
create mode 100644 src/hoj-vue/src/views/oj/training/TrainingList.vue
create mode 100644 src/hoj-vue/src/views/oj/training/TrainingProblemList.vue
create mode 100644 src/hoj-vue/src/views/oj/training/TrainingRank.vue
create mode 100644 src/hoj-vue/src/views/oj/user/Logout.vue
create mode 100644 src/hoj-vue/src/views/oj/user/SetNewPassword.vue
create mode 100644 src/hoj-vue/src/views/oj/user/Setting.vue
create mode 100644 src/hoj-vue/src/views/oj/user/UserHome.vue
create mode 100644 src/hoj-vue/vue.config.js
create mode 100644 src/judger/README.md
create mode 100644 src/judger/SandBox-v1.5.1
create mode 100644 src/sqlAndsetting/README.md
create mode 100644 src/sqlAndsetting/hoj-update.sql
create mode 100644 src/sqlAndsetting/hoj.sql
create mode 100644 src/sqlAndsetting/nacos.sql
diff --git a/src/hoj-springboot/.gitignore b/src/hoj-springboot/.gitignore
new file mode 100644
index 0000000..24cbb6d
--- /dev/null
+++ b/src/hoj-springboot/.gitignore
@@ -0,0 +1,36 @@
+*.classpath
+
+# Package Files
+*.jar
+*.war
+*.ear
+*.log
+*.iml
+
+.DS_Store
+node_modules
+dist/
+target/
+out/
+.idea/
+.classpath
+.project
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/src/hoj-springboot/DataBackup/pom.xml b/src/hoj-springboot/DataBackup/pom.xml
new file mode 100644
index 0000000..1a0f0a4
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/pom.xml
@@ -0,0 +1,208 @@
+
+
+
+ hoj-springboot
+ top.hcode
+ 1.0-SNAPSHOT
+
+ 4.0.0
+ DataBackup
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ top.hcode.hoj.DataBackupApplication
+ ZIP
+
+
+
+
+ repackage
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 8
+ 8
+
+
+
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+
+
+
+ top.hcode
+ api
+ 1.0-SNAPSHOT
+
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+
+ org.springframework.retry
+ spring-retry
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+ com.alibaba.nacos
+ nacos-client
+
+
+
+
+ com.alibaba.nacos
+ nacos-client
+ 1.4.2
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ com.alibaba
+ druid
+
+
+ com.alibaba
+ easyexcel
+ 2.2.7
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ org.crazycake
+ shiro-redis-spring-boot-starter
+
+
+ org.crazycake
+ shiro-redis
+
+
+
+
+ org.crazycake
+ shiro-redis
+ 3.3.1
+
+
+ mysql
+ mysql-connector-java
+
+
+
+ cn.hutool
+ hutool-all
+ 5.7.22
+
+
+
+ com.github.oshi
+ oshi-core
+ 5.6.1
+
+
+
+ com.vdurmont
+ emoji-java
+ 5.1.1
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ io.lettuce
+ lettuce-core
+
+
+
+
+
+
+ io.jsonwebtoken
+ jjwt
+ 0.9.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+
+ org.jsoup
+ jsoup
+ 1.13.1
+
+
+
+
+
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java b/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java
new file mode 100644
index 0000000..663da0b
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java
@@ -0,0 +1,2118 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by Fernflower decompiler)
+//
+
+package com.alibaba.druid.pool;
+
+import com.alibaba.druid.DruidRuntimeException;
+import com.alibaba.druid.filter.Filter;
+import com.alibaba.druid.filter.FilterChainImpl;
+import com.alibaba.druid.filter.FilterManager;
+import com.alibaba.druid.pool.vendor.NullExceptionSorter;
+import com.alibaba.druid.proxy.jdbc.DataSourceProxy;
+import com.alibaba.druid.proxy.jdbc.TransactionInfo;
+import com.alibaba.druid.stat.JdbcDataSourceStat;
+import com.alibaba.druid.stat.JdbcSqlStat;
+import com.alibaba.druid.stat.JdbcStatManager;
+import com.alibaba.druid.support.logging.Log;
+import com.alibaba.druid.support.logging.LogFactory;
+import com.alibaba.druid.util.DruidPasswordCallback;
+import com.alibaba.druid.util.Histogram;
+import com.alibaba.druid.util.JdbcUtils;
+import com.alibaba.druid.util.MySqlUtils;
+import com.alibaba.druid.util.StringUtils;
+import com.alibaba.druid.util.Utils;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.logging.Logger;
+import javax.management.JMException;
+import javax.management.ObjectName;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.sql.DataSource;
+
+public abstract class DruidAbstractDataSource extends WrapperAdapter implements DruidAbstractDataSourceMBean, DataSource, DataSourceProxy, Serializable {
+ private static final long serialVersionUID = 1L;
+ private static final Log LOG = LogFactory.getLog(DruidAbstractDataSource.class);
+ public static final int DEFAULT_INITIAL_SIZE = 0;
+ public static final int DEFAULT_MAX_ACTIVE_SIZE = 8;
+ public static final int DEFAULT_MAX_IDLE = 8;
+ public static final int DEFAULT_MIN_IDLE = 0;
+ public static final int DEFAULT_MAX_WAIT = -1;
+ public static final String DEFAULT_VALIDATION_QUERY = null;
+ public static final boolean DEFAULT_TEST_ON_BORROW = false;
+ public static final boolean DEFAULT_TEST_ON_RETURN = false;
+ public static final boolean DEFAULT_WHILE_IDLE = true;
+ public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = 60000L;
+ public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS = 500L;
+ public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3;
+ public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1800000L;
+ public static final long DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS = 25200000L;
+ public static final long DEFAULT_PHY_TIMEOUT_MILLIS = -1L;
+ protected volatile boolean defaultAutoCommit = true;
+ protected volatile Boolean defaultReadOnly;
+ protected volatile Integer defaultTransactionIsolation;
+ protected volatile String defaultCatalog = null;
+ protected String name;
+ protected volatile String username;
+ protected volatile String password;
+ protected volatile String jdbcUrl;
+ protected volatile String driverClass;
+ protected volatile ClassLoader driverClassLoader;
+ protected volatile Properties connectProperties = new Properties();
+ protected volatile PasswordCallback passwordCallback;
+ protected volatile NameCallback userCallback;
+ protected volatile int initialSize = 0;
+ protected volatile int maxActive = 8;
+ protected volatile int minIdle = 0;
+ protected volatile int maxIdle = 8;
+ protected volatile long maxWait = -1L;
+ protected int notFullTimeoutRetryCount = 0;
+ protected volatile String validationQuery;
+ protected volatile int validationQueryTimeout;
+ protected volatile boolean testOnBorrow;
+ protected volatile boolean testOnReturn;
+ protected volatile boolean testWhileIdle;
+ protected volatile boolean poolPreparedStatements;
+ protected volatile boolean sharePreparedStatements;
+ protected volatile int maxPoolPreparedStatementPerConnectionSize;
+ protected volatile boolean inited;
+ protected volatile boolean initExceptionThrow;
+ protected PrintWriter logWriter;
+ protected List filters;
+ private boolean clearFiltersEnable;
+ protected volatile ExceptionSorter exceptionSorter;
+ protected Driver driver;
+ protected volatile int queryTimeout;
+ protected volatile int transactionQueryTimeout;
+ protected long createTimespan;
+ protected volatile int maxWaitThreadCount;
+ protected volatile boolean accessToUnderlyingConnectionAllowed;
+ protected volatile long timeBetweenEvictionRunsMillis;
+ protected volatile int numTestsPerEvictionRun;
+ protected volatile long minEvictableIdleTimeMillis;
+ protected volatile long maxEvictableIdleTimeMillis;
+ protected volatile long keepAliveBetweenTimeMillis;
+ protected volatile long phyTimeoutMillis;
+ protected volatile long phyMaxUseCount;
+ protected volatile boolean removeAbandoned;
+ protected volatile long removeAbandonedTimeoutMillis;
+ protected volatile boolean logAbandoned;
+ protected volatile int maxOpenPreparedStatements;
+ protected volatile List connectionInitSqls;
+ protected volatile String dbType;
+ protected volatile long timeBetweenConnectErrorMillis;
+ protected volatile ValidConnectionChecker validConnectionChecker;
+ protected final Map activeConnections;
+ protected static final Object PRESENT = new Object();
+ protected long id;
+ protected int connectionErrorRetryAttempts;
+ protected boolean breakAfterAcquireFailure;
+ protected long transactionThresholdMillis;
+ protected final Date createdTime;
+ protected Date initedTime;
+ protected volatile long errorCount;
+ protected volatile long dupCloseCount;
+ protected volatile long startTransactionCount;
+ protected volatile long commitCount;
+ protected volatile long rollbackCount;
+ protected volatile long cachedPreparedStatementHitCount;
+ protected volatile long preparedStatementCount;
+ protected volatile long closedPreparedStatementCount;
+ protected volatile long cachedPreparedStatementCount;
+ protected volatile long cachedPreparedStatementDeleteCount;
+ protected volatile long cachedPreparedStatementMissCount;
+ static final AtomicLongFieldUpdater errorCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "errorCount");
+ static final AtomicLongFieldUpdater dupCloseCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "dupCloseCount");
+ static final AtomicLongFieldUpdater startTransactionCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "startTransactionCount");
+ static final AtomicLongFieldUpdater commitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "commitCount");
+ static final AtomicLongFieldUpdater rollbackCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "rollbackCount");
+ static final AtomicLongFieldUpdater cachedPreparedStatementHitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementHitCount");
+ static final AtomicLongFieldUpdater preparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "preparedStatementCount");
+ static final AtomicLongFieldUpdater closedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "closedPreparedStatementCount");
+ static final AtomicLongFieldUpdater cachedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementCount");
+ static final AtomicLongFieldUpdater cachedPreparedStatementDeleteCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementDeleteCount");
+ static final AtomicLongFieldUpdater cachedPreparedStatementMissCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementMissCount");
+ protected final Histogram transactionHistogram;
+ private boolean dupCloseLogEnable;
+ private ObjectName objectName;
+ protected volatile long executeCount;
+ protected volatile long executeQueryCount;
+ protected volatile long executeUpdateCount;
+ protected volatile long executeBatchCount;
+ static final AtomicLongFieldUpdater executeQueryCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeQueryCount");
+ static final AtomicLongFieldUpdater executeUpdateCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeUpdateCount");
+ static final AtomicLongFieldUpdater executeBatchCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeBatchCount");
+ static final AtomicLongFieldUpdater executeCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeCount");
+ protected volatile Throwable createError;
+ protected volatile Throwable lastError;
+ protected volatile long lastErrorTimeMillis;
+ protected volatile Throwable lastCreateError;
+ protected volatile long lastCreateErrorTimeMillis;
+ protected volatile long lastCreateStartTimeMillis;
+ protected boolean isOracle;
+ protected boolean isMySql;
+ protected boolean useOracleImplicitCache;
+ protected ReentrantLock lock;
+ protected Condition notEmpty;
+ protected Condition empty;
+ protected ReentrantLock activeConnectionLock;
+ protected volatile int createErrorCount;
+ protected volatile int creatingCount;
+ protected volatile int directCreateCount;
+ protected volatile long createCount;
+ protected volatile long destroyCount;
+ protected volatile long createStartNanos;
+ static final AtomicIntegerFieldUpdater createErrorCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createErrorCount");
+ static final AtomicIntegerFieldUpdater creatingCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "creatingCount");
+ static final AtomicIntegerFieldUpdater directCreateCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "directCreateCount");
+ static final AtomicLongFieldUpdater createCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createCount");
+ static final AtomicLongFieldUpdater destroyCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "destroyCount");
+ static final AtomicLongFieldUpdater createStartNanosUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createStartNanos");
+ private Boolean useUnfairLock;
+ private boolean useLocalSessionState;
+ protected long timeBetweenLogStatsMillis;
+ protected DruidDataSourceStatLogger statLogger;
+ private boolean asyncCloseConnectionEnable;
+ protected int maxCreateTaskCount;
+ protected boolean failFast;
+ protected volatile int failContinuous;
+ protected volatile long failContinuousTimeMillis;
+ protected ScheduledExecutorService destroyScheduler;
+ protected ScheduledExecutorService createScheduler;
+ static final AtomicLongFieldUpdater failContinuousTimeMillisUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuousTimeMillis");
+ static final AtomicIntegerFieldUpdater failContinuousUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuous");
+ protected boolean initVariants;
+ protected boolean initGlobalVariants;
+ protected volatile boolean onFatalError;
+ protected volatile int onFatalErrorMaxActive;
+ protected volatile int fatalErrorCount;
+ protected volatile int fatalErrorCountLastShrink;
+ protected volatile long lastFatalErrorTimeMillis;
+ protected volatile String lastFatalErrorSql;
+ protected volatile Throwable lastFatalError;
+ protected volatile long connectionIdSeed;
+ protected volatile long statementIdSeed;
+ protected volatile long resultSetIdSeed;
+ protected volatile long transactionIdSeed;
+ protected volatile long metaDataIdSeed;
+ static final AtomicLongFieldUpdater connectionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "connectionIdSeed");
+ static final AtomicLongFieldUpdater statementIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "statementIdSeed");
+ static final AtomicLongFieldUpdater resultSetIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "resultSetIdSeed");
+ static final AtomicLongFieldUpdater transactionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "transactionIdSeed");
+ static final AtomicLongFieldUpdater metaDataIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "metaDataIdSeed");
+
+ public DruidAbstractDataSource(boolean lockFair) {
+ this.validationQuery = DEFAULT_VALIDATION_QUERY;
+ this.validationQueryTimeout = -1;
+ this.testOnBorrow = false;
+ this.testOnReturn = false;
+ this.testWhileIdle = true;
+ this.poolPreparedStatements = false;
+ this.sharePreparedStatements = false;
+ this.maxPoolPreparedStatementPerConnectionSize = 10;
+ this.inited = false;
+ this.initExceptionThrow = true;
+ this.logWriter = new PrintWriter(System.out);
+ this.filters = new CopyOnWriteArrayList();
+ this.clearFiltersEnable = true;
+ this.exceptionSorter = null;
+ this.maxWaitThreadCount = -1;
+ this.accessToUnderlyingConnectionAllowed = true;
+ this.timeBetweenEvictionRunsMillis = 60000L;
+ this.numTestsPerEvictionRun = 3;
+ this.minEvictableIdleTimeMillis = 1800000L;
+ this.maxEvictableIdleTimeMillis = 25200000L;
+ this.keepAliveBetweenTimeMillis = 120000L;
+ this.phyTimeoutMillis = -1L;
+ this.phyMaxUseCount = -1L;
+ this.removeAbandonedTimeoutMillis = 300000L;
+ this.maxOpenPreparedStatements = -1;
+ this.timeBetweenConnectErrorMillis = 500L;
+ this.validConnectionChecker = null;
+ this.activeConnections = new IdentityHashMap();
+ this.connectionErrorRetryAttempts = 1;
+ this.breakAfterAcquireFailure = false;
+ this.transactionThresholdMillis = 0L;
+ this.createdTime = new Date();
+ this.errorCount = 0L;
+ this.dupCloseCount = 0L;
+ this.startTransactionCount = 0L;
+ this.commitCount = 0L;
+ this.rollbackCount = 0L;
+ this.cachedPreparedStatementHitCount = 0L;
+ this.preparedStatementCount = 0L;
+ this.closedPreparedStatementCount = 0L;
+ this.cachedPreparedStatementCount = 0L;
+ this.cachedPreparedStatementDeleteCount = 0L;
+ this.cachedPreparedStatementMissCount = 0L;
+ this.transactionHistogram = new Histogram(new long[]{1L, 10L, 100L, 1000L, 10000L, 100000L});
+ this.dupCloseLogEnable = false;
+ this.executeCount = 0L;
+ this.executeQueryCount = 0L;
+ this.executeUpdateCount = 0L;
+ this.executeBatchCount = 0L;
+ this.isOracle = false;
+ this.isMySql = false;
+ this.useOracleImplicitCache = true;
+ this.activeConnectionLock = new ReentrantLock();
+ this.createErrorCount = 0;
+ this.creatingCount = 0;
+ this.directCreateCount = 0;
+ this.createCount = 0L;
+ this.destroyCount = 0L;
+ this.createStartNanos = 0L;
+ this.useUnfairLock = null;
+ this.useLocalSessionState = true;
+ this.statLogger = new DruidDataSourceStatLoggerImpl();
+ this.asyncCloseConnectionEnable = false;
+ this.maxCreateTaskCount = 3;
+ this.failFast = false;
+ this.failContinuous = 0;
+ this.failContinuousTimeMillis = 0L;
+ this.initVariants = false;
+ this.initGlobalVariants = false;
+ this.onFatalError = false;
+ this.onFatalErrorMaxActive = 0;
+ this.fatalErrorCount = 0;
+ this.fatalErrorCountLastShrink = 0;
+ this.lastFatalErrorTimeMillis = 0L;
+ this.lastFatalErrorSql = null;
+ this.lastFatalError = null;
+ this.connectionIdSeed = 10000L;
+ this.statementIdSeed = 20000L;
+ this.resultSetIdSeed = 50000L;
+ this.transactionIdSeed = 60000L;
+ this.metaDataIdSeed = 80000L;
+ this.lock = new ReentrantLock(lockFair);
+ this.notEmpty = this.lock.newCondition();
+ this.empty = this.lock.newCondition();
+ }
+
+ public boolean isUseLocalSessionState() {
+ return this.useLocalSessionState;
+ }
+
+ public void setUseLocalSessionState(boolean useLocalSessionState) {
+ this.useLocalSessionState = useLocalSessionState;
+ }
+
+ public DruidDataSourceStatLogger getStatLogger() {
+ return this.statLogger;
+ }
+
+ public void setStatLoggerClassName(String className) {
+ try {
+ Class> clazz = Class.forName(className);
+ DruidDataSourceStatLogger statLogger = (DruidDataSourceStatLogger)clazz.newInstance();
+ this.setStatLogger(statLogger);
+ } catch (Exception var4) {
+ throw new IllegalArgumentException(className, var4);
+ }
+ }
+
+ public void setStatLogger(DruidDataSourceStatLogger statLogger) {
+ this.statLogger = statLogger;
+ }
+
+ public long getTimeBetweenLogStatsMillis() {
+ return this.timeBetweenLogStatsMillis;
+ }
+
+ public void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis) {
+ this.timeBetweenLogStatsMillis = timeBetweenLogStatsMillis;
+ }
+
+ public boolean isOracle() {
+ return this.isOracle;
+ }
+
+ public void setOracle(boolean isOracle) {
+ if (this.inited) {
+ throw new IllegalStateException();
+ } else {
+ this.isOracle = isOracle;
+ }
+ }
+
+ public boolean isUseUnfairLock() {
+ return this.lock.isFair();
+ }
+
+ public void setUseUnfairLock(boolean useUnfairLock) {
+ if (this.lock.isFair() != !useUnfairLock) {
+ if (!this.inited) {
+ ReentrantLock lock = this.lock;
+ lock.lock();
+
+ try {
+ if (!this.inited) {
+ this.lock = new ReentrantLock(!useUnfairLock);
+ this.notEmpty = this.lock.newCondition();
+ this.empty = this.lock.newCondition();
+ this.useUnfairLock = useUnfairLock;
+ }
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ }
+ }
+
+ public boolean isUseOracleImplicitCache() {
+ return this.useOracleImplicitCache;
+ }
+
+ public void setUseOracleImplicitCache(boolean useOracleImplicitCache) {
+ if (this.useOracleImplicitCache != useOracleImplicitCache) {
+ this.useOracleImplicitCache = useOracleImplicitCache;
+ boolean isOracleDriver10 = this.isOracle() && this.driver != null && this.driver.getMajorVersion() == 10;
+ if (isOracleDriver10 && useOracleImplicitCache) {
+ this.getConnectProperties().setProperty("oracle.jdbc.FreeMemoryOnEnterImplicitCache", "true");
+ } else {
+ this.getConnectProperties().remove("oracle.jdbc.FreeMemoryOnEnterImplicitCache");
+ }
+ }
+
+ }
+
+ public Throwable getLastCreateError() {
+ return this.lastCreateError;
+ }
+
+ public Throwable getLastError() {
+ return this.lastError;
+ }
+
+ public long getLastErrorTimeMillis() {
+ return this.lastErrorTimeMillis;
+ }
+
+ public Date getLastErrorTime() {
+ return this.lastErrorTimeMillis <= 0L ? null : new Date(this.lastErrorTimeMillis);
+ }
+
+ public long getLastCreateErrorTimeMillis() {
+ return this.lastCreateErrorTimeMillis;
+ }
+
+ public Date getLastCreateErrorTime() {
+ return this.lastCreateErrorTimeMillis <= 0L ? null : new Date(this.lastCreateErrorTimeMillis);
+ }
+
+ public int getTransactionQueryTimeout() {
+ return this.transactionQueryTimeout <= 0 ? this.queryTimeout : this.transactionQueryTimeout;
+ }
+
+ public void setTransactionQueryTimeout(int transactionQueryTimeout) {
+ this.transactionQueryTimeout = transactionQueryTimeout;
+ }
+
+ public long getExecuteCount() {
+ return this.executeCount + this.executeQueryCount + this.executeUpdateCount + this.executeBatchCount;
+ }
+
+ public long getExecuteUpdateCount() {
+ return this.executeUpdateCount;
+ }
+
+ public long getExecuteQueryCount() {
+ return this.executeQueryCount;
+ }
+
+ public long getExecuteBatchCount() {
+ return this.executeBatchCount;
+ }
+
+ public long getAndResetExecuteCount() {
+ return executeCountUpdater.getAndSet(this, 0L) + executeQueryCountUpdater.getAndSet(this, 0L) + executeUpdateCountUpdater.getAndSet(this, 0L) + executeBatchCountUpdater.getAndSet(this, 0L);
+ }
+
+ public long getExecuteCount2() {
+ return this.executeCount;
+ }
+
+ public void incrementExecuteCount() {
+ executeCountUpdater.incrementAndGet(this);
+ }
+
+ public void incrementExecuteUpdateCount() {
+ ++this.executeUpdateCount;
+ }
+
+ public void incrementExecuteQueryCount() {
+ ++this.executeQueryCount;
+ }
+
+ public void incrementExecuteBatchCount() {
+ ++this.executeBatchCount;
+ }
+
+ public boolean isDupCloseLogEnable() {
+ return this.dupCloseLogEnable;
+ }
+
+ public void setDupCloseLogEnable(boolean dupCloseLogEnable) {
+ this.dupCloseLogEnable = dupCloseLogEnable;
+ }
+
+ public ObjectName getObjectName() {
+ return this.objectName;
+ }
+
+ public void setObjectName(ObjectName objectName) {
+ this.objectName = objectName;
+ }
+
+ public Histogram getTransactionHistogram() {
+ return this.transactionHistogram;
+ }
+
+ public void incrementCachedPreparedStatementCount() {
+ cachedPreparedStatementCountUpdater.incrementAndGet(this);
+ }
+
+ public void decrementCachedPreparedStatementCount() {
+ cachedPreparedStatementCountUpdater.decrementAndGet(this);
+ }
+
+ public void incrementCachedPreparedStatementDeleteCount() {
+ cachedPreparedStatementDeleteCountUpdater.incrementAndGet(this);
+ }
+
+ public void incrementCachedPreparedStatementMissCount() {
+ cachedPreparedStatementMissCountUpdater.incrementAndGet(this);
+ }
+
+ public long getCachedPreparedStatementMissCount() {
+ return this.cachedPreparedStatementMissCount;
+ }
+
+ public long getCachedPreparedStatementAccessCount() {
+ return this.cachedPreparedStatementMissCount + this.cachedPreparedStatementHitCount;
+ }
+
+ public long getCachedPreparedStatementDeleteCount() {
+ return this.cachedPreparedStatementDeleteCount;
+ }
+
+ public long getCachedPreparedStatementCount() {
+ return this.cachedPreparedStatementCount;
+ }
+
+ public void incrementClosedPreparedStatementCount() {
+ closedPreparedStatementCountUpdater.incrementAndGet(this);
+ }
+
+ public long getClosedPreparedStatementCount() {
+ return this.closedPreparedStatementCount;
+ }
+
+ public void incrementPreparedStatementCount() {
+ preparedStatementCountUpdater.incrementAndGet(this);
+ }
+
+ public long getPreparedStatementCount() {
+ return this.preparedStatementCount;
+ }
+
+ public void incrementCachedPreparedStatementHitCount() {
+ cachedPreparedStatementHitCountUpdater.incrementAndGet(this);
+ }
+
+ public long getCachedPreparedStatementHitCount() {
+ return this.cachedPreparedStatementHitCount;
+ }
+
+ public long getTransactionThresholdMillis() {
+ return this.transactionThresholdMillis;
+ }
+
+ public void setTransactionThresholdMillis(long transactionThresholdMillis) {
+ this.transactionThresholdMillis = transactionThresholdMillis;
+ }
+
+ public abstract void logTransaction(TransactionInfo var1);
+
+ public long[] getTransactionHistogramValues() {
+ return this.transactionHistogram.toArray();
+ }
+
+ public long[] getTransactionHistogramRanges() {
+ return this.transactionHistogram.getRanges();
+ }
+
+ public long getCommitCount() {
+ return this.commitCount;
+ }
+
+ public void incrementCommitCount() {
+ commitCountUpdater.incrementAndGet(this);
+ }
+
+ public long getRollbackCount() {
+ return this.rollbackCount;
+ }
+
+ public void incrementRollbackCount() {
+ rollbackCountUpdater.incrementAndGet(this);
+ }
+
+ public long getStartTransactionCount() {
+ return this.startTransactionCount;
+ }
+
+ public void incrementStartTransactionCount() {
+ startTransactionCountUpdater.incrementAndGet(this);
+ }
+
+ public boolean isBreakAfterAcquireFailure() {
+ return this.breakAfterAcquireFailure;
+ }
+
+ public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure) {
+ this.breakAfterAcquireFailure = breakAfterAcquireFailure;
+ }
+
+ public int getConnectionErrorRetryAttempts() {
+ return this.connectionErrorRetryAttempts;
+ }
+
+ public void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts) {
+ this.connectionErrorRetryAttempts = connectionErrorRetryAttempts;
+ }
+
+ public long getDupCloseCount() {
+ return this.dupCloseCount;
+ }
+
+ public int getMaxPoolPreparedStatementPerConnectionSize() {
+ return this.maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) {
+ if (maxPoolPreparedStatementPerConnectionSize > 0) {
+ this.poolPreparedStatements = true;
+ } else {
+ this.poolPreparedStatements = false;
+ }
+
+ this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public boolean isSharePreparedStatements() {
+ return this.sharePreparedStatements;
+ }
+
+ public void setSharePreparedStatements(boolean sharePreparedStatements) {
+ this.sharePreparedStatements = sharePreparedStatements;
+ }
+
+ public void incrementDupCloseCount() {
+ dupCloseCountUpdater.incrementAndGet(this);
+ }
+
+ public ValidConnectionChecker getValidConnectionChecker() {
+ return this.validConnectionChecker;
+ }
+
+ public void setValidConnectionChecker(ValidConnectionChecker validConnectionChecker) {
+ this.validConnectionChecker = validConnectionChecker;
+ }
+
+ public String getValidConnectionCheckerClassName() {
+ return this.validConnectionChecker == null ? null : this.validConnectionChecker.getClass().getName();
+ }
+
+ public void setValidConnectionCheckerClassName(String validConnectionCheckerClass) throws Exception {
+ Class> clazz = Utils.loadClass(validConnectionCheckerClass);
+ ValidConnectionChecker validConnectionChecker = null;
+ if (clazz != null) {
+ validConnectionChecker = (ValidConnectionChecker)clazz.newInstance();
+ this.validConnectionChecker = validConnectionChecker;
+ } else {
+ LOG.error("load validConnectionCheckerClass error : " + validConnectionCheckerClass);
+ }
+
+ }
+
+ public String getDbType() {
+ return this.dbType;
+ }
+
+ public void setDbType(String dbType) {
+ this.dbType = dbType;
+ }
+
+ public void addConnectionProperty(String name, String value) {
+ if (!StringUtils.equals(this.connectProperties.getProperty(name), value)) {
+ if (this.inited) {
+ throw new UnsupportedOperationException();
+ } else {
+ this.connectProperties.put(name, value);
+ }
+ }
+ }
+
+ public Collection getConnectionInitSqls() {
+ Collection result = this.connectionInitSqls;
+ return result == null ? Collections.emptyList() : result;
+ }
+
+ public void setConnectionInitSqls(Collection extends Object> connectionInitSqls) {
+ if (connectionInitSqls != null && connectionInitSqls.size() > 0) {
+ ArrayList newVal = null;
+ Iterator var3 = connectionInitSqls.iterator();
+
+ while(var3.hasNext()) {
+ Object o = var3.next();
+ if (o != null) {
+ String s = o.toString();
+ s = s.trim();
+ if (s.length() != 0) {
+ if (newVal == null) {
+ newVal = new ArrayList();
+ }
+
+ newVal.add(s);
+ }
+ }
+ }
+
+ this.connectionInitSqls = newVal;
+ } else {
+ this.connectionInitSqls = null;
+ }
+
+ }
+
+ public long getTimeBetweenConnectErrorMillis() {
+ return this.timeBetweenConnectErrorMillis;
+ }
+
+ public void setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis) {
+ this.timeBetweenConnectErrorMillis = timeBetweenConnectErrorMillis;
+ }
+
+ public int getMaxOpenPreparedStatements() {
+ return this.maxPoolPreparedStatementPerConnectionSize;
+ }
+
+ public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) {
+ this.setMaxPoolPreparedStatementPerConnectionSize(maxOpenPreparedStatements);
+ }
+
+ public boolean isLogAbandoned() {
+ return this.logAbandoned;
+ }
+
+ public void setLogAbandoned(boolean logAbandoned) {
+ this.logAbandoned = logAbandoned;
+ }
+
+ public int getRemoveAbandonedTimeout() {
+ return (int)(this.removeAbandonedTimeoutMillis / 1000L);
+ }
+
+ public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) {
+ this.removeAbandonedTimeoutMillis = (long)removeAbandonedTimeout * 1000L;
+ }
+
+ public void setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis) {
+ this.removeAbandonedTimeoutMillis = removeAbandonedTimeoutMillis;
+ }
+
+ public long getRemoveAbandonedTimeoutMillis() {
+ return this.removeAbandonedTimeoutMillis;
+ }
+
+ public boolean isRemoveAbandoned() {
+ return this.removeAbandoned;
+ }
+
+ public void setRemoveAbandoned(boolean removeAbandoned) {
+ this.removeAbandoned = removeAbandoned;
+ }
+
+ public long getMinEvictableIdleTimeMillis() {
+ return this.minEvictableIdleTimeMillis;
+ }
+
+ public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
+ if (minEvictableIdleTimeMillis < 30000L) {
+ LOG.error("minEvictableIdleTimeMillis should be greater than 30000");
+ }
+
+ this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+ }
+
+ public long getKeepAliveBetweenTimeMillis() {
+ return this.keepAliveBetweenTimeMillis;
+ }
+
+ public void setKeepAliveBetweenTimeMillis(long keepAliveBetweenTimeMillis) {
+ if (keepAliveBetweenTimeMillis < 30000L) {
+ LOG.error("keepAliveBetweenTimeMillis should be greater than 30000");
+ }
+
+ this.keepAliveBetweenTimeMillis = keepAliveBetweenTimeMillis;
+ }
+
+ public long getMaxEvictableIdleTimeMillis() {
+ return this.maxEvictableIdleTimeMillis;
+ }
+
+ public void setMaxEvictableIdleTimeMillis(long maxEvictableIdleTimeMillis) {
+ if (maxEvictableIdleTimeMillis < 30000L) {
+ LOG.error("maxEvictableIdleTimeMillis should be greater than 30000");
+ }
+
+ if (maxEvictableIdleTimeMillis < this.minEvictableIdleTimeMillis) {
+ throw new IllegalArgumentException("maxEvictableIdleTimeMillis must be grater than minEvictableIdleTimeMillis");
+ } else {
+ this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis;
+ }
+ }
+
+ public long getPhyTimeoutMillis() {
+ return this.phyTimeoutMillis;
+ }
+
+ public void setPhyTimeoutMillis(long phyTimeoutMillis) {
+ this.phyTimeoutMillis = phyTimeoutMillis;
+ }
+
+ public long getPhyMaxUseCount() {
+ return this.phyMaxUseCount;
+ }
+
+ public void setPhyMaxUseCount(long phyMaxUseCount) {
+ this.phyMaxUseCount = phyMaxUseCount;
+ }
+
+ public int getNumTestsPerEvictionRun() {
+ return this.numTestsPerEvictionRun;
+ }
+
+ /** @deprecated */
+ @Deprecated
+ public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
+ this.numTestsPerEvictionRun = numTestsPerEvictionRun;
+ }
+
+ public long getTimeBetweenEvictionRunsMillis() {
+ return this.timeBetweenEvictionRunsMillis;
+ }
+
+ public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
+ this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
+ }
+
+ public int getMaxWaitThreadCount() {
+ return this.maxWaitThreadCount;
+ }
+
+ public void setMaxWaitThreadCount(int maxWaithThreadCount) {
+ this.maxWaitThreadCount = maxWaithThreadCount;
+ }
+
+ public String getValidationQuery() {
+ return this.validationQuery;
+ }
+
+ public void setValidationQuery(String validationQuery) {
+ this.validationQuery = validationQuery;
+ }
+
+ public int getValidationQueryTimeout() {
+ return this.validationQueryTimeout;
+ }
+
+ public void setValidationQueryTimeout(int validationQueryTimeout) {
+ if (validationQueryTimeout < 0 && "sqlserver".equals(this.dbType)) {
+ LOG.error("validationQueryTimeout should be >= 0");
+ }
+
+ this.validationQueryTimeout = validationQueryTimeout;
+ }
+
+ public boolean isAccessToUnderlyingConnectionAllowed() {
+ return this.accessToUnderlyingConnectionAllowed;
+ }
+
+ public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed) {
+ this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed;
+ }
+
+ public boolean isTestOnBorrow() {
+ return this.testOnBorrow;
+ }
+
+ public void setTestOnBorrow(boolean testOnBorrow) {
+ this.testOnBorrow = testOnBorrow;
+ }
+
+ public boolean isTestOnReturn() {
+ return this.testOnReturn;
+ }
+
+ public void setTestOnReturn(boolean testOnReturn) {
+ this.testOnReturn = testOnReturn;
+ }
+
+ public boolean isTestWhileIdle() {
+ return this.testWhileIdle;
+ }
+
+ public void setTestWhileIdle(boolean testWhileIdle) {
+ this.testWhileIdle = testWhileIdle;
+ }
+
+ public boolean isDefaultAutoCommit() {
+ return this.defaultAutoCommit;
+ }
+
+ public void setDefaultAutoCommit(boolean defaultAutoCommit) {
+ this.defaultAutoCommit = defaultAutoCommit;
+ }
+
+ public Boolean getDefaultReadOnly() {
+ return this.defaultReadOnly;
+ }
+
+ public void setDefaultReadOnly(Boolean defaultReadOnly) {
+ this.defaultReadOnly = defaultReadOnly;
+ }
+
+ public Integer getDefaultTransactionIsolation() {
+ return this.defaultTransactionIsolation;
+ }
+
+ public void setDefaultTransactionIsolation(Integer defaultTransactionIsolation) {
+ this.defaultTransactionIsolation = defaultTransactionIsolation;
+ }
+
+ public String getDefaultCatalog() {
+ return this.defaultCatalog;
+ }
+
+ public void setDefaultCatalog(String defaultCatalog) {
+ this.defaultCatalog = defaultCatalog;
+ }
+
+ public PasswordCallback getPasswordCallback() {
+ return this.passwordCallback;
+ }
+
+ public void setPasswordCallback(PasswordCallback passwordCallback) {
+ this.passwordCallback = passwordCallback;
+ }
+
+ public void setPasswordCallbackClassName(String passwordCallbackClassName) throws Exception {
+ Class> clazz = Utils.loadClass(passwordCallbackClassName);
+ if (clazz != null) {
+ this.passwordCallback = (PasswordCallback)clazz.newInstance();
+ } else {
+ LOG.error("load passwordCallback error : " + passwordCallbackClassName);
+ this.passwordCallback = null;
+ }
+
+ }
+
+ public NameCallback getUserCallback() {
+ return this.userCallback;
+ }
+
+ public void setUserCallback(NameCallback userCallback) {
+ this.userCallback = userCallback;
+ }
+
+ public boolean isInitVariants() {
+ return this.initVariants;
+ }
+
+ public void setInitVariants(boolean initVariants) {
+ this.initVariants = initVariants;
+ }
+
+ public boolean isInitGlobalVariants() {
+ return this.initGlobalVariants;
+ }
+
+ public void setInitGlobalVariants(boolean initGlobalVariants) {
+ this.initGlobalVariants = initGlobalVariants;
+ }
+
+ public int getQueryTimeout() {
+ return this.queryTimeout;
+ }
+
+ public void setQueryTimeout(int seconds) {
+ this.queryTimeout = seconds;
+ }
+
+ public String getName() {
+ return this.name != null ? this.name : "DataSource-" + System.identityHashCode(this);
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean isPoolPreparedStatements() {
+ return this.poolPreparedStatements;
+ }
+
+ public abstract void setPoolPreparedStatements(boolean var1);
+
+ public long getMaxWait() {
+ return this.maxWait;
+ }
+
+ public void setMaxWait(long maxWaitMillis) {
+ if (maxWaitMillis != this.maxWait) {
+ if (maxWaitMillis > 0L && this.useUnfairLock == null && !this.inited) {
+ ReentrantLock lock = this.lock;
+ lock.lock();
+
+ try {
+ if (!this.inited && !lock.isFair()) {
+ this.lock = new ReentrantLock(true);
+ this.notEmpty = this.lock.newCondition();
+ this.empty = this.lock.newCondition();
+ }
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ if (this.inited) {
+ LOG.error("maxWait changed : " + this.maxWait + " -> " + maxWaitMillis);
+ }
+
+ this.maxWait = maxWaitMillis;
+ }
+ }
+
+ public int getNotFullTimeoutRetryCount() {
+ return this.notFullTimeoutRetryCount;
+ }
+
+ public void setNotFullTimeoutRetryCount(int notFullTimeoutRetryCount) {
+ this.notFullTimeoutRetryCount = notFullTimeoutRetryCount;
+ }
+
+ public int getMinIdle() {
+ return this.minIdle;
+ }
+
+ public void setMinIdle(int value) {
+ if (value != this.minIdle) {
+ if (this.inited && value > this.maxActive) {
+ throw new IllegalArgumentException("minIdle greater than maxActive, " + this.maxActive + " < " + this.minIdle);
+ } else if (this.minIdle < 0) {
+ throw new IllegalArgumentException("minIdle must > 0");
+ } else {
+ this.minIdle = value;
+ }
+ }
+ }
+
+ public int getMaxIdle() {
+ return this.maxIdle;
+ }
+
+ /** @deprecated */
+ @Deprecated
+ public void setMaxIdle(int maxIdle) {
+ LOG.error("maxIdle is deprecated");
+ this.maxIdle = maxIdle;
+ }
+
+ public int getInitialSize() {
+ return this.initialSize;
+ }
+
+ public void setInitialSize(int initialSize) {
+ if (this.initialSize != initialSize) {
+ if (this.inited) {
+ throw new UnsupportedOperationException();
+ } else {
+ this.initialSize = initialSize;
+ }
+ }
+ }
+
+ public long getCreateErrorCount() {
+ return (long)this.createErrorCount;
+ }
+
+ public int getMaxActive() {
+ return this.maxActive;
+ }
+
+ public abstract void setMaxActive(int var1);
+
+ public String getUsername() {
+ return this.username;
+ }
+
+ public void setUsername(String username) {
+ if (!StringUtils.equals(this.username, username)) {
+// if (this.inited) {
+// throw new UnsupportedOperationException();
+// } else {
+ this.username = username;
+// }
+ }
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public void setPassword(String password) {
+ if (!StringUtils.equals(this.password, password)) {
+ if (this.inited) {
+ LOG.info("password changed");
+ }
+
+ this.password = password;
+ }
+ }
+
+ public Properties getConnectProperties() {
+ return this.connectProperties;
+ }
+
+ public abstract void setConnectProperties(Properties var1);
+
+ public void setConnectionProperties(String connectionProperties) {
+ if (connectionProperties != null && connectionProperties.trim().length() != 0) {
+ String[] entries = connectionProperties.split(";");
+ Properties properties = new Properties();
+
+ for(int i = 0; i < entries.length; ++i) {
+ String entry = entries[i];
+ if (entry.length() > 0) {
+ int index = entry.indexOf(61);
+ if (index > 0) {
+ String name = entry.substring(0, index);
+ String value = entry.substring(index + 1);
+ properties.setProperty(name, value);
+ } else {
+ properties.setProperty(entry, "");
+ }
+ }
+ }
+
+ this.setConnectProperties(properties);
+ } else {
+ this.setConnectProperties((Properties)null);
+ }
+ }
+
+ public String getUrl() {
+ return this.jdbcUrl;
+ }
+
+ public String getRawJdbcUrl() {
+ return this.jdbcUrl;
+ }
+
+ public void setUrl(String jdbcUrl) {
+ if (!StringUtils.equals(this.jdbcUrl, jdbcUrl)) {
+// if (this.inited) {
+// throw new UnsupportedOperationException();
+// } else {
+ if (jdbcUrl != null) {
+ jdbcUrl = jdbcUrl.trim();
+ }
+
+ this.jdbcUrl = jdbcUrl;
+// }
+ }
+ }
+
+ public String getDriverClassName() {
+ return this.driverClass;
+ }
+
+ public void setDriverClassName(String driverClass) {
+ if (driverClass != null && driverClass.length() > 256) {
+ throw new IllegalArgumentException("driverClassName length > 256.");
+ } else {
+ if ("oracle.jdbc.driver.OracleDriver".equalsIgnoreCase(driverClass)) {
+ driverClass = "oracle.jdbc.OracleDriver";
+ LOG.warn("oracle.jdbc.driver.OracleDriver is deprecated.Having use oracle.jdbc.OracleDriver.");
+ }
+
+ if (this.inited) {
+ if (!StringUtils.equals(this.driverClass, driverClass)) {
+ throw new UnsupportedOperationException();
+ }
+ } else {
+ this.driverClass = driverClass;
+ }
+ }
+ }
+
+ public ClassLoader getDriverClassLoader() {
+ return this.driverClassLoader;
+ }
+
+ public void setDriverClassLoader(ClassLoader driverClassLoader) {
+ this.driverClassLoader = driverClassLoader;
+ }
+
+ public PrintWriter getLogWriter() {
+ return this.logWriter;
+ }
+
+ public void setLogWriter(PrintWriter out) throws SQLException {
+ this.logWriter = out;
+ }
+
+ public void setLoginTimeout(int seconds) {
+ DriverManager.setLoginTimeout(seconds);
+ }
+
+ public int getLoginTimeout() {
+ return DriverManager.getLoginTimeout();
+ }
+
+ public Driver getDriver() {
+ return this.driver;
+ }
+
+ public void setDriver(Driver driver) {
+ this.driver = driver;
+ }
+
+ public int getDriverMajorVersion() {
+ return this.driver == null ? -1 : this.driver.getMajorVersion();
+ }
+
+ public int getDriverMinorVersion() {
+ return this.driver == null ? -1 : this.driver.getMinorVersion();
+ }
+
+ public ExceptionSorter getExceptionSorter() {
+ return this.exceptionSorter;
+ }
+
+ public String getExceptionSorterClassName() {
+ return this.exceptionSorter == null ? null : this.exceptionSorter.getClass().getName();
+ }
+
+ public void setExceptionSorter(ExceptionSorter exceptionSoter) {
+ this.exceptionSorter = exceptionSoter;
+ }
+
+ public void setExceptionSorterClassName(String exceptionSorter) throws Exception {
+ this.setExceptionSorter(exceptionSorter);
+ }
+
+ public void setExceptionSorter(String exceptionSorter) throws SQLException {
+ if (exceptionSorter == null) {
+ this.exceptionSorter = NullExceptionSorter.getInstance();
+ } else {
+ exceptionSorter = exceptionSorter.trim();
+ if (exceptionSorter.length() == 0) {
+ this.exceptionSorter = NullExceptionSorter.getInstance();
+ } else {
+ Class> clazz = Utils.loadClass(exceptionSorter);
+ if (clazz == null) {
+ LOG.error("load exceptionSorter error : " + exceptionSorter);
+ } else {
+ try {
+ this.exceptionSorter = (ExceptionSorter)clazz.newInstance();
+ } catch (Exception var4) {
+ throw new SQLException("create exceptionSorter error", var4);
+ }
+ }
+
+ }
+ }
+ }
+
+ public List getProxyFilters() {
+ return this.filters;
+ }
+
+ public void setProxyFilters(List filters) {
+ if (filters != null) {
+ this.filters.addAll(filters);
+ }
+
+ }
+
+ public String[] getFilterClasses() {
+ List filterConfigList = this.getProxyFilters();
+ List classes = new ArrayList();
+ Iterator var3 = filterConfigList.iterator();
+
+ while(var3.hasNext()) {
+ Filter filter = (Filter)var3.next();
+ classes.add(filter.getClass().getName());
+ }
+
+ return (String[])classes.toArray(new String[classes.size()]);
+ }
+
+ public void setFilters(String filters) throws SQLException {
+ if (filters != null && filters.startsWith("!")) {
+ filters = filters.substring(1);
+ this.clearFilters();
+ }
+
+ this.addFilters(filters);
+ }
+
+ public void addFilters(String filters) throws SQLException {
+ if (filters != null && filters.length() != 0) {
+ String[] filterArray = filters.split("\\,");
+ String[] var3 = filterArray;
+ int var4 = filterArray.length;
+
+ for(int var5 = 0; var5 < var4; ++var5) {
+ String item = var3[var5];
+ FilterManager.loadFilter(this.filters, item.trim());
+ }
+
+ }
+ }
+
+ public void clearFilters() {
+ if (this.isClearFiltersEnable()) {
+ this.filters.clear();
+ }
+ }
+
+ public void validateConnection(Connection conn) throws SQLException {
+ String query = this.getValidationQuery();
+ if (conn.isClosed()) {
+ throw new SQLException("validateConnection: connection closed");
+ } else if (this.validConnectionChecker != null) {
+ boolean result = true;
+ Exception error = null;
+
+ try {
+ result = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout);
+ if (result && this.onFatalError) {
+ this.lock.lock();
+
+ try {
+ if (this.onFatalError) {
+ this.onFatalError = false;
+ }
+ } finally {
+ this.lock.unlock();
+ }
+ }
+ } catch (SQLException var24) {
+ throw var24;
+ } catch (Exception var25) {
+ error = var25;
+ }
+
+ if (!result) {
+ SQLException sqlError = error != null ? new SQLException("validateConnection false", error) : new SQLException("validateConnection false");
+ throw sqlError;
+ }
+ } else {
+ if (null != query) {
+ Statement stmt = null;
+ ResultSet rs = null;
+
+ try {
+ stmt = conn.createStatement();
+ if (this.getValidationQueryTimeout() > 0) {
+ stmt.setQueryTimeout(this.getValidationQueryTimeout());
+ }
+
+ rs = stmt.executeQuery(query);
+ if (!rs.next()) {
+ throw new SQLException("validationQuery didn't return a row");
+ }
+
+ if (this.onFatalError) {
+ this.lock.lock();
+
+ try {
+ if (this.onFatalError) {
+ this.onFatalError = false;
+ }
+ } finally {
+ this.lock.unlock();
+ }
+ }
+ } finally {
+ JdbcUtils.close(rs);
+ JdbcUtils.close(stmt);
+ }
+ }
+
+ }
+ }
+
+ /** @deprecated */
+ protected boolean testConnectionInternal(Connection conn) {
+ return this.testConnectionInternal((DruidConnectionHolder)null, conn);
+ }
+
+ protected boolean testConnectionInternal(DruidConnectionHolder holder, Connection conn) {
+ String sqlFile = JdbcSqlStat.getContextSqlFile();
+ String sqlName = JdbcSqlStat.getContextSqlName();
+ if (sqlFile != null) {
+ JdbcSqlStat.setContextSqlFile((String)null);
+ }
+
+ if (sqlName != null) {
+ JdbcSqlStat.setContextSqlName((String)null);
+ }
+
+ try {
+ boolean valid;
+ if (this.validConnectionChecker == null) {
+ if (conn.isClosed()) {
+ valid = false;
+ return valid;
+ } else if (null == this.validationQuery) {
+ valid = true;
+ return valid;
+ } else {
+ Statement stmt = null;
+ ResultSet rset = null;
+
+ boolean var7;
+ try {
+ stmt = conn.createStatement();
+ if (this.getValidationQueryTimeout() > 0) {
+ stmt.setQueryTimeout(this.validationQueryTimeout);
+ }
+
+ rset = stmt.executeQuery(this.validationQuery);
+ if (!rset.next()) {
+ var7 = false;
+ return var7;
+ }
+ } finally {
+ JdbcUtils.close(rset);
+ JdbcUtils.close(stmt);
+ }
+
+ if (this.onFatalError) {
+ this.lock.lock();
+
+ try {
+ if (this.onFatalError) {
+ this.onFatalError = false;
+ }
+ } finally {
+ this.lock.unlock();
+ }
+ }
+
+ var7 = true;
+ return var7;
+ }
+ } else {
+ valid = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout);
+ long currentTimeMillis = System.currentTimeMillis();
+ if (holder != null) {
+ holder.lastValidTimeMillis = currentTimeMillis;
+ }
+
+ if (valid && this.isMySql) {
+ long lastPacketReceivedTimeMs = MySqlUtils.getLastPacketReceivedTimeMs(conn);
+ if (lastPacketReceivedTimeMs > 0L) {
+ long mysqlIdleMillis = currentTimeMillis - lastPacketReceivedTimeMs;
+ if (lastPacketReceivedTimeMs > 0L && mysqlIdleMillis >= this.timeBetweenEvictionRunsMillis) {
+ this.discardConnection(conn);
+ String errorMsg = "discard long time none received connection. , jdbcUrl : " + this.jdbcUrl + ", jdbcUrl : " + this.jdbcUrl + ", lastPacketReceivedIdleMillis : " + mysqlIdleMillis;
+ LOG.error(errorMsg);
+ boolean var13 = false;
+ return var13;
+ }
+ }
+ }
+
+ if (valid && this.onFatalError) {
+ this.lock.lock();
+
+ try {
+ if (this.onFatalError) {
+ this.onFatalError = false;
+ }
+ } finally {
+ this.lock.unlock();
+ }
+ }
+
+ boolean var46 = valid;
+ return var46;
+ }
+ } catch (Throwable var41) {
+ boolean var6 = false;
+ return var6;
+ } finally {
+ if (sqlFile != null) {
+ JdbcSqlStat.setContextSqlFile(sqlFile);
+ }
+
+ if (sqlName != null) {
+ JdbcSqlStat.setContextSqlName(sqlName);
+ }
+
+ }
+ }
+
+ public Set getActiveConnections() {
+ this.activeConnectionLock.lock();
+
+ HashSet var1;
+ try {
+ var1 = new HashSet(this.activeConnections.keySet());
+ } finally {
+ this.activeConnectionLock.unlock();
+ }
+
+ return var1;
+ }
+
+ public List getActiveConnectionStackTrace() {
+ List list = new ArrayList();
+ Iterator var2 = this.getActiveConnections().iterator();
+
+ while(var2.hasNext()) {
+ DruidPooledConnection conn = (DruidPooledConnection)var2.next();
+ list.add(Utils.toString(conn.getConnectStackTrace()));
+ }
+
+ return list;
+ }
+
+ public long getCreateTimespanNano() {
+ return this.createTimespan;
+ }
+
+ public long getCreateTimespanMillis() {
+ return this.createTimespan / 1000000L;
+ }
+
+ public Driver getRawDriver() {
+ return this.driver;
+ }
+
+ public boolean isClearFiltersEnable() {
+ return this.clearFiltersEnable;
+ }
+
+ public void setClearFiltersEnable(boolean clearFiltersEnable) {
+ this.clearFiltersEnable = clearFiltersEnable;
+ }
+
+ public long createConnectionId() {
+ return connectionIdSeedUpdater.incrementAndGet(this);
+ }
+
+ public long createStatementId() {
+ return statementIdSeedUpdater.getAndIncrement(this);
+ }
+
+ public long createMetaDataId() {
+ return metaDataIdSeedUpdater.getAndIncrement(this);
+ }
+
+ public long createResultSetId() {
+ return resultSetIdSeedUpdater.getAndIncrement(this);
+ }
+
+ public long createTransactionId() {
+ return transactionIdSeedUpdater.getAndIncrement(this);
+ }
+
+ void initStatement(DruidPooledConnection conn, Statement stmt) throws SQLException {
+ boolean transaction = !conn.getConnectionHolder().underlyingAutoCommit;
+ int queryTimeout = transaction ? this.getTransactionQueryTimeout() : this.getQueryTimeout();
+ if (queryTimeout > 0) {
+ stmt.setQueryTimeout(queryTimeout);
+ }
+
+ }
+
+ public void handleConnectionException(DruidPooledConnection conn, Throwable t) throws SQLException {
+ this.handleConnectionException(conn, t, (String)null);
+ }
+
+ public abstract void handleConnectionException(DruidPooledConnection var1, Throwable var2, String var3) throws SQLException;
+
+ protected abstract void recycle(DruidPooledConnection var1) throws SQLException;
+
+ public Connection createPhysicalConnection(String url, Properties info) throws SQLException {
+ Object conn;
+ if (this.getProxyFilters().size() == 0) {
+ conn = this.getDriver().connect(url, info);
+ } else {
+ conn = (new FilterChainImpl(this)).connection_connect(info);
+ }
+
+ createCountUpdater.incrementAndGet(this);
+ return (Connection)conn;
+ }
+
+ public DruidAbstractDataSource.PhysicalConnectionInfo createPhysicalConnection() throws SQLException {
+ String url = this.getUrl();
+ Properties connectProperties = this.getConnectProperties();
+ String user;
+ if (this.getUserCallback() != null) {
+ user = this.getUserCallback().getName();
+ } else {
+ user = this.getUsername();
+ }
+
+ String password = this.getPassword();
+ PasswordCallback passwordCallback = this.getPasswordCallback();
+ if (passwordCallback != null) {
+ if (passwordCallback instanceof DruidPasswordCallback) {
+ DruidPasswordCallback druidPasswordCallback = (DruidPasswordCallback)passwordCallback;
+ druidPasswordCallback.setUrl(url);
+ druidPasswordCallback.setProperties(connectProperties);
+ }
+
+ char[] chars = passwordCallback.getPassword();
+ if (chars != null) {
+ password = new String(chars);
+ }
+ }
+
+ Properties physicalConnectProperties = new Properties();
+ if (connectProperties != null) {
+ physicalConnectProperties.putAll(connectProperties);
+ }
+
+ if (user != null && user.length() != 0) {
+ physicalConnectProperties.put("user", user);
+ }
+
+ if (password != null && password.length() != 0) {
+ physicalConnectProperties.put("password", password);
+ }
+
+ Connection conn = null;
+ long connectStartNanos = System.nanoTime();
+ Map variables = this.initVariants ? new HashMap() : null;
+ Map globalVariables = this.initGlobalVariants ? new HashMap() : null;
+ createStartNanosUpdater.set(this, connectStartNanos);
+ creatingCountUpdater.incrementAndGet(this);
+ boolean var27 = false;
+
+ long connectedNanos;
+ long initedNanos;
+ long validatedNanos;
+ try {
+ var27 = true;
+ conn = this.createPhysicalConnection(url, physicalConnectProperties);
+ connectedNanos = System.nanoTime();
+ if (conn == null) {
+ throw new SQLException("connect error, url " + url + ", driverClass " + this.driverClass);
+ }
+
+ this.initPhysicalConnection(conn, variables, globalVariables);
+ initedNanos = System.nanoTime();
+ this.validateConnection(conn);
+ validatedNanos = System.nanoTime();
+ this.setFailContinuous(false);
+ this.setCreateError((Throwable)null);
+ var27 = false;
+ } catch (SQLException var28) {
+ this.setCreateError(var28);
+ JdbcUtils.close(conn);
+ throw var28;
+ } catch (RuntimeException var29) {
+ this.setCreateError(var29);
+ JdbcUtils.close(conn);
+ throw var29;
+ } catch (Error var30) {
+ createErrorCountUpdater.incrementAndGet(this);
+ this.setCreateError(var30);
+ JdbcUtils.close(conn);
+ throw var30;
+ } finally {
+ if (var27) {
+ long nano = System.nanoTime() - connectStartNanos;
+ this.createTimespan += nano;
+ creatingCountUpdater.decrementAndGet(this);
+ }
+ }
+
+ long nano = System.nanoTime() - connectStartNanos;
+ this.createTimespan += nano;
+ creatingCountUpdater.decrementAndGet(this);
+ return new DruidAbstractDataSource.PhysicalConnectionInfo(conn, connectStartNanos, connectedNanos, initedNanos, validatedNanos, variables, globalVariables);
+ }
+
+ protected void setCreateError(Throwable ex) {
+ if (ex == null) {
+ this.lock.lock();
+
+ try {
+ if (this.createError != null) {
+ this.createError = null;
+ }
+ } finally {
+ this.lock.unlock();
+ }
+
+ } else {
+ createErrorCountUpdater.incrementAndGet(this);
+ long now = System.currentTimeMillis();
+ this.lock.lock();
+
+ try {
+ this.createError = ex;
+ this.lastCreateError = ex;
+ this.lastCreateErrorTimeMillis = now;
+ } finally {
+ this.lock.unlock();
+ }
+
+ }
+ }
+
+ public boolean isFailContinuous() {
+ return failContinuousUpdater.get(this) == 1;
+ }
+
+ protected void setFailContinuous(boolean fail) {
+ if (fail) {
+ failContinuousTimeMillisUpdater.set(this, System.currentTimeMillis());
+ } else {
+ failContinuousTimeMillisUpdater.set(this, 0L);
+ }
+
+ boolean currentState = failContinuousUpdater.get(this) == 1;
+ if (currentState != fail) {
+ if (fail) {
+ failContinuousUpdater.set(this, 1);
+ if (LOG.isInfoEnabled()) {
+ LOG.info("{dataSource-" + this.getID() + "} failContinuous is true");
+ }
+ } else {
+ failContinuousUpdater.set(this, 0);
+ if (LOG.isInfoEnabled()) {
+ LOG.info("{dataSource-" + this.getID() + "} failContinuous is false");
+ }
+ }
+
+ }
+ }
+
+ public void initPhysicalConnection(Connection conn) throws SQLException {
+ this.initPhysicalConnection(conn, (Map)null, (Map)null);
+ }
+
+ public void initPhysicalConnection(Connection conn, Map variables, Map globalVariables) throws SQLException {
+ if (conn.getAutoCommit() != this.defaultAutoCommit) {
+ conn.setAutoCommit(this.defaultAutoCommit);
+ }
+
+ if (this.defaultReadOnly != null && conn.isReadOnly() != this.defaultReadOnly) {
+ conn.setReadOnly(this.defaultReadOnly);
+ }
+
+ if (this.getDefaultTransactionIsolation() != null && conn.getTransactionIsolation() != this.getDefaultTransactionIsolation()) {
+ conn.setTransactionIsolation(this.getDefaultTransactionIsolation());
+ }
+
+ if (this.getDefaultCatalog() != null && this.getDefaultCatalog().length() != 0) {
+ conn.setCatalog(this.getDefaultCatalog());
+ }
+
+ Collection initSqls = this.getConnectionInitSqls();
+ if (initSqls.size() != 0 || variables != null || globalVariables != null) {
+ Statement stmt = null;
+
+ try {
+ stmt = conn.createStatement();
+ Iterator var6 = initSqls.iterator();
+
+ String name;
+ while(var6.hasNext()) {
+ name = (String)var6.next();
+ if (name != null) {
+ stmt.execute(name);
+ }
+ }
+
+ if ("mysql".equals(this.dbType) || "aliyun_ads".equals(this.dbType)) {
+ ResultSet rs;
+ Object value;
+ if (variables != null) {
+ rs = null;
+
+ try {
+ rs = stmt.executeQuery("show variables");
+
+ while(rs.next()) {
+ name = rs.getString(1);
+ value = rs.getObject(2);
+ variables.put(name, value);
+ }
+ } finally {
+ JdbcUtils.close(rs);
+ }
+ }
+
+ if (globalVariables != null) {
+ rs = null;
+
+ try {
+ rs = stmt.executeQuery("show global variables");
+
+ while(rs.next()) {
+ name = rs.getString(1);
+ value = rs.getObject(2);
+ globalVariables.put(name, value);
+ }
+ } finally {
+ JdbcUtils.close(rs);
+ }
+ }
+ }
+ } finally {
+ JdbcUtils.close(stmt);
+ }
+
+ }
+ }
+
+ public abstract int getActivePeak();
+
+ public CompositeDataSupport getCompositeData() throws JMException {
+ JdbcDataSourceStat stat = this.getDataSourceStat();
+ Map map = new HashMap();
+ map.put("ID", this.getID());
+ map.put("URL", this.getUrl());
+ map.put("Name", this.getName());
+ map.put("FilterClasses", this.getFilterClasses());
+ map.put("CreatedTime", this.getCreatedTime());
+ map.put("RawDriverClassName", this.getDriverClassName());
+ map.put("RawUrl", this.getUrl());
+ map.put("RawDriverMajorVersion", this.getRawDriverMajorVersion());
+ map.put("RawDriverMinorVersion", this.getRawDriverMinorVersion());
+ map.put("Properties", this.getProperties());
+ map.put("ConnectionActiveCount", (long)this.getActiveCount());
+ map.put("ConnectionActiveCountMax", this.getActivePeak());
+ map.put("ConnectionCloseCount", this.getCloseCount());
+ map.put("ConnectionCommitCount", this.getCommitCount());
+ map.put("ConnectionRollbackCount", this.getRollbackCount());
+ map.put("ConnectionConnectLastTime", stat.getConnectionStat().getConnectLastTime());
+ map.put("ConnectionConnectErrorCount", this.getCreateCount());
+ if (this.createError != null) {
+ map.put("ConnectionConnectErrorLastTime", this.getLastCreateErrorTime());
+ map.put("ConnectionConnectErrorLastMessage", this.createError.getMessage());
+ map.put("ConnectionConnectErrorLastStackTrace", Utils.getStackTrace(this.createError));
+ } else {
+ map.put("ConnectionConnectErrorLastTime", (Object)null);
+ map.put("ConnectionConnectErrorLastMessage", (Object)null);
+ map.put("ConnectionConnectErrorLastStackTrace", (Object)null);
+ }
+
+ map.put("StatementCreateCount", stat.getStatementStat().getCreateCount());
+ map.put("StatementPrepareCount", stat.getStatementStat().getPrepareCount());
+ map.put("StatementPreCallCount", stat.getStatementStat().getPrepareCallCount());
+ map.put("StatementExecuteCount", stat.getStatementStat().getExecuteCount());
+ map.put("StatementRunningCount", stat.getStatementStat().getRunningCount());
+ map.put("StatementConcurrentMax", stat.getStatementStat().getConcurrentMax());
+ map.put("StatementCloseCount", stat.getStatementStat().getCloseCount());
+ map.put("StatementErrorCount", stat.getStatementStat().getErrorCount());
+ map.put("StatementLastErrorTime", (Object)null);
+ map.put("StatementLastErrorMessage", (Object)null);
+ map.put("StatementLastErrorStackTrace", (Object)null);
+ map.put("StatementExecuteMillisTotal", stat.getStatementStat().getMillisTotal());
+ map.put("StatementExecuteLastTime", stat.getStatementStat().getExecuteLastTime());
+ map.put("ConnectionConnectingCount", stat.getConnectionStat().getConnectingCount());
+ map.put("ResultSetCloseCount", stat.getResultSetStat().getCloseCount());
+ map.put("ResultSetOpenCount", stat.getResultSetStat().getOpenCount());
+ map.put("ResultSetOpenningCount", stat.getResultSetStat().getOpeningCount());
+ map.put("ResultSetOpenningMax", stat.getResultSetStat().getOpeningMax());
+ map.put("ResultSetFetchRowCount", stat.getResultSetStat().getFetchRowCount());
+ map.put("ResultSetLastOpenTime", stat.getResultSetStat().getLastOpenTime());
+ map.put("ResultSetErrorCount", stat.getResultSetStat().getErrorCount());
+ map.put("ResultSetOpenningMillisTotal", stat.getResultSetStat().getAliveMillisTotal());
+ map.put("ResultSetLastErrorTime", stat.getResultSetStat().getLastErrorTime());
+ map.put("ResultSetLastErrorMessage", (Object)null);
+ map.put("ResultSetLastErrorStackTrace", (Object)null);
+ map.put("ConnectionConnectCount", this.getConnectCount());
+ if (this.createError != null) {
+ map.put("ConnectionErrorLastMessage", this.createError.getMessage());
+ map.put("ConnectionErrorLastStackTrace", Utils.getStackTrace(this.createError));
+ } else {
+ map.put("ConnectionErrorLastMessage", (Object)null);
+ map.put("ConnectionErrorLastStackTrace", (Object)null);
+ }
+
+ map.put("ConnectionConnectMillisTotal", stat.getConnectionStat().getConnectMillis());
+ map.put("ConnectionConnectingCountMax", stat.getConnectionStat().getConnectingMax());
+ map.put("ConnectionConnectMillisMax", stat.getConnectionStat().getConnectMillisMax());
+ map.put("ConnectionErrorLastTime", stat.getConnectionStat().getErrorLastTime());
+ map.put("ConnectionAliveMillisMax", stat.getConnectionConnectAliveMillisMax());
+ map.put("ConnectionAliveMillisMin", stat.getConnectionConnectAliveMillisMin());
+ map.put("ConnectionHistogram", stat.getConnectionHistogramValues());
+ map.put("StatementHistogram", stat.getStatementStat().getHistogramValues());
+ return new CompositeDataSupport(JdbcStatManager.getDataSourceCompositeType(), map);
+ }
+
+ public long getID() {
+ return this.id;
+ }
+
+ public Date getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public abstract int getRawDriverMajorVersion();
+
+ public abstract int getRawDriverMinorVersion();
+
+ public abstract String getProperties();
+
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ throw new SQLFeatureNotSupportedException();
+ }
+
+ public void closePreapredStatement(PreparedStatementHolder stmtHolder) {
+ if (stmtHolder != null) {
+ closedPreparedStatementCountUpdater.incrementAndGet(this);
+ this.decrementCachedPreparedStatementCount();
+ this.incrementCachedPreparedStatementDeleteCount();
+ JdbcUtils.close(stmtHolder.statement);
+ }
+ }
+
+ protected void cloneTo(DruidAbstractDataSource to) {
+ to.defaultAutoCommit = this.defaultAutoCommit;
+ to.defaultReadOnly = this.defaultReadOnly;
+ to.defaultTransactionIsolation = this.defaultTransactionIsolation;
+ to.defaultCatalog = this.defaultCatalog;
+ to.name = this.name;
+ to.username = this.username;
+ to.password = this.password;
+ to.jdbcUrl = this.jdbcUrl;
+ to.driverClass = this.driverClass;
+ to.connectProperties = this.connectProperties;
+ to.passwordCallback = this.passwordCallback;
+ to.userCallback = this.userCallback;
+ to.initialSize = this.initialSize;
+ to.maxActive = this.maxActive;
+ to.minIdle = this.minIdle;
+ to.maxIdle = this.maxIdle;
+ to.maxWait = this.maxWait;
+ to.validationQuery = this.validationQuery;
+ to.validationQueryTimeout = this.validationQueryTimeout;
+ to.testOnBorrow = this.testOnBorrow;
+ to.testOnReturn = this.testOnReturn;
+ to.testWhileIdle = this.testWhileIdle;
+ to.poolPreparedStatements = this.poolPreparedStatements;
+ to.sharePreparedStatements = this.sharePreparedStatements;
+ to.maxPoolPreparedStatementPerConnectionSize = this.maxPoolPreparedStatementPerConnectionSize;
+ to.logWriter = this.logWriter;
+ if (this.filters != null) {
+ to.filters = new ArrayList(this.filters);
+ }
+
+ to.exceptionSorter = this.exceptionSorter;
+ to.driver = this.driver;
+ to.queryTimeout = this.queryTimeout;
+ to.transactionQueryTimeout = this.transactionQueryTimeout;
+ to.accessToUnderlyingConnectionAllowed = this.accessToUnderlyingConnectionAllowed;
+ to.timeBetweenEvictionRunsMillis = this.timeBetweenEvictionRunsMillis;
+ to.numTestsPerEvictionRun = this.numTestsPerEvictionRun;
+ to.minEvictableIdleTimeMillis = this.minEvictableIdleTimeMillis;
+ to.removeAbandoned = this.removeAbandoned;
+ to.removeAbandonedTimeoutMillis = this.removeAbandonedTimeoutMillis;
+ to.logAbandoned = this.logAbandoned;
+ to.maxOpenPreparedStatements = this.maxOpenPreparedStatements;
+ if (this.connectionInitSqls != null) {
+ to.connectionInitSqls = new ArrayList(this.connectionInitSqls);
+ }
+
+ to.dbType = this.dbType;
+ to.timeBetweenConnectErrorMillis = this.timeBetweenConnectErrorMillis;
+ to.validConnectionChecker = this.validConnectionChecker;
+ to.connectionErrorRetryAttempts = this.connectionErrorRetryAttempts;
+ to.breakAfterAcquireFailure = this.breakAfterAcquireFailure;
+ to.transactionThresholdMillis = this.transactionThresholdMillis;
+ to.dupCloseLogEnable = this.dupCloseLogEnable;
+ to.isOracle = this.isOracle;
+ to.useOracleImplicitCache = this.useOracleImplicitCache;
+ to.asyncCloseConnectionEnable = this.asyncCloseConnectionEnable;
+ to.createScheduler = this.createScheduler;
+ to.destroyScheduler = this.destroyScheduler;
+ }
+
+ public abstract void discardConnection(Connection var1);
+
+ public boolean isAsyncCloseConnectionEnable() {
+ return this.isRemoveAbandoned() ? true : this.asyncCloseConnectionEnable;
+ }
+
+ public void setAsyncCloseConnectionEnable(boolean asyncCloseConnectionEnable) {
+ this.asyncCloseConnectionEnable = asyncCloseConnectionEnable;
+ }
+
+ public ScheduledExecutorService getCreateScheduler() {
+ return this.createScheduler;
+ }
+
+ public void setCreateScheduler(ScheduledExecutorService createScheduler) {
+ if (this.isInited()) {
+ throw new DruidRuntimeException("dataSource inited.");
+ } else {
+ this.createScheduler = createScheduler;
+ }
+ }
+
+ public ScheduledExecutorService getDestroyScheduler() {
+ return this.destroyScheduler;
+ }
+
+ public void setDestroyScheduler(ScheduledExecutorService destroyScheduler) {
+ if (this.isInited()) {
+ throw new DruidRuntimeException("dataSource inited.");
+ } else {
+ this.destroyScheduler = destroyScheduler;
+ }
+ }
+
+ public boolean isInited() {
+ return this.inited;
+ }
+
+ public int getMaxCreateTaskCount() {
+ return this.maxCreateTaskCount;
+ }
+
+ public void setMaxCreateTaskCount(int maxCreateTaskCount) {
+ if (maxCreateTaskCount < 1) {
+ throw new IllegalArgumentException();
+ } else {
+ this.maxCreateTaskCount = maxCreateTaskCount;
+ }
+ }
+
+ public boolean isFailFast() {
+ return this.failFast;
+ }
+
+ public void setFailFast(boolean failFast) {
+ this.failFast = failFast;
+ }
+
+ public int getOnFatalErrorMaxActive() {
+ return this.onFatalErrorMaxActive;
+ }
+
+ public void setOnFatalErrorMaxActive(int onFatalErrorMaxActive) {
+ this.onFatalErrorMaxActive = onFatalErrorMaxActive;
+ }
+
+ public boolean isOnFatalError() {
+ return this.onFatalError;
+ }
+
+ public boolean isInitExceptionThrow() {
+ return this.initExceptionThrow;
+ }
+
+ public void setInitExceptionThrow(boolean initExceptionThrow) {
+ this.initExceptionThrow = initExceptionThrow;
+ }
+
+ public static class PhysicalConnectionInfo {
+ private Connection connection;
+ private long connectStartNanos;
+ private long connectedNanos;
+ private long initedNanos;
+ private long validatedNanos;
+ private Map vairiables;
+ private Map globalVairiables;
+ long createTaskId;
+
+ public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos) {
+ this(connection, connectStartNanos, connectedNanos, initedNanos, validatedNanos, (Map)null, (Map)null);
+ }
+
+ public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos, Map vairiables, Map globalVairiables) {
+ this.connection = connection;
+ this.connectStartNanos = connectStartNanos;
+ this.connectedNanos = connectedNanos;
+ this.initedNanos = initedNanos;
+ this.validatedNanos = validatedNanos;
+ this.vairiables = vairiables;
+ this.globalVairiables = globalVairiables;
+ }
+
+ public Connection getPhysicalConnection() {
+ return this.connection;
+ }
+
+ public long getConnectStartNanos() {
+ return this.connectStartNanos;
+ }
+
+ public long getConnectedNanos() {
+ return this.connectedNanos;
+ }
+
+ public long getInitedNanos() {
+ return this.initedNanos;
+ }
+
+ public long getValidatedNanos() {
+ return this.validatedNanos;
+ }
+
+ public long getConnectNanoSpan() {
+ return this.connectedNanos - this.connectStartNanos;
+ }
+
+ public Map getVairiables() {
+ return this.vairiables;
+ }
+
+ public Map getGlobalVairiables() {
+ return this.globalVairiables;
+ }
+ }
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java
new file mode 100644
index 0000000..3279af5
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java
@@ -0,0 +1,26 @@
+package top.hcode.hoj;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.retry.annotation.EnableRetry;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/10/22 23:25
+ * @Description:
+ */
+@EnableRetry
+@EnableScheduling // 开启定时任务
+@EnableDiscoveryClient // 开启注册发现
+@SpringBootApplication
+@EnableAsync(proxyTargetClass=true) //开启异步注解
+@EnableTransactionManagement
+public class DataBackupApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(DataBackupApplication.class,args);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java
new file mode 100644
index 0000000..d2a7850
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java
@@ -0,0 +1,299 @@
+package top.hcode.hoj.advice;
+
+
+import com.google.protobuf.ServiceException;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.exceptions.PersistenceException;
+import org.apache.shiro.ShiroException;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authz.AuthorizationException;
+import org.apache.shiro.authz.UnauthenticatedException;
+import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.converter.HttpMessageNotReadableException;
+import org.springframework.validation.BindException;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.FieldError;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.HttpMediaTypeNotSupportedException;
+import org.springframework.web.HttpRequestMethodNotSupportedException;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import top.hcode.hoj.common.exception.*;
+import top.hcode.hoj.common.result.CommonResult;
+import top.hcode.hoj.common.result.ResultStatus;
+import top.hcode.hoj.exception.AccessException;
+
+import javax.mail.MessagingException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.ValidationException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.sql.SQLException;
+import java.util.Set;
+
+/**
+ * 全局异常处理
+ */
+@Slf4j(topic = "hoj")
+@RestControllerAdvice
+public class GlobalExceptionAdvice {
+
+
+ /**
+ * 400 - Internal Server Error 自定义通用异常
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(value = {StatusForbiddenException.class,
+ StatusAccessDeniedException.class,
+ StatusFailException.class,
+ StatusNotFoundException.class,
+ StatusSystemErrorException.class})
+ public CommonResult handleCustomException(Exception e) {
+ return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL);
+ }
+
+
+ /**
+ * 401 -UnAuthorized 处理AuthenticationException,token相关异常 即是认证出错 可能无法处理!
+ */
+ @ResponseStatus(HttpStatus.UNAUTHORIZED)
+ @ExceptionHandler(value = AuthenticationException.class)
+ public CommonResult handleAuthenticationException(AuthenticationException e,
+ HttpServletRequest httpRequest,
+ HttpServletResponse httpResponse) {
+ httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源
+ return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED);
+ }
+
+ /**
+ * 401 -UnAuthorized UnauthenticatedException,token相关异常 即是认证出错 可能无法处理!
+ * 没有登录(没有token),访问有@RequiresAuthentication的请求路径会报这个异常
+ */
+ @ResponseStatus(HttpStatus.UNAUTHORIZED)
+ @ExceptionHandler(value = UnauthenticatedException.class)
+ public CommonResult handleUnauthenticatedException(UnauthenticatedException e,
+ HttpServletRequest httpRequest,
+ HttpServletResponse httpResponse) {
+ httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源
+ return CommonResult.errorResponse("请您先登录!", ResultStatus.ACCESS_DENIED);
+ }
+
+ /**
+ * 403 -FORBIDDEN AuthorizationException异常 即是授权认证出错 可能无法处理!
+ */
+ @ResponseStatus(HttpStatus.FORBIDDEN)
+ @ExceptionHandler(value = AuthorizationException.class)
+ public CommonResult handleAuthenticationException(AuthorizationException e,
+ HttpServletRequest httpRequest,
+ HttpServletResponse httpResponse) {
+ httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源
+ return CommonResult.errorResponse("对不起,您无权限进行此操作!", ResultStatus.FORBIDDEN);
+ }
+
+ /**
+ * 403 -FORBIDDEN 处理shiro的异常 无法处理! 未能走到controller层
+ */
+ @ResponseStatus(HttpStatus.FORBIDDEN)
+ @ExceptionHandler(value = ShiroException.class)
+ public CommonResult handleShiroException(ShiroException e,
+ HttpServletRequest httpRequest,
+ HttpServletResponse httpResponse) {
+ httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源
+ return CommonResult.errorResponse("对不起,您无权限进行此操作,请先登录进行授权认证", ResultStatus.FORBIDDEN);
+ }
+
+ /**
+ * 403 -FORBIDDEN 处理访问api能力被禁止的异常
+ */
+ @ResponseStatus(HttpStatus.FORBIDDEN)
+ @ExceptionHandler(value = AccessException.class)
+ public CommonResult handleAccessException(AccessException e) {
+ return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN);
+ }
+
+ /**
+ * 400 - Bad Request 处理Assert的异常 断言的异常!
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(value = IllegalArgumentException.class)
+ public CommonResult handler(IllegalArgumentException e) {
+ return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL);
+ }
+
+ /**
+ * 400 - Bad Request @Validated 校验错误异常处理
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(value = MethodArgumentNotValidException.class)
+ public CommonResult handlerMethodArgumentNotValidException(MethodArgumentNotValidException e) throws IOException {
+ BindingResult bindingResult = e.getBindingResult();
+ ObjectError objectError = bindingResult.getAllErrors().stream().findFirst().get();
+ return CommonResult.errorResponse(objectError.getDefaultMessage(), ResultStatus.FAIL);
+ }
+
+
+ /**
+ * 400 - Bad Request 处理缺少请求参数
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(MissingServletRequestParameterException.class)
+ public CommonResult handleMissingServletRequestParameterException(
+ MissingServletRequestParameterException e) {
+ return CommonResult.errorResponse("The required request parameters are missing:" + e.getMessage(), ResultStatus.FAIL);
+ }
+
+ /**
+ * 400 - Bad Request 参数解析失败
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(HttpMessageNotReadableException.class)
+ public CommonResult handleHttpMessageNotReadableException(
+ HttpMessageNotReadableException e) {
+ return CommonResult.errorResponse("Failed to parse parameter format!", ResultStatus.FAIL);
+ }
+
+
+ /**
+ * 400 - Bad Request 参数绑定失败
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(BindException.class)
+ public CommonResult handleBindException(BindException e) {
+ BindingResult result = e.getBindingResult();
+ FieldError error = result.getFieldError();
+ String field = error.getField();
+ String code = error.getDefaultMessage();
+ String message = String.format("%s:%s", field, code);
+ return CommonResult.errorResponse(message, ResultStatus.FAIL);
+ }
+
+ /**
+ * 400 - Bad Request 参数验证失败
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(ConstraintViolationException.class)
+ public CommonResult handleServiceException(ConstraintViolationException e) {
+ Set> violations = e.getConstraintViolations();
+ ConstraintViolation> violation = violations.iterator().next();
+ String message = violation.getMessage();
+ return CommonResult.errorResponse("[参数验证失败]parameter:" + message, ResultStatus.FAIL);
+ }
+
+ /**
+ * 400 - Bad Request 实体校验失败
+ */
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ @ExceptionHandler(ValidationException.class)
+ public CommonResult handleValidationException(ValidationException e) {
+ return CommonResult.errorResponse("Entity verification failed. The request parameters are incorrect!", ResultStatus.FAIL);
+ }
+
+ /**
+ * 405 - Method Not Allowed 不支持当前请求方法
+ */
+ @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
+ @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
+ public CommonResult handleHttpRequestMethodNotSupportedException(
+ HttpRequestMethodNotSupportedException e) {
+ return CommonResult.errorResponse("The request method is not supported!", ResultStatus.FAIL);
+ }
+
+ /**
+ * 415 - Unsupported Media Type 不支持当前媒体类型
+ */
+ @ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE)
+ @ExceptionHandler(HttpMediaTypeNotSupportedException.class)
+ public CommonResult handleHttpMediaTypeNotSupportedException(Exception e) {
+ return CommonResult.errorResponse("The media type is not supported!", ResultStatus.FAIL);
+ }
+
+
+ /**
+ * 500 - Internal Server Error 处理邮件发送出现的异常
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(value = MessagingException.class)
+ public CommonResult handler(MessagingException e) {
+ log.error("邮箱系统异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR);
+ }
+
+ /**
+ * 500 - Internal Server Error 业务逻辑异常
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(ServiceException.class)
+ public CommonResult handleServiceException(ServiceException e) {
+ log.error("业务逻辑异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR);
+ }
+
+ /**
+ * 500 - Internal Server Error 操作数据库出现异常:名称重复,外键关联
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(DataIntegrityViolationException.class)
+ public CommonResult handleDataIntegrityViolationException(DataIntegrityViolationException e) {
+ log.error("操作数据库出现异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR);
+ }
+
+
+ /**
+ * 500 - Internal Server Error 操作数据库出现异常
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(SQLException.class)
+ public CommonResult handleSQLException(SQLException e) {
+ log.error("操作数据库出现异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("Operation failed! Error message: " + e.getMessage(), ResultStatus.SYSTEM_ERROR);
+ }
+
+ /**
+ * 500 - Internal Server Error 批量操作数据库出现异常:名称重复,外键关联
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(PersistenceException.class)
+ public CommonResult handleBatchUpdateException(PersistenceException e) {
+ log.error("操作数据库出现异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("请检查数据是否准确!可能原因:数据库中已有相同的数据导致重复冲突!", ResultStatus.SYSTEM_ERROR);
+ }
+
+
+ /**
+ * 500 - Internal Server Error 系统通用异常
+ */
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler(Exception.class)
+ public CommonResult handleException(Exception e) {
+ log.error("系统通用异常-------------->{}", getMessage(e));
+ return CommonResult.errorResponse("Server Error!", ResultStatus.SYSTEM_ERROR);
+ }
+
+
+ /**
+ * 打印异常信息
+ */
+ public static String getMessage(Exception e) {
+ String swStr = null;
+ try (StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw)) {
+ e.printStackTrace(pw);
+ pw.flush();
+ sw.flush();
+ swStr = sw.toString();
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ log.error(ex.getMessage());
+ }
+ return swStr;
+ }
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java
new file mode 100644
index 0000000..90a8976
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java
@@ -0,0 +1,16 @@
+package top.hcode.hoj.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Author Himit_ZH
+ * @Date 2022/5/9
+ */
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface HOJAccess {
+ HOJAccessEnum[] value() default {};
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java
new file mode 100644
index 0000000..b35385e
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java
@@ -0,0 +1,42 @@
+package top.hcode.hoj.annotation;
+
+/**
+ * @Author Himit_ZH
+ * @Date 2022/5/9
+ */
+public enum HOJAccessEnum {
+ /**
+ * 公共讨论区
+ */
+ PUBLIC_DISCUSSION,
+
+ /**
+ * 团队讨论区
+ */
+ GROUP_DISCUSSION,
+
+ /**
+ * 比赛评论
+ */
+ CONTEST_COMMENT,
+
+ /**
+ * 公共评测
+ */
+ PUBLIC_JUDGE,
+
+ /**
+ * 团队评测
+ */
+ GROUP_JUDGE,
+
+ /**
+ * 比赛评测
+ */
+ CONTEST_JUDGE,
+
+ /**
+ * 隐藏非比赛提交详情的代码
+ */
+ HIDE_NON_CONTEST_SUBMISSION_CODE
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java
new file mode 100644
index 0000000..624f5af
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java
@@ -0,0 +1,28 @@
+package top.hcode.hoj.common.exception;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/9 10:30
+ * @Description:
+ */
+public class StatusAccessDeniedException extends Exception {
+
+ public StatusAccessDeniedException() {
+ }
+
+ public StatusAccessDeniedException(String message) {
+ super(message);
+ }
+
+ public StatusAccessDeniedException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public StatusAccessDeniedException(Throwable cause) {
+ super(cause);
+ }
+
+ public StatusAccessDeniedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java
new file mode 100644
index 0000000..7be8fff
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java
@@ -0,0 +1,27 @@
+package top.hcode.hoj.common.exception;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/9 10:27
+ * @Description:
+ */
+public class StatusFailException extends Exception{
+ public StatusFailException() {
+ }
+
+ public StatusFailException(String message) {
+ super(message);
+ }
+
+ public StatusFailException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public StatusFailException(Throwable cause) {
+ super(cause);
+ }
+
+ public StatusFailException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java
new file mode 100644
index 0000000..c2814c7
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java
@@ -0,0 +1,28 @@
+package top.hcode.hoj.common.exception;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/9 10:29
+ * @Description:
+ */
+public class StatusForbiddenException extends Exception{
+
+ public StatusForbiddenException() {
+ }
+
+ public StatusForbiddenException(String message) {
+ super(message);
+ }
+
+ public StatusForbiddenException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public StatusForbiddenException(Throwable cause) {
+ super(cause);
+ }
+
+ public StatusForbiddenException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java
new file mode 100644
index 0000000..5c80059
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java
@@ -0,0 +1,28 @@
+package top.hcode.hoj.common.exception;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/9 10:30
+ * @Description:
+ */
+public class StatusNotFoundException extends Exception{
+
+ public StatusNotFoundException() {
+ }
+
+ public StatusNotFoundException(String message) {
+ super(message);
+ }
+
+ public StatusNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public StatusNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ public StatusNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java
new file mode 100644
index 0000000..88f000d
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java
@@ -0,0 +1,28 @@
+package top.hcode.hoj.common.exception;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/10 14:33
+ * @Description:
+ */
+public class StatusSystemErrorException extends Exception {
+
+ public StatusSystemErrorException() {
+ }
+
+ public StatusSystemErrorException(String message) {
+ super(message);
+ }
+
+ public StatusSystemErrorException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public StatusSystemErrorException(Throwable cause) {
+ super(cause);
+ }
+
+ public StatusSystemErrorException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java
new file mode 100644
index 0000000..880c928
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java
@@ -0,0 +1,73 @@
+package top.hcode.hoj.common.result;
+
+import lombok.Data;
+
+@Data
+public class CommonResult{
+
+ private final Integer status; // 状态码
+
+ private final T data; // 返回的数据
+
+ private final String msg; // 自定义信息
+
+
+ /**
+ * 成功的结果
+ *
+ * @param data 返回结果
+ * @param msg 返回信息
+ */
+ public static CommonResult successResponse(T data, String msg) {
+ return new CommonResult<>(ResultStatus.SUCCESS.getStatus(), data, msg);
+ }
+
+
+ /**
+ * 成功的结果
+ *
+ * @param data 返回结果
+ */
+ public static CommonResult successResponse(T data) {
+ return new CommonResult(ResultStatus.SUCCESS.getStatus(), data, "success");
+ }
+
+ /**
+ * 成功的结果
+ *
+ * @param msg 返回信息
+ */
+ public static CommonResult successResponse(String msg) {
+ return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, msg);
+ }
+
+ /**
+ * 成功的结果
+ */
+ public static CommonResult successResponse() {
+ return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, "success");
+ }
+
+
+ /**
+ * 失败的结果,无异常
+ *
+ * @param msg 返回信息
+ */
+ public static CommonResult errorResponse(String msg) {
+ return new CommonResult(ResultStatus.FAIL.getStatus(), null, msg);
+ }
+
+ public static CommonResult errorResponse(ResultStatus resultStatus) {
+ return new CommonResult(resultStatus.getStatus(), null, resultStatus.getDescription());
+ }
+
+ public static CommonResult errorResponse(String msg, ResultStatus resultStatus) {
+ return new CommonResult(resultStatus.getStatus(), null, msg);
+ }
+
+ public static CommonResult errorResponse(String msg, Integer status) {
+ return new CommonResult(status, null, msg);
+ }
+
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java
new file mode 100644
index 0000000..9e71faa
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java
@@ -0,0 +1,31 @@
+package top.hcode.hoj.common.result;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2022/3/9 15:17
+ * @Description:
+ */
+@Getter
+@AllArgsConstructor
+public enum ResultStatus {
+
+ SUCCESS(200,"成功"),
+
+ FAIL(400,"失败"),
+
+ ACCESS_DENIED(401,"访问受限"),
+
+ FORBIDDEN(403,"拒绝访问"),
+
+ NOT_FOUND(404,"数据不存在"),
+
+ SYSTEM_ERROR(500,"系统错误");
+
+
+ private int status;
+
+ private String description;
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java
new file mode 100644
index 0000000..7cc62f2
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java
@@ -0,0 +1,62 @@
+package top.hcode.hoj.config;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.AsyncConfigurer;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.lang.reflect.Method;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/11/6 23:36
+ * @Description: 通用异步线程池
+ */
+@Configuration
+@Slf4j(topic = "hoj")
+public class AsyncTaskConfig implements AsyncConfigurer {
+ @Override
+ public Executor getAsyncExecutor() {
+ ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
+ // 线程池维护线程的最少数量
+ taskExecutor.setCorePoolSize(10);
+ // 线程池维护线程的最大数量
+ taskExecutor.setMaxPoolSize(20);
+ // 缓存队列
+ taskExecutor.setQueueCapacity(200);
+ //活跃时间
+ taskExecutor.setKeepAliveSeconds(3);
+ // 对拒绝task的处理策略
+ //(1) 默认的ThreadPoolExecutor.AbortPolicy 处理程序遭到拒绝将抛出运行时RejectedExecutionException;
+ //(2) ThreadPoolExecutor.CallerRunsPolicy 线程调用运行该任务的 execute 本身。此策略提供简单的反馈控制机制,能够减缓新任务的提交速度
+ //(3) ThreadPoolExecutor.DiscardPolicy 不能执行的任务将被删除;
+ //(4) ThreadPoolExecutor.DiscardOldestPolicy 如果执行程序尚未关闭,则位于工作队列头部的任务将被删除,然后重试执行程序(如果再次失败,则重复此过程)
+ taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+ // 线程名前缀,方便排查问题
+ taskExecutor.setThreadNamePrefix("CommonThread-");
+ // 注意一定要初始化
+ taskExecutor.initialize();
+
+ return taskExecutor;
+
+ }
+
+ /**
+ * 异步任务中异常处理
+ * @return
+ */
+ @Override
+ public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
+ return new AsyncUncaughtExceptionHandler() {
+
+ @Override
+ public void handleUncaughtException(Throwable arg0, Method arg1, Object... arg2) {
+ log.error("==========================" + arg0.getMessage() + "=======================", arg0);
+ log.error("exception method:" + arg1.getName());
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java
new file mode 100644
index 0000000..d9fe45c
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java
@@ -0,0 +1,27 @@
+package top.hcode.hoj.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author Himit_ZH
+ * @Date 2022/6/15
+ */
+@Component
+@RefreshScope
+@ConfigurationProperties(prefix = "hoj.db")
+@Data
+public class DataSourceConfigure {
+
+ private String username;
+
+ private String password;
+
+ private String host;
+
+ private Integer port;
+
+ private String name;
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java
new file mode 100644
index 0000000..654c18c
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java
@@ -0,0 +1,130 @@
+package top.hcode.hoj.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Optional;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2021/5/21 17:57
+ * @Description:
+ */
+@Configuration
+@RefreshScope
+@Data
+@Slf4j(topic = "hoj")
+public class DruidConfigure {
+
+ @Value("${mysql-username}")
+ private String username;
+
+ @Value("${mysql-password}")
+ private String password;
+
+ @Value("${mysql-host}")
+ private String host;
+
+ @Value("${mysql-port}")
+ private Integer port;
+
+ @Value("${mysql-name}")
+ private String name;
+
+ @Value("${spring.datasource.driver-class-name}")
+ private String driverClassName;
+
+ @Value("${spring.datasource.type}")
+ private String type;
+
+ @Value("${spring.datasource.initial-size}")
+ private Integer initialSize;
+
+ @Value("${spring.datasource.poolPreparedStatements:true}")
+ private Boolean poolPreparedStatements;
+
+ @Value("${spring.datasource.maxPoolPreparedStatementPerConnectionSize:20}")
+ private Integer maxPoolPreparedStatementPerConnectionSize;
+
+ @Value("${spring.datasource.timeBetweenEvictionRunsMillis:60000}")
+ private Integer timeBetweenEvictionRunsMillis;
+
+ @Value("${spring.datasource.minEvictableIdleTimeMillis:300000}")
+ private Integer minEvictableIdleTimeMillis;
+
+ @Value("${spring.datasource.validationQuery}")
+ private String validationQuery;
+
+ @Value("${spring.datasource.testWhileIdle:true}")
+ private Boolean testWhileIdle;
+
+ @Value("${spring.datasource.testOnBorrow:false}")
+ private Boolean testOnBorrow;
+
+ @Value("${spring.datasource.testOnReturn:false}")
+ private Boolean testOnReturn;
+
+ @Value("${spring.datasource.connectionErrorRetryAttempts:3}")
+ private Integer connectionErrorRetryAttempts;
+
+ @Value("${spring.datasource.breakAfterAcquireFailure:true}")
+ private Boolean breakAfterAcquireFailure;
+
+ @Value("${spring.datasource.timeBetweenConnectErrorMillis:300000}")
+ private Integer timeBetweenConnectErrorMillis;
+
+ @Value("${spring.datasource.min-idle}")
+ private Integer minIdle;
+
+ @Value("${spring.datasource.maxActive}")
+ private Integer maxActive;
+
+ @Value("${spring.datasource.maxWait}")
+ private Integer maxWait;
+
+ @Autowired
+ private DataSourceConfigure dataSourceConfigure;
+
+ @Bean(name = "datasource")
+ @RefreshScope
+ public DruidDataSource dataSource(){
+
+ String mysqlHost = Optional.ofNullable(dataSourceConfigure.getHost()).orElseGet(() -> host);
+ Integer mysqlPort = Optional.ofNullable(dataSourceConfigure.getPort()).orElseGet(() -> port);
+ String mysqlName = Optional.ofNullable(dataSourceConfigure.getName()).orElseGet(() -> name);
+ String mysqlUsername = Optional.ofNullable(dataSourceConfigure.getUsername()).orElseGet(() -> username);
+ String mysqlUserPassword = Optional.ofNullable(dataSourceConfigure.getPassword()).orElseGet(() -> password);
+
+ log.warn("[MySQL] [Config Change] name:[{}], host:[{}], port:[{}], username:[{}], password:[{}]", mysqlName, mysqlHost, mysqlPort, mysqlUsername, mysqlUserPassword);
+
+ DruidDataSource datasource = new DruidDataSource();
+ String url = "jdbc:mysql://" + mysqlHost + ":" + mysqlPort + "/" + mysqlName + "?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true";
+ datasource.setUrl(url);
+ datasource.setUsername(mysqlUsername);
+ datasource.setPassword(mysqlUserPassword);
+ datasource.setDriverClassName(driverClassName);
+ datasource.setDbType(type);
+ datasource.setMaxActive(maxActive);
+ datasource.setInitialSize(initialSize);
+ datasource.setMinIdle(minIdle);
+ datasource.setMaxWait(maxWait);
+ datasource.setPoolPreparedStatements(poolPreparedStatements);
+ datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
+ datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
+ datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
+ datasource.setValidationQuery(validationQuery);
+ datasource.setTestWhileIdle(testWhileIdle);
+ datasource.setTestOnReturn(testOnReturn);
+ datasource.setTestOnBorrow(testOnBorrow);
+ datasource.setConnectionErrorRetryAttempts(connectionErrorRetryAttempts);
+ datasource.setBreakAfterAcquireFailure(breakAfterAcquireFailure);
+ datasource.setTimeBetweenConnectErrorMillis(timeBetweenConnectErrorMillis);
+ return datasource;
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java
new file mode 100644
index 0000000..055ced8
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java
@@ -0,0 +1,22 @@
+package top.hcode.hoj.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author Himit_ZH
+ * @Date 2022/6/15
+ */
+@Component
+@RefreshScope
+@ConfigurationProperties(prefix = "hoj.redis")
+@Data
+public class JedisPoolConfigure {
+ private String host;
+
+ private Integer port;
+
+ private String password;
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java
new file mode 100644
index 0000000..96b8294
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java
@@ -0,0 +1,39 @@
+package top.hcode.hoj.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2021/5/24 16:54
+ * @Description: 专用于判题的异步线程池
+ */
+@Configuration
+@EnableAsync
+public class JudgeAsyncTaskConfig {
+ @Bean
+ public Executor judgeTaskAsyncPool() {
+ ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+ //核心线程池大小
+ executor.setCorePoolSize(2);
+ //最大线程数
+ executor.setMaxPoolSize(10);
+ //队列容量
+ executor.setQueueCapacity(500);
+ //活跃时间
+ executor.setKeepAliveSeconds(3);
+ //线程名字前缀
+ executor.setThreadNamePrefix("JudgeExecutor-");
+
+ // setRejectedExecutionHandler:当pool已经达到max size的时候,如何处理新任务
+ // CallerRunsPolicy:不在新线程中执行任务,而是由调用者所在的线程来执行
+ executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+ executor.initialize();
+ return executor;
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java
new file mode 100644
index 0000000..a407eff
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java
@@ -0,0 +1,26 @@
+package top.hcode.hoj.config;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/12/4 14:14
+ * @Description: 处理mybatis-plus自动填充时间
+ */
+@Component
+public class MyMetaObjectConfig implements MetaObjectHandler {
+ @Override
+ public void insertFill(MetaObject metaObject) {
+ this.setFieldValByName("gmtCreate",new Date(),metaObject);
+ this.setFieldValByName("gmtModified",new Date(),metaObject);
+ }
+
+ @Override
+ public void updateFill(MetaObject metaObject) {
+ this.setFieldValByName("gmtModified", new Date(), metaObject);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java
new file mode 100644
index 0000000..f5c4ffd
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java
@@ -0,0 +1,31 @@
+package top.hcode.hoj.config;
+import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/7/19 21:04
+ * @Description:
+ */
+@Configuration
+@EnableTransactionManagement
+@MapperScan("top.hcode.hoj.mapper")
+public class MybatisPlusConfig {
+
+ // 注册乐观锁插件
+ @Bean
+ public OptimisticLockerInterceptor optimisticLockerInterceptor() {
+ return new OptimisticLockerInterceptor();
+ }
+
+ // 分页插件
+ @Bean
+ public PaginationInterceptor paginationInterceptor() {
+ return new PaginationInterceptor();
+ }
+
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java
new file mode 100644
index 0000000..e4c2307
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java
@@ -0,0 +1,72 @@
+package top.hcode.hoj.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisPassword;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import redis.clients.jedis.JedisPoolConfig;
+
+import java.util.Optional;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2021/5/21 15:53
+ * @Description:
+ */
+@Configuration
+public class RedisAutoConfig {
+
+ @Value("${spring.redis.jedis.pool.max-active:200}")
+ private Integer maxActive;
+ @Value("${spring.redis.jedis.pool.max-idle:50}")
+ private Integer maxIdle;
+ @Value("${spring.redis.jedis.pool.max-wait:-1}")
+ private Long maxWait;
+ @Value("${spring.redis.jedis.pool.min-idle:10}")
+ private Integer minIdle;
+
+ @Value("${redis-host}")
+ private String redisHost;
+ @Value("${redis-port}")
+ private Integer redisPort;
+ @Value("${redis-password}")
+ private String redisPassword;
+
+ @Autowired
+ private JedisPoolConfigure jedisPoolConfigure;
+
+
+ @Bean
+ public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPool,
+ RedisStandaloneConfiguration jedisConfig) {
+ JedisConnectionFactory connectionFactory = new JedisConnectionFactory(jedisConfig);
+ connectionFactory.setPoolConfig(jedisPool);
+ return connectionFactory;
+ }
+
+ @Bean
+ public JedisPoolConfig jedisPool() {
+ JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
+ jedisPoolConfig.setMaxIdle(maxIdle);
+ jedisPoolConfig.setMaxWaitMillis(maxWait);
+ jedisPoolConfig.setMaxTotal(maxActive);
+ jedisPoolConfig.setMinIdle(minIdle);
+ return jedisPoolConfig;
+ }
+
+ @Bean
+ @RefreshScope
+ public RedisStandaloneConfiguration jedisConfig() {
+ RedisStandaloneConfiguration config = new RedisStandaloneConfiguration();
+ config.setHostName(Optional.ofNullable(jedisPoolConfigure.getHost()).orElseGet(() -> redisHost));
+ config.setPort(Optional.ofNullable(jedisPoolConfigure.getPort()).orElseGet(() -> redisPort));
+ config.setPassword(RedisPassword.of(Optional.ofNullable(jedisPoolConfigure.getPassword()).orElseGet(() -> redisPassword)));
+ return config;
+ }
+
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java
new file mode 100644
index 0000000..c8948e7
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java
@@ -0,0 +1,50 @@
+package top.hcode.hoj.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/10/23 23:47
+ * @Description:
+ */
+@Configuration
+public class RedisConfig {
+ // 自己定义了一个 RedisTemplate
+ @Bean(name = "redisTemplate")
+ @SuppressWarnings("all")
+ public RedisTemplate redisTemplate(RedisConnectionFactory factory) {
+ // 我们为了自己开发方便,一般直接使用
+ RedisTemplate template = new RedisTemplate();
+ template.setConnectionFactory(factory);
+
+ // Json序列化配置
+ Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
+ ObjectMapper om = new ObjectMapper();
+ om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+ om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+ jackson2JsonRedisSerializer.setObjectMapper(om);
+ // String 的序列化
+ StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+
+ // key采用String的序列化方式
+ template.setKeySerializer(stringRedisSerializer);
+ // hash的key也采用String的序列化方式
+ template.setHashKeySerializer(stringRedisSerializer);
+ // value序列化方式采用jackson
+ template.setValueSerializer(jackson2JsonRedisSerializer);
+ // hash的value序列化方式采用jackson
+ template.setHashValueSerializer(jackson2JsonRedisSerializer);
+ template.afterPropertiesSet();
+
+ return template;
+ }
+
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java
new file mode 100644
index 0000000..5dc8336
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java
@@ -0,0 +1,30 @@
+package top.hcode.hoj.config;
+
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.client.ClientHttpRequestFactory;
+import org.springframework.http.client.SimpleClientHttpRequestFactory;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/5/19 22:47
+ * @Description:
+ */
+@Configuration
+public class RestTemplateConfig {
+ @Bean
+ public RestTemplate restTemplate(ClientHttpRequestFactory factory)
+ {
+ return new RestTemplate(factory);
+ }
+
+ @Bean
+ public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
+ SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
+ factory.setReadTimeout(600000);//单位为ms
+ factory.setConnectTimeout(50000);//单位为ms
+ return factory;
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java
new file mode 100644
index 0000000..6bf509c
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java
@@ -0,0 +1,101 @@
+package top.hcode.hoj.config;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/7/19 22:53
+ * @Description:
+ */
+
+import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
+import org.apache.shiro.mgt.DefaultSubjectDAO;
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.session.mgt.SessionManager;
+import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
+import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
+import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition;
+import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition;
+import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.crazycake.shiro.RedisCacheManager;
+import org.crazycake.shiro.RedisSessionDAO;
+import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import top.hcode.hoj.shiro.AccountRealm;
+import top.hcode.hoj.shiro.JwtFilter;
+
+
+import javax.servlet.Filter;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * shiro启用注解拦截控制器
+ */
+@Configuration
+public class ShiroConfig {
+ @Autowired
+ JwtFilter jwtFilter;
+
+ @Bean
+ public SessionManager sessionManager(RedisSessionDAO redisSessionDAO) {
+ DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
+ sessionManager.setSessionDAO(redisSessionDAO);
+ return sessionManager;
+ }
+
+
+ @Bean
+ public DefaultWebSecurityManager securityManager(AccountRealm accountRealm,
+ SessionManager sessionManager,
+ RedisCacheManager redisCacheManager) {
+ DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(accountRealm);
+ securityManager.setSessionManager(sessionManager);
+ securityManager.setCacheManager(redisCacheManager);
+ /*
+ * 关闭shiro自带的session,详情见文档
+ */
+ DefaultSubjectDAO subjectDAO = new DefaultSubjectDAO();
+ DefaultSessionStorageEvaluator defaultSessionStorageEvaluator = new DefaultSessionStorageEvaluator();
+ defaultSessionStorageEvaluator.setSessionStorageEnabled(false);
+ subjectDAO.setSessionStorageEvaluator(defaultSessionStorageEvaluator);
+ securityManager.setSubjectDAO(subjectDAO);
+ return securityManager;
+ }
+ @Bean
+ public ShiroFilterChainDefinition shiroFilterChainDefinition() {
+ DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition();
+ Map filterMap = new LinkedHashMap<>();
+ filterMap.put("/**", "jwt"); // 主要通过注解方式校验权限
+ chainDefinition.addPathDefinitions(filterMap);
+ return chainDefinition;
+ }
+ @Bean("shiroFilterFactoryBean")
+ public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager,
+ ShiroFilterChainDefinition shiroFilterChainDefinition) {
+ ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean();
+ shiroFilter.setSecurityManager(securityManager);
+ Map filters = new HashMap<>();
+ filters.put("jwt", jwtFilter);
+ shiroFilter.setFilters(filters);
+ Map filterMap = shiroFilterChainDefinition.getFilterChainMap();
+ shiroFilter.setFilterChainDefinitionMap(filterMap);
+ return shiroFilter;
+ }
+
+ //开启注解代理(默认好像已经开启,可以不要)
+ @Bean
+ public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager){
+ AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
+ authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
+ return authorizationAttributeSourceAdvisor;
+ }
+ @Bean
+ public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
+ DefaultAdvisorAutoProxyCreator creator = new DefaultAdvisorAutoProxyCreator();
+ creator.setProxyTargetClass(true);
+ return creator;
+ }
+}
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java
new file mode 100644
index 0000000..5e58cfa
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java
@@ -0,0 +1,448 @@
+package top.hcode.hoj.config;
+
+import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import lombok.extern.slf4j.Slf4j;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+import top.hcode.hoj.crawler.language.LanguageContext;
+import top.hcode.hoj.dao.judge.RemoteJudgeAccountEntityService;
+import top.hcode.hoj.dao.problem.LanguageEntityService;
+import top.hcode.hoj.manager.admin.system.ConfigManager;
+import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount;
+import top.hcode.hoj.pojo.entity.problem.Language;
+import top.hcode.hoj.pojo.vo.ConfigVo;
+import top.hcode.hoj.utils.Constants;
+
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2021/2/19 22:11
+ * @Description:项目启动后,初始化运行该run方法
+ */
+@Component
+@Slf4j(topic = "hoj")
+public class StartupRunner implements CommandLineRunner {
+
+ @Autowired
+ private ConfigVo configVo;
+
+ @Autowired
+ private ConfigManager configManager;
+
+ @Autowired
+ private RemoteJudgeAccountEntityService remoteJudgeAccountEntityService;
+
+ @Autowired
+ private LanguageEntityService languageEntityService;
+
+ @Value("${open-remote-judge}")
+ private String openRemoteJudge;
+
+ // jwt配置
+ @Value("${jwt-token-secret}")
+ private String tokenSecret;
+
+ @Value("${jwt-token-expire}")
+ private String tokenExpire;
+
+ @Value("${jwt-token-fresh-expire}")
+ private String checkRefreshExpire;
+
+ // 数据库配置
+ @Value("${mysql-username}")
+ private String mysqlUsername;
+
+ @Value("${mysql-password}")
+ private String mysqlPassword;
+
+ @Value("${mysql-name}")
+ private String mysqlDBName;
+
+ @Value("${mysql-host}")
+ private String mysqlHost;
+
+ @Value("${mysql-public-host}")
+ private String mysqlPublicHost;
+
+ @Value("${mysql-port}")
+ private Integer mysqlPort;
+
+ @Value("${mysql-public-port}")
+ private Integer mysqlPublicPort;
+
+ // 缓存配置
+ @Value("${redis-host}")
+ private String redisHost;
+
+ @Value("${redis-port}")
+ private Integer redisPort;
+
+ @Value("${redis-password}")
+ private String redisPassword;
+ // 判题服务token
+ @Value("${judge-token}")
+ private String judgeToken;
+
+ // 邮箱配置
+ @Value("${email-username}")
+ private String emailUsername;
+
+ @Value("${email-password}")
+ private String emailPassword;
+
+ @Value("${email-host}")
+ private String emailHost;
+
+ @Value("${email-port}")
+ private Integer emailPort;
+
+ @Value("${hdu-username-list}")
+ private List hduUsernameList;
+
+ @Value("${hdu-password-list}")
+ private List hduPasswordList;
+
+ @Value("${cf-username-list}")
+ private List cfUsernameList;
+
+ @Value("${cf-password-list}")
+ private List cfPasswordList;
+
+ @Value("${poj-username-list}")
+ private List pojUsernameList;
+
+ @Value("${poj-password-list}")
+ private List pojPasswordList;
+
+ @Value("${atcoder-username-list}")
+ private List atcoderUsernameList;
+
+ @Value("${atcoder-password-list}")
+ private List atcoderPasswordList;
+
+ @Value("${spoj-username-list}")
+ private List spojUsernameList;
+
+ @Value("${spoj-password-list}")
+ private List spojPasswordList;
+
+ @Value("${forced-update-remote-judge-account}")
+ private Boolean forcedUpdateRemoteJudgeAccount;
+
+ @Override
+ public void run(String... args) throws Exception {
+
+ // 动态修改nacos上的配置文件
+ if (judgeToken.equals("default")) {
+ configVo.setJudgeToken(IdUtil.fastSimpleUUID());
+ } else {
+ configVo.setJudgeToken(judgeToken);
+ }
+
+ if (tokenSecret.equals("default")) {
+ configVo.setTokenSecret(IdUtil.fastSimpleUUID());
+ } else {
+ configVo.setTokenSecret(tokenSecret);
+ }
+ configVo.setTokenExpire(tokenExpire);
+ configVo.setCheckRefreshExpire(checkRefreshExpire);
+
+ configVo.setMysqlUsername(mysqlUsername);
+ configVo.setMysqlPassword(mysqlPassword);
+ configVo.setMysqlHost(mysqlHost);
+ configVo.setMysqlPublicHost(mysqlPublicHost);
+ configVo.setMysqlPort(mysqlPort);
+ configVo.setMysqlPublicPort(mysqlPublicPort);
+ configVo.setMysqlDBName(mysqlDBName);
+
+ configVo.setRedisHost(redisHost);
+ configVo.setRedisPort(redisPort);
+ configVo.setRedisPassword(redisPassword);
+
+ if (configVo.getEmailHost() == null || !"your_email_host".equals(emailHost)) {
+ configVo.setEmailHost(emailHost);
+ }
+ if (configVo.getEmailPort() == null || emailPort != 456) {
+ configVo.setEmailPort(emailPort);
+ }
+ if (configVo.getEmailUsername() == null || !"your_email_username".equals(emailUsername)) {
+ configVo.setEmailUsername(emailUsername);
+ }
+ if (configVo.getEmailPassword() == null || !"your_email_password".equals(emailPassword)) {
+ configVo.setEmailPassword(emailPassword);
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getHduUsernameList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setHduUsernameList(hduUsernameList);
+ }else {
+ hduUsernameList = configVo.getHduUsernameList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getHduPasswordList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setHduPasswordList(hduPasswordList);
+ }else {
+ hduPasswordList = configVo.getHduPasswordList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getCfUsernameList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setCfUsernameList(cfUsernameList);
+ }else {
+ cfUsernameList = configVo.getCfUsernameList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getCfPasswordList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setCfPasswordList(cfPasswordList);
+ }else {
+ cfPasswordList = configVo.getCfPasswordList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getPojUsernameList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setPojUsernameList(pojUsernameList);
+ }else {
+ pojUsernameList = configVo.getPojUsernameList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getPojPasswordList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setPojPasswordList(pojPasswordList);
+ }else {
+ pojPasswordList = configVo.getPojPasswordList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getAtcoderUsernameList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setAtcoderUsernameList(atcoderUsernameList);
+ }else {
+ atcoderUsernameList = configVo.getAtcoderUsernameList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getAtcoderPasswordList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setAtcoderPasswordList(atcoderPasswordList);
+ }else {
+ atcoderPasswordList = configVo.getAtcoderPasswordList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getSpojUsernameList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setSpojUsernameList(spojUsernameList);
+ }else {
+ spojUsernameList = configVo.getSpojUsernameList();
+ }
+
+ if (CollectionUtils.isEmpty(configVo.getSpojPasswordList()) || forcedUpdateRemoteJudgeAccount) {
+ configVo.setSpojPasswordList(spojPasswordList);
+ }else {
+ spojPasswordList = configVo.getSpojPasswordList();
+ }
+
+ configManager.sendNewConfigToNacos();
+
+ upsertHOJLanguage("PHP", "PyPy2", "PyPy3", "JavaScript Node", "JavaScript V8");
+
+ checkAllLanguageUpdate();
+
+ if (openRemoteJudge.equals("true")) {
+ // 初始化清空表
+ remoteJudgeAccountEntityService.remove(new QueryWrapper<>());
+ addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.HDU.getName(), hduUsernameList, hduPasswordList);
+ addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.POJ.getName(), pojUsernameList, pojPasswordList);
+ addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.CODEFORCES.getName(), cfUsernameList, cfPasswordList);
+ addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.SPOJ.getName(), spojUsernameList, spojPasswordList);
+ addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.ATCODER.getName(), atcoderUsernameList, atcoderPasswordList);
+
+ checkRemoteOJLanguage(Constants.RemoteOJ.SPOJ, Constants.RemoteOJ.ATCODER);
+ }
+
+ }
+
+ /**
+ * @param oj
+ * @param usernameList
+ * @param passwordList
+ * @MethodName addRemoteJudgeAccountToRedis
+ * @Description 将传入的对应oj账号写入到mysql
+ * @Return
+ * @Since 2021/5/18
+ */
+ private void addRemoteJudgeAccountToMySQL(String oj, List usernameList, List passwordList) {
+
+
+ if (CollectionUtils.isEmpty(usernameList) || CollectionUtils.isEmpty(passwordList) || usernameList.size() != passwordList.size()) {
+ log.error("[Init System Config] [{}]: There is no account or password configured for remote judge, " +
+ "username list:{}, password list:{}", oj, Arrays.toString(usernameList.toArray()),
+ Arrays.toString(passwordList.toArray()));
+ }
+
+ List remoteAccountList = new LinkedList<>();
+ for (int i = 0; i < usernameList.size(); i++) {
+
+ remoteAccountList.add(new RemoteJudgeAccount()
+ .setUsername(usernameList.get(i))
+ .setPassword(passwordList.get(i))
+ .setStatus(true)
+ .setVersion(0L)
+ .setOj(oj));
+
+ }
+
+ if (remoteAccountList.size() > 0) {
+ boolean addOk = remoteJudgeAccountEntityService.saveOrUpdateBatch(remoteAccountList);
+ if (!addOk) {
+ log.error("[Init System Config] Remote judge initialization failed. Failed to add account for: [{}]. Please check the configuration file and restart!", oj);
+ }
+ }
+ }
+
+
+ private void upsertHOJLanguage(String... languageList) {
+ /**
+ * 2022.02.25 新增js、pypy、php语言
+ */
+ for (String language : languageList) {
+ QueryWrapper languageQueryWrapper = new QueryWrapper<>();
+ languageQueryWrapper.eq("oj", "ME")
+ .eq("name", language);
+ int count = languageEntityService.count(languageQueryWrapper);
+ if (count == 0) {
+ Language newLanguage = buildHOJLanguage(language);
+ boolean isOk = languageEntityService.save(newLanguage);
+ if (!isOk) {
+ log.error("[Init System Config] [HOJ] Failed to add new language [{}]! Please check whether the language table corresponding to the database has the language!", language);
+ }
+ }
+ }
+ }
+
+ private void checkAllLanguageUpdate() {
+
+ /**
+ * 2022.02.25 更新原有的python3.6.9为python3.7.5
+ */
+ UpdateWrapper languageUpdateWrapper = new UpdateWrapper<>();
+ languageUpdateWrapper.eq("oj", "ME")
+ .eq("name", "Python3")
+ .set("description", "Python 3.7.5");
+ languageEntityService.update(languageUpdateWrapper);
+
+ /**
+ * 2022.02.25 删除cf的Microsoft Visual C++ 2010
+ */
+ UpdateWrapper deleteWrapper = new UpdateWrapper<>();
+ deleteWrapper.eq("name", "Microsoft Visual C++ 2010")
+ .eq("oj", "CF");
+ languageEntityService.remove(deleteWrapper);
+ }
+
+ private void checkRemoteOJLanguage(Constants.RemoteOJ... remoteOJList) {
+ for (Constants.RemoteOJ remoteOJ : remoteOJList) {
+ QueryWrapper languageQueryWrapper = new QueryWrapper<>();
+ languageQueryWrapper.eq("oj", remoteOJ.getName());
+ int count = languageEntityService.count(languageQueryWrapper);
+ if (count == 0) {
+ List languageList = new LanguageContext(remoteOJ).buildLanguageList();
+ boolean isOk = languageEntityService.saveBatch(languageList);
+ if (!isOk) {
+ log.error("[Init System Config] [{}] Failed to initialize language list! Please check whether the language table corresponding to the database has the OJ language!", remoteOJ.getName());
+ }
+ }
+ }
+ }
+
+
+ private Language buildHOJLanguage(String lang) {
+ Language language = new Language();
+ switch (lang) {
+ case "PHP":
+ language.setName("PHP")
+ .setCompileCommand("/usr/bin/php {src_path}")
+ .setContentType("text/x-php")
+ .setDescription("PHP 7.3.33")
+ .setTemplate("=array_sum(fscanf(STDIN, \"%d %d\"));")
+ .setIsSpj(false)
+ .setOj("ME");
+ return language;
+ case "JavaScript Node":
+ language.setName("JavaScript Node")
+ .setCompileCommand("/usr/bin/node {src_path}")
+ .setContentType("text/javascript")
+ .setDescription("Node.js 14.19.0")
+ .setTemplate("var readline = require('readline');\n" +
+ "const rl = readline.createInterface({\n" +
+ " input: process.stdin,\n" +
+ " output: process.stdout\n" +
+ "});\n" +
+ "rl.on('line', function(line){\n" +
+ " var tokens = line.split(' ');\n" +
+ " console.log(parseInt(tokens[0]) + parseInt(tokens[1]));\n" +
+ "});")
+ .setIsSpj(false)
+ .setOj("ME");
+ return language;
+ case "JavaScript V8":
+ language.setName("JavaScript V8")
+ .setCompileCommand("/usr/bin/jsv8/d8 {src_path}")
+ .setContentType("text/javascript")
+ .setDescription("JavaScript V8 8.4.109")
+ .setTemplate("const [a, b] = readline().split(' ').map(n => parseInt(n, 10));\n" +
+ "print((a + b).toString());")
+ .setIsSpj(false)
+ .setOj("ME");
+ return language;
+ case "PyPy2":
+ language.setName("PyPy2")
+ .setContentType("text/x-python")
+ .setCompileCommand("/usr/bin/pypy -m py_compile {src_path}")
+ .setDescription("PyPy 2.7.18 (7.3.8)")
+ .setTemplate("print sum(int(x) for x in raw_input().split(' '))")
+ .setCodeTemplate("//PREPEND BEGIN\n" +
+ "//PREPEND END\n" +
+ "\n" +
+ "//TEMPLATE BEGIN\n" +
+ "def add(a, b):\n" +
+ " return a + b\n" +
+ "//TEMPLATE END\n" +
+ "\n" +
+ "\n" +
+ "if __name__ == '__main__': \n" +
+ " //APPEND BEGIN\n" +
+ " a, b = 1, 1\n" +
+ " print add(a, b)\n" +
+ " //APPEND END")
+ .setIsSpj(false)
+ .setOj("ME");
+ return language;
+ case "PyPy3":
+ language.setName("PyPy3")
+ .setContentType("text/x-python")
+ .setDescription("PyPy 3.8.12 (7.3.8)")
+ .setCompileCommand("/usr/bin/pypy3 -m py_compile {src_path}")
+ .setTemplate("print(sum(int(x) for x in input().split(' ')))")
+ .setCodeTemplate("//PREPEND BEGIN\n" +
+ "//PREPEND END\n" +
+ "\n" +
+ "//TEMPLATE BEGIN\n" +
+ "def add(a, b):\n" +
+ " return a + b\n" +
+ "//TEMPLATE END\n" +
+ "\n" +
+ "\n" +
+ "if __name__ == '__main__': \n" +
+ " //APPEND BEGIN\n" +
+ " a, b = 1, 1\n" +
+ " print(add(a, b))\n" +
+ " //APPEND END")
+ .setIsSpj(false)
+ .setOj("ME");
+ return language;
+ }
+ return null;
+ }
+
+}
+
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java
new file mode 100644
index 0000000..f0af785
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java
@@ -0,0 +1,56 @@
+package top.hcode.hoj.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
+import org.springframework.core.env.Profiles;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/5/29 22:28
+ * @Description:
+ */
+//@Configuration
+//@EnableSwagger2 //开启swagger2
+public class SwaggerConfig {
+ @Bean //配置swagger的docket的bean势力
+ public Docket docket(Environment environment){
+ //设置要显示的swagger环境
+ Profiles profiles = Profiles.of("dev","test"); //线下环境
+ //通过环境判断是否在自己所设定的环境当中
+ boolean flag = environment.acceptsProfiles(profiles);
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .groupName("Himit_ZH") //分组
+ .enable(flag) //开启
+ .select()
+ //RequestHandlerSelectors扫描方式
+ //any()全部
+ //none 都不扫描
+ //path 过滤什么路径
+ .apis(RequestHandlerSelectors.basePackage("top.hcode"))
+ .build();
+ }
+ //配置swagger信息
+ private ApiInfo apiInfo(){
+ //作者信息
+ Contact contact = new Contact("Himit_ZH", "https://blog.csdn.net/weixin_43853097", "372347736@qq.com");
+ return new ApiInfo(
+ "Himit_ZH的swaggerAPI文档",
+ "网站作者是个大帅哥!",
+ "v1.0",
+ "https://blog.csdn.net/weixin_43853097",
+ contact,
+ "Apache 2.0",
+ "http://www.apache.org/licenses/LICENSE-2.0",
+ new ArrayList());
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java
new file mode 100644
index 0000000..ba24d93
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java
@@ -0,0 +1,30 @@
+package top.hcode.hoj.config;
+
+import org.apache.catalina.connector.Connector;
+import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author Himit_ZH
+ * @Date 2022/6/11
+ * 允许请求路径出现[] \ 等特殊字符
+ */
+@Configuration
+public class TomcatConfig {
+
+ @Bean
+ public TomcatServletWebServerFactory webServerFactory() {
+ TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
+ factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
+ @Override
+ public void customize(Connector connector) {
+ connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}");
+ connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}");
+ connector.setProperty("rejectIllegalHeader", "false");
+ }
+ });
+ return factory;
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java
new file mode 100644
index 0000000..a97c8a4
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java
@@ -0,0 +1,56 @@
+package top.hcode.hoj.config;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import top.hcode.hoj.interceptor.AccessInterceptor;
+import top.hcode.hoj.utils.Constants;
+
+import java.io.File;
+
+/**
+ * 解决跨域问题以及增加注解拦截类
+ */
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+
+ private static final String[] EXCLUDE_PATH_PATTERNS = new String[]{
+ "/api/admin/**", "/api/file/**", "/api/msg/**", "/api/public/**"
+ };
+
+ @Autowired
+ private AccessInterceptor accessInterceptor;
+
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**")
+ .allowedOrigins("*")
+ .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS")
+ .allowCredentials(true)
+ .maxAge(3600)
+ .allowedHeaders("*");
+ }
+
+ // 前端直接通过/public/img/图片名称即可拿到
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ // /api/public/img/** /api/public/file/**
+ registry.addResourceHandler(Constants.File.IMG_API.getPath() + "**", Constants.File.FILE_API.getPath() + "**")
+ .addResourceLocations("file:" + Constants.File.USER_AVATAR_FOLDER.getPath() + File.separator,
+ "file:" + Constants.File.GROUP_AVATAR_FOLDER.getPath() + File.separator,
+ "file:" + Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator,
+ "file:" + Constants.File.HOME_CAROUSEL_FOLDER.getPath() + File.separator,
+ "file:" + Constants.File.PROBLEM_FILE_FOLDER.getPath() + File.separator);
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(accessInterceptor)
+ .addPathPatterns("/api/**")
+ .excludePathPatterns(EXCLUDE_PATH_PATTERNS);
+ }
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java
new file mode 100644
index 0000000..50b3a56
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java
@@ -0,0 +1,42 @@
+package top.hcode.hoj.controller.admin;
+
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.apache.shiro.authz.annotation.RequiresRoles;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import top.hcode.hoj.common.result.CommonResult;
+
+import top.hcode.hoj.pojo.dto.LoginDto;
+
+import top.hcode.hoj.pojo.vo.UserInfoVo;
+import top.hcode.hoj.service.admin.account.AdminAccountService;
+
+
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/12/2 21:23
+ * @Description:
+ */
+@RestController
+@RequestMapping("/api/admin")
+public class AdminAccountController {
+
+ @Autowired
+ private AdminAccountService adminAccountService;
+
+ @PostMapping("/login")
+ public CommonResult login(@Validated @RequestBody LoginDto loginDto){
+ return adminAccountService.login(loginDto);
+ }
+
+ @GetMapping("/logout")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root","admin","problem_admin"},logical = Logical.OR)
+ public CommonResult logout() {
+ return adminAccountService.logout();
+ }
+
+}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java
new file mode 100644
index 0000000..00c4346
--- /dev/null
+++ b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java
@@ -0,0 +1,236 @@
+package top.hcode.hoj.controller.admin;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.apache.shiro.authz.annotation.RequiresRoles;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import top.hcode.hoj.common.result.CommonResult;
+import top.hcode.hoj.pojo.dto.AnnouncementDto;
+import top.hcode.hoj.pojo.dto.ContestProblemDto;
+import top.hcode.hoj.pojo.dto.ProblemDto;
+import top.hcode.hoj.pojo.entity.contest.Contest;
+import top.hcode.hoj.pojo.entity.contest.ContestProblem;
+
+import top.hcode.hoj.pojo.entity.problem.Problem;
+import top.hcode.hoj.pojo.vo.AdminContestVo;
+import top.hcode.hoj.pojo.vo.AnnouncementVo;
+
+import top.hcode.hoj.service.admin.contest.AdminContestAnnouncementService;
+import top.hcode.hoj.service.admin.contest.AdminContestProblemService;
+import top.hcode.hoj.service.admin.contest.AdminContestService;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+
+/**
+ * @Author: Himit_ZH
+ * @Date: 2020/12/19 22:28
+ * @Description:
+ */
+@RestController
+@RequestMapping("/api/admin/contest")
+public class AdminContestController {
+
+
+ @Autowired
+ private AdminContestService adminContestService;
+
+ @Autowired
+ private AdminContestProblemService adminContestProblemService;
+
+ @Autowired
+ private AdminContestAnnouncementService adminContestAnnouncementService;
+
+ @GetMapping("/get-contest-list")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult> getContestList(@RequestParam(value = "limit", required = false) Integer limit,
+ @RequestParam(value = "currentPage", required = false) Integer currentPage,
+ @RequestParam(value = "keyword", required = false) String keyword) {
+
+ return adminContestService.getContestList(limit, currentPage, keyword);
+ }
+
+ @GetMapping("")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult getContest(@RequestParam("cid") Long cid) {
+
+ return adminContestService.getContest(cid);
+ }
+
+ @DeleteMapping("")
+ @RequiresAuthentication
+ @RequiresRoles(value = "root") // 只有超级管理员能删除比赛
+ public CommonResult deleteContest(@RequestParam("cid") Long cid) {
+
+ return adminContestService.deleteContest(cid);
+ }
+
+ @PostMapping("")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult addContest(@RequestBody AdminContestVo adminContestVo) {
+
+ return adminContestService.addContest(adminContestVo);
+ }
+
+ @GetMapping("/clone")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult cloneContest(@RequestParam("cid") Long cid) {
+ return adminContestService.cloneContest(cid);
+ }
+
+ @PutMapping("")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ @Transactional(rollbackFor = Exception.class)
+ public CommonResult updateContest(@RequestBody AdminContestVo adminContestVo) {
+
+ return adminContestService.updateContest(adminContestVo);
+ }
+
+ @PutMapping("/change-contest-visible")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult changeContestVisible(@RequestParam(value = "cid", required = true) Long cid,
+ @RequestParam(value = "uid", required = true) String uid,
+ @RequestParam(value = "visible", required = true) Boolean visible) {
+
+ return adminContestService.changeContestVisible(cid, uid, visible);
+ }
+
+ /**
+ * 以下为比赛的题目的增删改查操作接口
+ */
+
+ @GetMapping("/get-problem-list")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ @Transactional(rollbackFor = Exception.class)
+ public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit,
+ @RequestParam(value = "currentPage", required = false) Integer currentPage,
+ @RequestParam(value = "keyword", required = false) String keyword,
+ @RequestParam(value = "cid", required = true) Long cid,
+ @RequestParam(value = "problemType", required = false) Integer problemType,
+ @RequestParam(value = "oj", required = false) String oj) {
+
+ return adminContestProblemService.getProblemList(limit, currentPage, keyword, cid, problemType, oj);
+ }
+
+ @GetMapping("/problem")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ public CommonResult getProblem(@RequestParam("pid") Long pid, HttpServletRequest request) {
+ return adminContestProblemService.getProblem(pid);
+ }
+
+ @DeleteMapping("/problem")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR)
+ @Transactional(rollbackFor = Exception.class)
+ public CommonResult deleteProblem(@RequestParam("pid") Long pid,
+ @RequestParam(value = "cid", required = false) Long cid) {
+ return adminContestProblemService.deleteProblem(pid, cid);
+ }
+
+ @PostMapping("/problem")
+ @RequiresAuthentication
+ @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR)
+ @Transactional(rollbackFor = Exception.class)
+ public CommonResult