diff --git a/smtweb-framework/sw-system-bpm/.gitignore b/smtweb-framework/bpm/.gitignore similarity index 100% rename from smtweb-framework/sw-system-bpm/.gitignore rename to smtweb-framework/bpm/.gitignore diff --git a/smtweb-framework/sw-system-bpm/doc/SwBody.puml b/smtweb-framework/bpm/doc/SwBody.puml similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/SwBody.puml rename to smtweb-framework/bpm/doc/SwBody.puml diff --git a/smtweb-framework/sw-system-bpm/doc/TODO.md b/smtweb-framework/bpm/doc/TODO.md similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/TODO.md rename to smtweb-framework/bpm/doc/TODO.md diff --git a/smtweb-framework/sw-system-bpm/doc/TODO20210714.md b/smtweb-framework/bpm/doc/TODO20210714.md similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/TODO20210714.md rename to smtweb-framework/bpm/doc/TODO20210714.md diff --git a/smtweb-framework/sw-system-bpm/doc/smt_asp20201229.txt b/smtweb-framework/bpm/doc/smt_asp20201229.txt similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/smt_asp20201229.txt rename to smtweb-framework/bpm/doc/smt_asp20201229.txt diff --git a/smtweb-framework/sw-system-bpm/doc/trans.sql b/smtweb-framework/bpm/doc/trans.sql similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/trans.sql rename to smtweb-framework/bpm/doc/trans.sql diff --git a/smtweb-framework/sw-system-bpm/doc/update20210907.sql b/smtweb-framework/bpm/doc/update20210907.sql similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/update20210907.sql rename to smtweb-framework/bpm/doc/update20210907.sql diff --git a/smtweb-framework/sw-system-bpm/doc/update20211122.sql b/smtweb-framework/bpm/doc/update20211122.sql similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/update20211122.sql rename to smtweb-framework/bpm/doc/update20211122.sql diff --git a/smtweb-framework/sw-system-bpm/doc/版本修改说明.md b/smtweb-framework/bpm/doc/版本修改说明.md similarity index 100% rename from smtweb-framework/sw-system-bpm/doc/版本修改说明.md rename to smtweb-framework/bpm/doc/版本修改说明.md diff --git a/smtweb-framework/sw-system-bpm/pom.xml b/smtweb-framework/bpm/pom.xml similarity index 100% rename from smtweb-framework/sw-system-bpm/pom.xml rename to smtweb-framework/bpm/pom.xml diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmApplication.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmApplication.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmApplication.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmApplication.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmAutoConfiguration.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmAutoConfiguration.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmAutoConfiguration.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmAutoConfiguration.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmConfigBean.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmConfigBean.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmConfigBean.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/BpmConfigBean.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/config/FileConfig.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/config/FileConfig.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/config/FileConfig.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/config/FileConfig.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileUploadController.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileUploadController.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileUploadController.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileUploadController.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/ImageAttachDao.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/ImageAttachDao.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/ImageAttachDao.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/ImageAttachDao.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/SysAttachDao.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/SysAttachDao.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/SysAttachDao.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/dao/SysAttachDao.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/AttachPathPO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/AttachPathPO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/AttachPathPO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/AttachPathPO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/FileDataVO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/FileDataVO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/FileDataVO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/FileDataVO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/UploadDataVO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/UploadDataVO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/UploadDataVO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/entity/UploadDataVO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/BeanUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/BeanUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/BeanUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/BeanUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FileDynPath.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FileDynPath.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FileDynPath.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FileDynPath.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FileFixPath.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FileFixPath.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FileFixPath.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FileFixPath.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathGenerator.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathGenerator.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathGenerator.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathGenerator.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/FilePathInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataLevelHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataLevelHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataLevelHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ITreeDataLevelHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/IdeaUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/IdeaUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/IdeaUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/IdeaUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/MemMultipartFile.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/MemMultipartFile.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/MemMultipartFile.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/MemMultipartFile.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ThumbImage.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ThumbImage.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/ThumbImage.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/ThumbImage.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/TreeDataUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/TreeDataUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/TreeDataUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/TreeDataUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/XmlUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/XmlUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/XmlUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/XmlUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/YamlUtil.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/YamlUtil.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/util/YamlUtil.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/YamlUtil.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogCache.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogCache.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogCache.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogCache.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHelper.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHelper.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHelper.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelCatalogTreeHelper.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseComboHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseComboHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseComboHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseComboHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelDatabaseService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectCache.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectCache.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectCache.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectCache.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelProjectService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableComboHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableComboHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableComboHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableComboHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableSaveHanlder.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableSaveHanlder.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableSaveHanlder.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableSaveHanlder.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/db/ModelTableService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/FlowConst.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/FlowConst.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/FlowConst.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/FlowConst.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProc.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProc.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProc.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProc.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcCache.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcCache.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcCache.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcCache.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ActivityInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ActivityInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ActivityInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ActivityInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/HandlerInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/HandlerInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/HandlerInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/HandlerInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ProcInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ProcInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ProcInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/ProcInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/SignInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/SignInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/SignInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/SignInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/TransInfo.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/TransInfo.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/TransInfo.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/define/TransInfo.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java similarity index 86% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java index eb81d5f..e7bcbd8 100644 --- a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java @@ -65,23 +65,9 @@ public class CodeBuildHandler extends AbstractHandler { ModelForm form = ModelFormCache.getInstance().get(pageId); if (form == null) throw new BizException("未找到指定的页面定义(" + pageId + ")!"); String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); + if (StringUtils.isEmpty(moduleName)) throw new BizException("此项目未定义Module!"); - if (StringUtils.isEmpty(moduleName) || SwConsts.DEF_DB_NAME.equals(moduleName) || moduleName.equals("bpm")) { - moduleName = "sw-system-bpm"; - } - BpmConfigBean bpmConfigBean = SpringUtil.getBean(BpmConfigBean.class); - Map mapIdeaModules = IdeaUtil.getModules(bpmConfigBean.getCodeJavaPath()); - if (mapIdeaModules == null || mapIdeaModules.isEmpty()) throw new BizException("没有定义idea项目的路径(smtweb.bpm.codeJavaPath)!"); - codeJavaPath = mapIdeaModules.get(moduleName); - if (StringUtils.isEmpty(codeJavaPath)) { - throw new BizException("没有找到对应项目在idea中Module的路径(" + moduleName + ")!"); - } - codeJavaPath += "/src/main/resources/static/event/" + moduleName + "/"; - //加上目录 - String cn = ModelCatalogCache.getInstance().getFullName(form.getMcId()); - if (StringUtils.isNotEmpty(cn)) { - codeJavaPath += cn.replaceAll("\\.", "/"); - } + codeJavaPath = ModelFormHelper.getEventPath(form); new File(codeJavaPath).mkdirs(); SwMap model = new SwMap(); @@ -102,9 +88,9 @@ public class CodeBuildHandler extends AbstractHandler { ModelForm form = ModelFormCache.getInstance().get(pageId); if (form == null) throw new BizException("未找到指定的页面定义(" + pageId + ")!"); String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); + if (StringUtils.isEmpty(moduleName)) throw new BizException("此项目未定义Module!"); - if (StringUtils.isEmpty(moduleName) || SwConsts.DEF_DB_NAME.equals(moduleName) || moduleName.equals("bpm")) { - moduleName = "sw-system-bpm"; + if (moduleName.equals("bpm")) { packageName = "cc.smtweb.system.bpm.web"; } else { packageName = "cc.smtweb.biz." + moduleName + ".web"; diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelForm.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelForm.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelForm.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelForm.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormCache.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormCache.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormCache.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormCache.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java similarity index 93% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java index 2c2e063..3ca35a9 100644 --- a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java @@ -1,6 +1,7 @@ package cc.smtweb.system.bpm.web.design.form; import cc.smtweb.framework.core.cache.AbstractCache; +import cc.smtweb.framework.core.common.SwConsts; import cc.smtweb.framework.core.common.SwEnum; import cc.smtweb.framework.core.exception.BizException; import cc.smtweb.framework.core.exception.SwException; @@ -13,7 +14,10 @@ import cc.smtweb.framework.core.session.UserSession; import cc.smtweb.framework.core.util.CommUtil; import cc.smtweb.framework.core.util.JsonUtil; import cc.smtweb.framework.core.util.MapUtil; +import cc.smtweb.framework.core.util.SpringUtil; +import cc.smtweb.system.bpm.spring.BpmConfigBean; import cc.smtweb.system.bpm.util.CodeGenerator; +import cc.smtweb.system.bpm.util.IdeaUtil; import cc.smtweb.system.bpm.web.design.db.ModelCatalogCache; import cc.smtweb.system.bpm.web.design.db.ModelProjectCache; import cc.smtweb.system.bpm.web.design.form.define.*; @@ -472,4 +476,24 @@ public class ModelFormHelper { ModelForm form = set.iterator().next(); return (form != null) ? form.getEntityId() : 0L; } + + //js文件的路径 + public String getJsPath(ModelForm form) { + if (form == null) throw new BizException("页面定义对象不能为空!"); + String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); + BpmConfigBean bpmConfigBean = SpringUtil.getBean(BpmConfigBean.class); + Map mapIdeaModules = IdeaUtil.getModules(bpmConfigBean.getCodeJavaPath()); + if (mapIdeaModules == null || mapIdeaModules.isEmpty()) throw new BizException("没有定义idea项目的路径(smtweb.bpm.codeJavaPath)!"); + String codeJavaPath = mapIdeaModules.get(moduleName); + if (StringUtils.isEmpty(codeJavaPath)) { + throw new BizException("没有找到对应项目在idea中Module的路径(" + moduleName + ")!"); + } + codeJavaPath += "/src/main/resources/static/event/" + moduleName + "/"; + //加上目录 + String cn = ModelCatalogCache.getInstance().getFullName(form.getMcId()); + if (StringUtils.isNotEmpty(cn)) { + codeJavaPath += cn.replaceAll("\\.", "/"); + } + return codeJavaPath; + } } diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java similarity index 61% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java index 896992e..32b55b2 100644 --- a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java @@ -5,7 +5,14 @@ import cc.smtweb.framework.core.exception.BizException; import cc.smtweb.framework.core.exception.SwException; import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.mvc.service.DefaultLoadHandler; +import cc.smtweb.framework.core.util.FileUtil; import cc.smtweb.framework.core.util.JsonUtil; +import cc.smtweb.system.bpm.web.design.db.ModelProjectCache; +import org.apache.commons.lang3.StringUtils; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; /** * Created by Akmm at 2022/5/9 16:17 @@ -60,4 +67,36 @@ public class ModelFormLoadHandler extends DefaultLoadHandler { if (bean == null) throw new BizException("没有找到指定控件定义!id=" + id); return R.success(ModelFormHelper.buildWidgetFilter(bean)); } + + //加载页面js方法 + public R loadJsFuncs() { + long pageId = params.readLong("pageId"); + ModelForm form = ModelFormCache.getInstance().get(pageId); + if (form == null) throw new BizException("未找到指定的页面定义(" + pageId + ")!"); + String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); + List listRet = new ArrayList<>(); + R r = R.success(listRet); + if (StringUtils.isEmpty(moduleName)) { + return r; + } + String path = ModelFormHelper.getEventPath(form) + "/" + form.getName() + ".js"; + String js = FileUtil.readFileStr(path); + if (StringUtils.isEmpty(js)) { + return r; + } + //解析,比如以【return 】 + int index = js.lastIndexOf("return "); + if (index < 0) { + return r; + } + index = js.indexOf("{", index); + js = js.substring(index + 1, js.indexOf("}", index)).trim(); + String[] fs = js.split(","); + for (String s: fs) { + if (StringUtils.isNotBlank(s)) { + listRet.add(s.trim()); + } + } + return R.success(listRet); + } } diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java similarity index 94% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java index 5ebb9b7..84b001e 100644 --- a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormService.java @@ -92,6 +92,16 @@ public class ModelFormService extends AbstractCompService { } } + //加载页面js方法 + public R loadJsFuncs(@SwBody SwMap params, UserSession us) { + try { + ModelFormLoadHandler handler = (ModelFormLoadHandler) getHandler(params, us, TYPE_LOAD); + return handler.loadJsFuncs(); + } catch (Exception e) { + return R.error("操作失败!", e); + } + } + //加载引擎用页面模型 public R model(@SwBody SwMap params, UserSession us) { try { diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetDynCond.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetDynCond.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetDynCond.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetDynCond.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetEnumData.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetEnumData.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetEnumData.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetEnumData.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetSortField.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetSortField.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetSortField.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetSortField.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasets.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasets.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasets.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasets.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageModel.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageModel.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageModel.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageModel.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/MenuVO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/MenuVO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/MenuVO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/MenuVO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/AbstractDynPageHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/AbstractDynPageHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/AbstractDynPageHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/AbstractDynPageHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageDelHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageDelHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageDelHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageDelHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CandidateEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CandidateEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CandidateEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CandidateEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CareEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CareEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CareEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CareEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CommentEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CommentEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CommentEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/CommentEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/ProcinstEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/ProcinstEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/ProcinstEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/ProcinstEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/SignEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/SignEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/SignEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/SignEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskRelEntity.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskRelEntity.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskRelEntity.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/define/TaskRelEntity.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginAckVO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginAckVO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginAckVO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginAckVO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginVO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginVO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginVO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginVO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/MenuPO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/MenuPO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/MenuPO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/MenuPO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/UserPO.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/UserPO.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/UserPO.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/UserPO.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/Area.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/Area.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/Area.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/Area.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaCache.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaCache.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaCache.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaCache.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaHandler.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaHandler.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaHandler.java diff --git a/smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaService.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaService.java rename to smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/area/AreaService.java diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/META-INF/spring.factories b/smtweb-framework/bpm/src/main/resources/META-INF/spring.factories similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/META-INF/spring.factories rename to smtweb-framework/bpm/src/main/resources/META-INF/spring.factories diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/dataset.ts b/smtweb-framework/bpm/src/main/resources/codegen/ts/dataset.ts similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/dataset.ts rename to smtweb-framework/bpm/src/main/resources/codegen/ts/dataset.ts diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/events.ts b/smtweb-framework/bpm/src/main/resources/codegen/ts/events.ts similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/events.ts rename to smtweb-framework/bpm/src/main/resources/codegen/ts/events.ts diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/formatter.ts b/smtweb-framework/bpm/src/main/resources/codegen/ts/formatter.ts similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/formatter.ts rename to smtweb-framework/bpm/src/main/resources/codegen/ts/formatter.ts diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/page.less b/smtweb-framework/bpm/src/main/resources/codegen/ts/page.less similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/page.less rename to smtweb-framework/bpm/src/main/resources/codegen/ts/page.less diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/page.types.ts b/smtweb-framework/bpm/src/main/resources/codegen/ts/page.types.ts similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/ts/page.types.ts rename to smtweb-framework/bpm/src/main/resources/codegen/ts/page.types.ts diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/dataset.ts.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/dataset.ts.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/dataset.ts.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/dataset.ts.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/events.ts.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/events.ts.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/events.ts.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/events.ts.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/index.vue.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/index.vue.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/index.vue.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/index.vue.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/router.ts.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/router.ts.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/router.ts.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/router.ts.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/CardService.java.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/server/CardService.java.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/CardService.java.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/server/CardService.java.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/ListService.java.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/server/ListService.java.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/ListService.java.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/server/ListService.java.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/TreeService.java.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/server/TreeService.java.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/TreeService.java.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/server/TreeService.java.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/entity.java.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/server/entity.java.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/entity.java.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/server/entity.java.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/event.js.vm b/smtweb-framework/bpm/src/main/resources/codegen/vm/server/event.js.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/codegen/vm/server/event.js.vm rename to smtweb-framework/bpm/src/main/resources/codegen/vm/server/event.js.vm diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/config/application.yaml b/smtweb-framework/bpm/src/main/resources/config/application.yaml similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/config/application.yaml rename to smtweb-framework/bpm/src/main/resources/config/application.yaml diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/config/logback.xml b/smtweb-framework/bpm/src/main/resources/config/logback.xml similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/config/logback.xml rename to smtweb-framework/bpm/src/main/resources/config/logback.xml diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js b/smtweb-framework/bpm/src/main/resources/static/event/defaultEvent.js similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js rename to smtweb-framework/bpm/src/main/resources/static/event/defaultEvent.js diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/index.html b/smtweb-framework/bpm/src/main/resources/static/index.html similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/index.html rename to smtweb-framework/bpm/src/main/resources/static/index.html diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/demo.ftl b/smtweb-framework/bpm/src/main/resources/static/template/demo.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/demo.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/demo.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_filter.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_filter.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_filter.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_filter.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_form.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_form.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_model.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/incModel/inc_model.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml b/smtweb-framework/bpm/src/main/resources/static/template/index.yaml similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml rename to smtweb-framework/bpm/src/main/resources/static/template/index.yaml diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_bean.ftl b/smtweb-framework/bpm/src/main/resources/static/template/java_bean.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_bean.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/java_bean.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_cache.ftl b/smtweb-framework/bpm/src/main/resources/static/template/java_cache.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_cache.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/java_cache.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_service.ftl b/smtweb-framework/bpm/src/main/resources/static/template/java_service.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/java_service.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/java_service.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/js_event.ftl b/smtweb-framework/bpm/src/main/resources/static/template/js_event.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/js_event.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/js_event.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_card.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_simple.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl similarity index 100% rename from smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_simple.ftl rename to smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/BpmTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/BpmTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/BpmTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/BpmTest.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/BuildJavaBean.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/BuildJavaBean.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/BuildJavaBean.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/BuildJavaBean.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/HexTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/HexTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/HexTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/HexTest.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/ModelFormTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/ModelFormTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/ModelFormTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/ModelFormTest.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/SpelTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/SpelTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/SpelTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/SpelTest.java diff --git a/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java new file mode 100644 index 0000000..9b2943c --- /dev/null +++ b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java @@ -0,0 +1,110 @@ +package cc.smtweb.system.bpm.test; + +import cc.smtweb.framework.core.util.JsonUtil; +import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; +import cc.smtweb.system.bpm.web.design.form.define.PageDatasetDynCond; + +import java.util.Collections; + +/** + * Created by Akmm at 2021/12/25 22:21 + */ +public class TestMain { + + public static void main(String[] args) throws Exception { + String js = "// 注册事件类\n" + + "window.$swEvent.setup(\"defaultEvent\", {\n" + + " /**\n" + + " *\n" + + " * @param page 当前页面对象\n" + + " * 1)page.$params 参数对象\n" + + " * 示例:给参数p1赋值: page.$params.p1 = “xxxx”;\n" + + " *\n" + + " * 2)page.$refs 控件的ref引用,ref引用指向控件的实例,可访问控件实例的属性和函数\n" + + " * 示例:调用页面的 标签的validate方法: page.$refs.form1.validate()\n" + + " *\n" + + " * 3)page.$model 数据集,内含data(数据对象)和dataset(数据集定义)\n" + + " * 示例: 获取数据集ds1的表单数据 page.$model.ds1.data.form\n" + + " * 获取数据集ds1的列表数据 page.$model.ds1.data.list\n" + + " * 获取数据集ds1表单中a1的值 page.$model.ds1.getFormVal(\"a1\")\n" + + " * 给数据集ds1的表中的a1赋值 page.$model.ds1.setFormVal(\"a1\",\"xxxx\");\n" + + " *\n" + + " * 4)page.$widgets 控件的属性,控制控件的响应属性\n" + + " * 示例 : 获取控件名为w1的required属性的值 page.$widgets.w1.required\n" + + " *\n" + + " * 5)page.$utils 工具包\n" + + " * $$message 消息提示\n" + + " * $$cookie, cookie\n" + + " * $$driver, 用户操作引导引擎\n" + + " * $$http, http请求\n" + + " * $$validate, 校验\n" + + " * $$date, 日期处理工具\n" + + " * $$UtilPub, 其他\n" + + " * 示例:\n" + + " * 弹出成功消息框:page.$utils.$$message.notify.success(\"xxx\")\n" + + " * post请求:page.$utils.$$http.post(\"/api/bpm/save\",{id:\"xxx\"})\n" + + " *\n" + + " * 6)page.$tabRouter 页面路由,控制页面切换\n" + + " * 示例:跳转到登录页:page.$tabRouter.push(\"login\");\n" + + " * 返回: page.$tabRouter.back();\n" + + " *\n" + + " * 7) page.$api 页面提供的公用api\n" + + " * add: () => void 页面新增初始化(所有可编辑的数据集)\n" + + " * addOne: (dataset: string) => void 指定数据集新增初始\n" + + " * load: (force?: boolean, params?: any) => void // 页面加载\n" + + " * loadOne: (dataset: string, params?: any) => void // 指定数据集加载\n" + + " * total: (dataset: string, params?: any) => void // 指定数据集求合计栏信息\n" + + " * save: (params?: any) => void // 页面保存 (所有可编辑的数据集)\n" + + " * saveOne: (dataset: string, params?: any) => void // 指定数据集保存\n" + + " * del: () => void 页面删除\n" + + " * delOne: (dataset: string, row?: any) => void // 指定数据集删除\n" + + " * closeDialog: (dialogKey?: string) => void // 关闭弹出框\n" + + " * 示例:\n" + + " * 加载数据集ds1:page.$api.loadOne(\"ds1\");\n" + + " *\n" + + " * @returns 返回给页面可配置的api方法\n" + + " * 如 : return {\n" + + " * demoFunc(){\n" + + " * XXXX\n" + + " * },\n" + + " * }\n" + + " */\n" + + " setup(page){\n" + + " const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api } = page;\n" + + " const { $$message, $$http } = $utils || {};\n" + + " // 示例\n" + + " const demoFunc = () => {\n" + + " // 1.从参数中获取p1\n" + + " const p1 = $params.p1;\n" + + " // 2.从控件w1获取color属性\n" + + " const color = $widgets.w1.props.color;\n" + + " // 3.调用控件w1的calc函数\n" + + " const calcVal = $refs.w1.calc(p1,color);\n" + + " // 4.数据集ds1加载数据\n" + + " $api.loadOne(\"ds1\");\n" + + " // 5.给数据集ds1的表单中的f1字段赋值calcVal\n" + + " $model.ds1.setFormVal(\"f1\",calcVal);\n" + + " // 6.获取数据集ds1的表单数据\n" + + " const data = $model.ds1.data.form || {};\n" + + " // 7.调用http交互\n" + + " $$http.post(\"ap1/demo/doOpt\",data).then((rt) => {\n" + + " // 8.弹出成功消息\n" + + " $$message.notify.success(\"操作成功\");\n" + + " // 9.返回上一个页面\n" + + " $tabRouter.back();\n" + + " });\n" + + " };\n" + + " return {\n" + + " demoFunc, demoFunc1, demoFunc2,\n" + + " }\n" + + " }\n" + + "});"; + int index = js.lastIndexOf("return "); + if (index < 0) { + return; + } + index = js.indexOf("{", index); + js = js.substring(index + 1, js.indexOf("}", index)).trim(); + System.out.println(js.split(",")); + } +} diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/ToolTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/ToolTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/ToolTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/ToolTest.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/TreeDataBuilderTest.java b/smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/TreeDataBuilderTest.java similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/TreeDataBuilderTest.java rename to smtweb-framework/bpm/src/test/java/cc/smtweb/system/bpm/test/TreeDataBuilderTest.java diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/code/index.vue b/smtweb-framework/bpm/src/test/resources/code/index.vue similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/code/index.vue rename to smtweb-framework/bpm/src/test/resources/code/index.vue diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/code/index.vue.tmp b/smtweb-framework/bpm/src/test/resources/code/index.vue.tmp similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/code/index.vue.tmp rename to smtweb-framework/bpm/src/test/resources/code/index.vue.tmp diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/code/list.xml b/smtweb-framework/bpm/src/test/resources/code/list.xml similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/code/list.xml rename to smtweb-framework/bpm/src/test/resources/code/list.xml diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/db/smt_uc.json b/smtweb-framework/bpm/src/test/resources/db/smt_uc.json similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/db/smt_uc.json rename to smtweb-framework/bpm/src/test/resources/db/smt_uc.json diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/template/index.vm b/smtweb-framework/bpm/src/test/resources/template/index.vm similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/template/index.vm rename to smtweb-framework/bpm/src/test/resources/template/index.vm diff --git a/smtweb-framework/sw-system-bpm/src/test/resources/ui/508660168293093376.json b/smtweb-framework/bpm/src/test/resources/ui/508660168293093376.json similarity index 100% rename from smtweb-framework/sw-system-bpm/src/test/resources/ui/508660168293093376.json rename to smtweb-framework/bpm/src/test/resources/ui/508660168293093376.json diff --git a/smtweb-framework/sw-framework-core/pom.xml b/smtweb-framework/core/pom.xml similarity index 100% rename from smtweb-framework/sw-framework-core/pom.xml rename to smtweb-framework/core/pom.xml diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreApplication.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/CoreApplication.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreApplication.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/CoreApplication.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwAttr.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwAttr.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwAttr.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwAttr.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwBean.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwBean.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwBean.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwBean.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwBody.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwBody.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwBody.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwBody.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwColumn.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwColumn.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwColumn.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwColumn.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwConstruct.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwConstruct.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwConstruct.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwConstruct.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwDestroy.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwDestroy.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwDestroy.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwDestroy.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwParam.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwParam.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwParam.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwParam.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwPerm.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwPerm.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwPerm.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwPerm.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwScheduling.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwScheduling.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwScheduling.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/annotation/SwScheduling.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/ISwCache.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/ISwCache.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/ISwCache.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/ISwCache.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/SessionCache.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/SessionCache.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/SessionCache.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/SessionCache.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisBroadcastEvent.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisBroadcastEvent.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisBroadcastEvent.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisBroadcastEvent.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisPooledObjectFactory.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisPooledObjectFactory.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisPooledObjectFactory.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisPooledObjectFactory.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisSysTask.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisSysTask.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisSysTask.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisSysTask.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/AbstractEnum.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/AbstractEnum.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/AbstractEnum.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/AbstractEnum.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/IntEnum.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/IntEnum.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/IntEnum.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/IntEnum.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/R.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/R.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/R.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/R.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/StrEnum.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/StrEnum.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/StrEnum.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/StrEnum.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwIpAddr.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwIpAddr.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwIpAddr.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwIpAddr.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwMap.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwMap.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwMap.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwMap.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/DbEngine.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/DbEngine.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/DbEngine.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/DbEngine.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/EntityDao.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityDao.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/EntityDao.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityDao.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/EntityCache.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/cache/EntityCache.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/EntityCache.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/cache/EntityCache.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/ModelDatabaseCache.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/cache/ModelDatabaseCache.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/ModelDatabaseCache.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/cache/ModelDatabaseCache.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/config/DbEngineConfiguration.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/config/DbEngineConfiguration.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/config/DbEngineConfiguration.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/config/DbEngineConfiguration.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/config/YamlPropertyLoaderFactory.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/config/YamlPropertyLoaderFactory.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/config/YamlPropertyLoaderFactory.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/config/YamlPropertyLoaderFactory.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/AbstractEntityDao.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/dao/AbstractEntityDao.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/AbstractEntityDao.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/dao/AbstractEntityDao.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumnForeign.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumnForeign.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumnForeign.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumnForeign.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DatabaseUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DatabaseUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DatabaseUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DatabaseUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultDatabaseInfoImpl.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultDatabaseInfoImpl.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultDatabaseInfoImpl.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultDatabaseInfoImpl.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/IDatabaseInfo.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/IDatabaseInfo.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/IDatabaseInfo.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/impl/IDatabaseInfo.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/AbsDbWorker.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/AbsDbWorker.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/AbsDbWorker.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/AbsDbWorker.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/IDbWorker.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/IDbWorker.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/IDbWorker.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/IDbWorker.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcEngine.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcEngine.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcEngine.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcEngine.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/MapPropertyRowMapper.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/MapPropertyRowMapper.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/MapPropertyRowMapper.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/MapPropertyRowMapper.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/SwMapPropertyRowMapper.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/SwMapPropertyRowMapper.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/SwMapPropertyRowMapper.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/jdbc/SwMapPropertyRowMapper.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractSelectSqlBuilder.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractSelectSqlBuilder.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractSelectSqlBuilder.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractSelectSqlBuilder.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractUpdateSqlBuilder.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractUpdateSqlBuilder.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractUpdateSqlBuilder.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/AbstractUpdateSqlBuilder.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/InsertSqlBuilder.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/InsertSqlBuilder.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/InsertSqlBuilder.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/InsertSqlBuilder.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SelectSqlBuilder.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SelectSqlBuilder.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SelectSqlBuilder.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SelectSqlBuilder.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlFieldValue.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlFieldValue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlFieldValue.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlFieldValue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinField.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinField.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinField.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinField.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinTable.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinTable.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinTable.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlJoinTable.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlWhereValue.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlWhereValue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlWhereValue.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlWhereValue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelIndex.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelIndex.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelIndex.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelIndex.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelLinkName.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelLinkName.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelLinkName.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/vo/ModelLinkName.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BindParamException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/BindParamException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BindParamException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/BindParamException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BizException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/BizException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BizException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/BizException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/ExceptionMessage.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/ExceptionMessage.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/ExceptionMessage.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/ExceptionMessage.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/SwException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/SwException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/SwException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/exception/SwException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/ISchedulerWakeup.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/ISchedulerWakeup.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/ISchedulerWakeup.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/ISchedulerWakeup.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/GlobalExceptionHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/config/GlobalExceptionHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/GlobalExceptionHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/config/GlobalExceptionHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/WebMvcConfig.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/config/WebMvcConfig.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/WebMvcConfig.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/config/WebMvcConfig.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiConfigBean.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiConfigBean.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiConfigBean.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiConfigBean.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/DefaultPageController.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/DefaultPageController.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/DefaultPageController.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/DefaultPageController.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/ControllerAccess.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/ControllerAccess.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/ControllerAccess.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/ControllerAccess.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IMethodAccess.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IMethodAccess.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IMethodAccess.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IMethodAccess.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodAccess.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodAccess.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodAccess.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodAccess.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/BeanContext.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/BeanContext.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/BeanContext.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/BeanContext.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/ParamEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/ParamEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/ParamEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/ParamEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/AbstractContextEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/AbstractContextEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/AbstractContextEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/AbstractContextEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/BeanEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/BeanEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/BeanEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/BeanEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/HttpServletRequestEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/HttpServletRequestEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/HttpServletRequestEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/HttpServletRequestEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/NullEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/NullEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/NullEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/NullEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/SwIpAddrEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/SwIpAddrEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/SwIpAddrEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/SwIpAddrEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/SwMapBodyEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/SwMapBodyEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/SwMapBodyEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/SwMapBodyEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractNumberEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractNumberEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractNumberEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractNumberEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractParameterEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractParameterEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractParameterEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractParameterEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractRequestEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractRequestEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractRequestEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/AbstractRequestEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BooleanEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BooleanEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BooleanEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BooleanEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ByteEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ByteEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ByteEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ByteEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/CharEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/CharEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/CharEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/CharEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DoubleEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DoubleEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DoubleEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DoubleEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/LongEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/LongEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/LongEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/LongEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimeEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimeEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimeEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimeEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimestampEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimestampEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimestampEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/TimestampEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/path/PathParamEditor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/path/PathParamEditor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/path/PathParamEditor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/path/PathParamEditor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/BeanManager.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/BeanManager.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/BeanManager.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/BeanManager.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ClassParser.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ClassParser.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ClassParser.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ClassParser.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanAction.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanAction.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanAction.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanAction.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanActionBuilder.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanActionBuilder.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanActionBuilder.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/IScanActionBuilder.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/MethodParser.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/MethodParser.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/MethodParser.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/MethodParser.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/PackageScanner.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/PackageScanner.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/PackageScanner.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/PackageScanner.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ScanContext.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ScanContext.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ScanContext.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ScanContext.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/IRealmLoader.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/IRealmLoader.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/IRealmLoader.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/IRealmLoader.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthenticationException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthenticationException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthenticationException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthenticationException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthorizationException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthorizationException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthorizationException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/AuthorizationException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnauthenticatedException.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnauthenticatedException.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnauthenticatedException.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnauthenticatedException.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AbstractPermInterceptor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AbstractPermInterceptor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AbstractPermInterceptor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AbstractPermInterceptor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AuthorizationInterceptor.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AuthorizationInterceptor.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AuthorizationInterceptor.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/AuthorizationInterceptor.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermCheckItem.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermCheckItem.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermCheckItem.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermCheckItem.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermChecker.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermChecker.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermChecker.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/realm/service/PermChecker.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJob.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJob.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJob.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJob.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobQueue.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobQueue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobQueue.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobQueue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/FixedTimerTask.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/FixedTimerTask.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/FixedTimerTask.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/FixedTimerTask.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerPoint.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerPoint.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerPoint.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerPoint.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerTaskManager.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerTaskManager.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerTaskManager.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/SchedulerTaskManager.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJobQueue.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJobQueue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJobQueue.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJobQueue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJob.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJob.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJob.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJob.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJobQueue.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJobQueue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJobQueue.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/SimpleJobQueue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompProvider.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompProvider.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompProvider.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompProvider.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractDelHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractDelHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractDelHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractDelHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractListHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractListHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractListHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractListHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractLoadHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractLoadHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractLoadHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractLoadHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultComboHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultComboHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultComboHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultComboHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultListHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultListHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultListHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultListHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultLoadHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultLoadHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultLoadHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultLoadHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultSaveHandler.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultSaveHandler.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultSaveHandler.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultSaveHandler.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/IDataProvider.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/IDataProvider.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/IDataProvider.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/IDataProvider.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/IWorker.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/IWorker.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/IWorker.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/IWorker.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlPara.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlPara.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlPara.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlPara.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SwListData.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SwListData.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SwListData.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/SwListData.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/TreeHelper.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/TreeHelper.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/TreeHelper.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/TreeHelper.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/list/FooterField.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/list/FooterField.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/list/FooterField.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/service/list/FooterField.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/ICalcVar.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/ICalcVar.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/ICalcVar.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/ICalcVar.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariable.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariable.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariable.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariable.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariableFactory.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariableFactory.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariableFactory.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/mvc/variable/SwVariableFactory.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/SessionManager.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/SessionManager.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/SessionManager.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/SessionManager.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/SessionUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/SessionUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/SessionUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/SessionUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/UserSessionArgumentResolver.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/UserSessionArgumentResolver.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/UserSessionArgumentResolver.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/session/UserSessionArgumentResolver.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/SysTaskManager.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysTaskManager.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/SysTaskManager.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysTaskManager.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/WebStartedEvent.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/WebStartedEvent.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/WebStartedEvent.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/WebStartedEvent.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/CommUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/CommUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/CommUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/CommUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/IpAddrUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/IpAddrUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/IpAddrUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/IpAddrUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/JsonUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/JsonUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/JsonUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/JsonUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/NumberUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/NumberUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/NumberUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/NumberUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/SpringUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/SpringUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/SpringUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/SpringUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/VariableUtil.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/VariableUtil.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/VariableUtil.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/VariableUtil.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/BaseBeanSerializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/BaseBeanSerializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/BaseBeanSerializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/BaseBeanSerializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/DateDeserializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/DateDeserializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/DateDeserializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/DateDeserializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/LongDeserializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/LongDeserializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/LongDeserializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/LongDeserializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/LongSerializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/LongSerializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/LongSerializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/LongSerializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/NullSerializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/NullSerializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/NullSerializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/NullSerializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/TimestampDeserializer.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/TimestampDeserializer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/TimestampDeserializer.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/jackson/TimestampDeserializer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/kryo/KryoTool.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/kryo/KryoTool.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/kryo/KryoTool.java rename to smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/kryo/KryoTool.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/AbstractTimerTrigger.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/AbstractTimerTrigger.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/AbstractTimerTrigger.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/AbstractTimerTrigger.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/CronExpression.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/CronExpression.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/CronExpression.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/CronExpression.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/FixedRateTrigger.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/FixedRateTrigger.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/FixedRateTrigger.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/FixedRateTrigger.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ModelTimeoutClient.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/ModelTimeoutClient.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ModelTimeoutClient.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/ModelTimeoutClient.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ModelTimeoutTask.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/ModelTimeoutTask.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ModelTimeoutTask.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/ModelTimeoutTask.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/NonConcurrentTask.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/NonConcurrentTask.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/NonConcurrentTask.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/NonConcurrentTask.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/OneTimeTrigger.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/OneTimeTrigger.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/OneTimeTrigger.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/OneTimeTrigger.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/RealTimeTimer.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/RealTimeTimer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/RealTimeTimer.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/RealTimeTimer.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SystemTimeSource.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/SystemTimeSource.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SystemTimeSource.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/SystemTimeSource.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TaskQueue.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/TaskQueue.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TaskQueue.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/TaskQueue.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimeSource.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/TimeSource.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimeSource.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/TimeSource.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerTask.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/TimerTask.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerTask.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/TimerTask.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/SingleExecutorSingleWaiter.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/sync/SingleExecutorSingleWaiter.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/SingleExecutorSingleWaiter.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/sync/SingleExecutorSingleWaiter.java diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/Synchronizer.java b/smtweb-framework/core/src/main/java/com/serotonin/timer/sync/Synchronizer.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/Synchronizer.java rename to smtweb-framework/core/src/main/java/com/serotonin/timer/sync/Synchronizer.java diff --git a/smtweb-framework/sw-framework-core/src/main/resources/META-INF/spring.factories b/smtweb-framework/core/src/main/resources/META-INF/spring.factories similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/resources/META-INF/spring.factories rename to smtweb-framework/core/src/main/resources/META-INF/spring.factories diff --git a/smtweb-framework/sw-framework-core/src/main/resources/config/application-dev.yaml b/smtweb-framework/core/src/main/resources/config/application-dev.yaml similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/resources/config/application-dev.yaml rename to smtweb-framework/core/src/main/resources/config/application-dev.yaml diff --git a/smtweb-framework/sw-framework-core/src/main/resources/config/application-prod.yaml b/smtweb-framework/core/src/main/resources/config/application-prod.yaml similarity index 100% rename from smtweb-framework/sw-framework-core/src/main/resources/config/application-prod.yaml rename to smtweb-framework/core/src/main/resources/config/application-prod.yaml diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/DaoTransTest.java b/smtweb-framework/core/src/test/java/cc/smtweb/framework/test/DaoTransTest.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/DaoTransTest.java rename to smtweb-framework/core/src/test/java/cc/smtweb/framework/test/DaoTransTest.java diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/NamedJdbcTest.java b/smtweb-framework/core/src/test/java/cc/smtweb/framework/test/NamedJdbcTest.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/NamedJdbcTest.java rename to smtweb-framework/core/src/test/java/cc/smtweb/framework/test/NamedJdbcTest.java diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/SqlBuilderTest.java b/smtweb-framework/core/src/test/java/cc/smtweb/framework/test/SqlBuilderTest.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/SqlBuilderTest.java rename to smtweb-framework/core/src/test/java/cc/smtweb/framework/test/SqlBuilderTest.java diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/ToolEnum2Js.java b/smtweb-framework/core/src/test/java/cc/smtweb/framework/test/ToolEnum2Js.java similarity index 100% rename from smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/ToolEnum2Js.java rename to smtweb-framework/core/src/test/java/cc/smtweb/framework/test/ToolEnum2Js.java diff --git a/smtweb-framework/sw-framework-core/doc/TODO.mk b/smtweb-framework/sw-framework-core/doc/TODO.mk deleted file mode 100644 index 4f5bf71..0000000 --- a/smtweb-framework/sw-framework-core/doc/TODO.mk +++ /dev/null @@ -1,8 +0,0 @@ -20210710 - -1. 定时器手动触发 (done) -2. 优化BeanReadUtils的TableName预先进行转换 -2. updateEntity支持悲观锁,并能抛出异常 -3. 缓存支持自定义 key -4. 序列号生成器 -5. redis配置database(0~15) (done) diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreApplicationStartedListener.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreApplicationStartedListener.java deleted file mode 100644 index e53645a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreApplicationStartedListener.java +++ /dev/null @@ -1,37 +0,0 @@ -package cc.smtweb.framework.core; - -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.db.impl.DatabaseUtil; -import cc.smtweb.framework.core.mvc.controller.scan.ApplicationScanner; -import cc.smtweb.framework.core.systask.TaskStartEvent; -import cc.smtweb.framework.core.systask.WebStartedEvent; -import lombok.SneakyThrows; -import org.springframework.boot.context.event.ApplicationStartedEvent; -import org.springframework.context.ApplicationListener; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.stereotype.Component; - -/** - * 执行接口扫描任务 - */ -@Component -public class CoreApplicationStartedListener implements ApplicationListener { - @SneakyThrows - @Override - public void onApplicationEvent(ApplicationStartedEvent event) { - System.out.println("onApplicationEvent============="); - ConfigurableApplicationContext applicationContext = event.getApplicationContext(); - - applicationContext.publishEvent(new TaskStartEvent()); - //包扫描 - ApplicationScanner.scan(applicationContext); - //初始化数据库 - new DatabaseUtil(true, false).checkDb(); - //初始化缓存 - CacheManager.getIntance().init(); - - // 通知 controller 正式使用 - applicationContext.publishEvent(new WebStartedEvent()); - System.out.println("start end============="); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreAutoConfiguration.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreAutoConfiguration.java deleted file mode 100644 index f576544..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/CoreAutoConfiguration.java +++ /dev/null @@ -1,33 +0,0 @@ -package cc.smtweb.framework.core; - -import cc.smtweb.framework.core.db.jdbc.IdGenerator; -import cc.smtweb.framework.core.mvc.config.ControllerConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.EnableScheduling; - -/** - * @author kevin - */ -@Configuration -@ComponentScan -@EnableScheduling -public class CoreAutoConfiguration { - /** - * ID生成器的分步式机器码(1-1023) - */ - @Value("${smtweb.machine-id}") - private int machineId; - - @Bean - public IdGenerator idGenerator() { - return new IdGenerator(machineId); - } - - @Bean - public ControllerConfig coreControllerConfig() { - return new ControllerConfig("core", "cc.smtweb.framework.core"); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwAction.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwAction.java deleted file mode 100644 index 112ed75..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwAction.java +++ /dev/null @@ -1,21 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 配置在@SwService中的函数,对应API请求,默认公用函数不用配置拦截器的函数, - * 也可以作为拦截实现的基类 - * @author kevin - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface SwAction { - /** - * 重写API请求地址,不配置使用: 服务类地址 + “/” + 函数名 - * @return API请求地址 - */ - String value() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwCache.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwCache.java deleted file mode 100644 index b6dbbd4..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwCache.java +++ /dev/null @@ -1,26 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 被该注释修饰的类提供缓存服务 - * - * @author kevin - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface SwCache { - //唯一标识 - String ident(); - //标题,展示用 - String title(); - //依赖的缓存ident,多个用英文逗号分隔 - String depends() default ""; - //是否懒加载 - boolean lazy() default false; - //失效时间,单位分钟 - long timeout() default 0; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwColumnForeign.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwColumnForeign.java deleted file mode 100644 index fa1ada1..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwColumnForeign.java +++ /dev/null @@ -1,21 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 被该注释修饰的方法对应了外键表名和字段名,名称可选 - * @author kevin - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD}) -public @interface SwColumnForeign { - // 外键表名 - String table() default ""; - // ID字段名 - String id() default ""; - // 唯一名称字段名 - String code() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwHeaderParam.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwHeaderParam.java deleted file mode 100644 index 69af9d4..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwHeaderParam.java +++ /dev/null @@ -1,16 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.*; - - -/** - * 路径注解 - * @author kevin - * - */ -@Target( { ElementType.PARAMETER, ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface SwHeaderParam { - String value() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwPathParam.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwPathParam.java deleted file mode 100644 index c4ced93..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwPathParam.java +++ /dev/null @@ -1,16 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.*; - - -/** - * 路径注解 - * @author kevin - * - */ -@Target( { ElementType.PARAMETER, ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface SwPathParam { -// String value() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwService.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwService.java deleted file mode 100644 index ba25e6c..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwService.java +++ /dev/null @@ -1,16 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 被该注释修饰的类提供控制器服务 - * @author kevin - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface SwService { - String value() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwTable.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwTable.java deleted file mode 100644 index 464f322..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/annotation/SwTable.java +++ /dev/null @@ -1,17 +0,0 @@ -package cc.smtweb.framework.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 被该注释修饰的类对应了数据库表名(库+表的形式,如 sw_user.sys_user) - * @author kevin - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface SwTable { - /** 库名+表名 */ - String value() default ""; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/AbstractEntityCache.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/AbstractEntityCache.java deleted file mode 100644 index 744b0a1..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/AbstractEntityCache.java +++ /dev/null @@ -1,54 +0,0 @@ -package cc.smtweb.framework.core.cache; - -import cc.smtweb.framework.core.common.SwConsts; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.EntityDao; -import cc.smtweb.framework.core.db.impl.DefaultEntity; - -import java.util.List; - -/** - * Created by Akmm at 2022/6/16 15:53 - */ -public class AbstractEntityCache extends AbstractCache { - @Override - protected String getId(T bean) { - return String.valueOf(bean.getEntityId()); - } - - private String getCacheKey(T bean, String fields) { - String[] fs = fields.split(","); - String ret = ""; - for (String f: fs) { - ret += SwConsts.SPLIT_CHAR + bean.getStr(f); - } - return ret.substring(SwConsts.SPLIT_CHAR.length()); - } - - /** - * 注册其他key的List缓存,如tree的children - * - * @param key - * @param fields - */ - protected void regList(String key, String fields) { - regList(key, bean -> getCacheKey(bean, fields)); - } - - /** - * 注册其他key的Map缓存,如按code缓存 - * - * @param key - * @param fields - */ - - protected void regMap(String key, String fields) { - regMap(key, bean -> getCacheKey(bean, fields)); - } - - @Override - protected List loadAll() { - EntityDao dao = DbEngine.getInstance().findDao(pTypeClass); - return dao.query(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/SessionCacheFactory.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/SessionCacheFactory.java deleted file mode 100644 index 8ad6fdc..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/SessionCacheFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -package cc.smtweb.framework.core.cache; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Created by Akmm at 2022/3/14 10:42 - */ -public class SessionCacheFactory { - private static SessionCacheFactory INSTANCE = null; - private Map buffer = new ConcurrentHashMap<>(); - - private SessionCacheFactory() { - } - - /*获取单例*/ - public static SessionCacheFactory getInstance() { - if (INSTANCE == null) { - synchronized (SessionCacheFactory.class) { - if (INSTANCE == null) { - INSTANCE = new SessionCacheFactory(); - } - } - } - return INSTANCE; - } - - //得到用户缓存对象 - public SessionCache getUserCache(long userId) { - return getUserCache(userId, 0L); - } - - public SessionCache getUserCache(long userId, long timeout) { - SessionCache cache; - - cache = buffer.get(userId); - if (cache == null) { - cache = buffer.get(userId); - if (cache != null) return cache; - cache = new SessionCache(timeout); - buffer.put(userId, cache); - } - return cache; - - } - - //删除用户缓存 - public void remove(String userId) { - buffer.remove(userId); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisConnection.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisConnection.java deleted file mode 100644 index 25a4701..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisConnection.java +++ /dev/null @@ -1,300 +0,0 @@ -package cc.smtweb.framework.core.cache.redis; - -import cc.smtweb.framework.core.util.CommUtil; -import io.lettuce.core.KeyValue; -import io.lettuce.core.SetArgs; -import io.lettuce.core.api.sync.RedisCommands; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author kevin - */ -@Slf4j -public class RedisConnection { - public static final int DEL_COUNT = 200; - private RedisCommands redis; - - public RedisConnection(RedisCommands redisCommands) { - this.redis = redisCommands; - } - - /** - * 获取指定key对应的值,并更新超时时间 - * - * @param key 关键字KEY - * @return byte[] 对象 - */ - public byte[] get(String key) { - byte[] binKey = getBytes(key); - return redis.get(binKey); - } - -// public T get(String key, Class clazz) { -// byte[] b = get(key); -// if (b != null) { -// return this.readObject(b, clazz); -// } -// -// return null; -// } - - public boolean expire(String key, int expireSec) { - byte[] bkey = getBytes(key); - return redis.expire(bkey, expireSec); - } - - /** - * 设置指定key对应的值,并更新超时时间 - * - * @param key 关键字KEY - * @param value 值 - * @param seconds 超时删除时间(秒) - * @return boolean 是否设置成功 - */ - public boolean set(byte[] key, byte[] value, int seconds) { - if (value != null) { - Boolean result = Boolean.FALSE; - String ret; - if (seconds > 0) { - ret = redis.setex(key, seconds, value); - } else { - ret = redis.set(key, value); - } - - if ("OK".equals(ret)) { - result = Boolean.TRUE; - } - - return result; - } else { - Long ret = redis.del(key); - - return (ret != null && ret == 1L); - } - } - - public boolean setnx(byte[] key, byte[] value, int seconds) { - if (value != null) { - Boolean result = Boolean.FALSE; - String ret; - if (seconds > 0) { - ret = redis.set(key, value, new SetArgs().ex(seconds).nx()); - if ("OK".equals(ret)) { - result = Boolean.TRUE; - } - } else { - result = redis.setnx(key, value); - } - - return result; - } else { - Long ret = redis.del(key); - - return (ret != null && ret == 1L); - } - } - - public boolean setnx(String key, T obj, int seconds) { - return setnx(getBytes(key), CommUtil.writeObject(obj), seconds); - } - - private byte[] getBytes(String key) { - return key.getBytes(StandardCharsets.UTF_8); - } - - /** - * 获取指定key对应的值,并更新超时时间 - * - * @param keys 关键字KEY - * @return byte[] 对象 - */ - public List> mget(String[] keys, int expireSec) { - byte[][] bkeys = new byte[keys.length][]; - for (int i = 0; i < keys.length; i++) { - bkeys[i] = getBytes(keys[i]); - } - - List> result = redis.mget(bkeys); - - if (result != null && expireSec > 0) { - redis.expire(bkeys[0], expireSec); - } - - return result; - } - - /** - * 获取指定key里指定的域对应的值。 此时,key对应的存储对象是map。 - * - * @param key redis关键字KEY - * @param field map的KEY值 - * @return byte[] 对象 - */ - public byte[] hGet(String key, String field) { - return redis.hget(getBytes(key), getBytes(field)); - } - - public List hVals(String key) { - return redis.hvals(getBytes(key)); - } - - public boolean exists(String key) { - return redis.exists(getBytes(key)) == 1; - } - - static byte[] writeObject(Serializable obj) { - return CommUtil.writeObject(obj); - } - - static T readObject(byte[] value, Class clazz) { - return CommUtil.readObject(value, clazz); - } - - public boolean set(String key, T obj, int seconds) { - return set(getBytes(key), CommUtil.writeObject(obj), seconds); - } - - public boolean del(String key) { - Long ret = redis.del(getBytes(key)); - return (ret != null && ret > 0); - } - - public Long delKeys(String... keys) { -// Long[] result = new Long[keys.length]; - - byte[][] batchKey = new byte[keys.length][]; - - for (int i = 0; i < keys.length; i++) { - batchKey[i] = getBytes(keys[i]); - } - - return redis.del(batchKey); - } - - public boolean hSet(String key, byte[] field, byte[] value) { - return redis.hset(getBytes(key), field, value); - } - - private boolean lhmSet(String key, Map values) { - String ret = redis.hmset(getBytes(key), values); - return "OK".equals(ret); - } - - public boolean hmSet(String key, Map values) { - boolean ret = true; - if (values == null || values.isEmpty()) { - return ret; - } - final int size = 200; - Map map = new HashMap<>(size); - int count = 0; - for (Map.Entry e : values.entrySet()) { - map.put(getBytes(e.getKey()), CommUtil.writeObject(e.getValue())); - if (++count >= size) { - ret = ret && lhmSet(key, map); - count = 0; - map.clear(); - } - } - if (count > 0) { - ret = ret && lhmSet(key, map); - } - return ret; - } - - /** - * 获取指定key里指定的域对应的值,并转换为指定对象 此时,key对应的存储对象是map。 - * - * @param key redis关键字KEY - * @param field map的KEY值 - * @param clazz 对象存储类型 - * @return T 对象 - */ - public T hGet(String key, String field, Class clazz) { - return CommUtil.readObject(hGet(key, field), clazz); - } - - public boolean hSet(String key, String field, Serializable value) { - return hSet(key, getBytes(field), CommUtil.writeObject(value)); - } - - public long hdel(String key, String field) { - return redis.hdel(getBytes(key), getBytes(field)); - } - - public Long ttl(String key) { - return redis.ttl(getBytes(key)); - } - - public T get(String key, Class clazz) { - return CommUtil.readObject(get(key), clazz); - } - - public Map hGetAll(String key) { - return redis.hgetall(getBytes(key)); - } - - /** - * 模糊查询keys,影响性能,谨慎使用 - * - * @param keyLike 支持*表达模糊搜索 - * @return 查询到的列表 - */ - public List matchKeys(String keyLike) { - List list = redis.keys(getBytes(keyLike)); - if (list != null && !list.isEmpty()) { - List result = new ArrayList<>(list.size()); - for (byte[] b : list) { - result.add(new String(b, StandardCharsets.UTF_8)); - } - return result; - } - - return null; - } - - /** - * 模糊删除keys,影响性能,谨慎使用 - * - * @param keyLike 支持*表达模糊搜索 - * @return 成功删除的条数 - */ - public Long delMatchKeys(String keyLike) { - long result = 0; - List list = redis.keys(getBytes(keyLike)); - if (list != null) { - int size = list.size(); - - for (int i = 0; i < size; i += DEL_COUNT) { - int len = DEL_COUNT; - if (i + len > size) { - len = size - i; - } - - Long ret = delKeys(list, i, len); - if (ret != null) { - result += ret; - } - } - } - - return result; - } - - private Long delKeys(List keys, int start, int len) { - byte[][] batchKey = new byte[len][]; - - for (int i = 0; i < len; i++) { - batchKey[i] = keys.get(i + start); - } - - return redis.del(batchKey); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisManager.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisManager.java deleted file mode 100644 index faf0b59..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/RedisManager.java +++ /dev/null @@ -1,220 +0,0 @@ -package cc.smtweb.framework.core.cache.redis; - -import cc.smtweb.framework.core.exception.SwException; -import cc.smtweb.framework.core.systask.SysTaskManager; -import cc.smtweb.framework.core.util.JsonUtil; -import cc.smtweb.framework.core.util.SpringUtil; -import io.lettuce.core.RedisClient; -import io.lettuce.core.RedisURI; -import io.lettuce.core.api.StatefulRedisConnection; -import io.lettuce.core.api.sync.RedisCommands; -import io.lettuce.core.pubsub.StatefulRedisPubSubConnection; -import io.lettuce.core.pubsub.api.sync.RedisPubSubCommands; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.pool2.impl.GenericObjectPool; -import org.apache.commons.pool2.impl.GenericObjectPoolConfig; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.context.ApplicationContext; - -import javax.annotation.PreDestroy; -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import java.util.function.Function; - -/** - * Redis管理器 - * - * @author kevin - */ -@Slf4j -public class RedisManager implements DisposableBean { - // SESSION - public static final String PREFIX_SESSION = "SID"; - // 定时器锁 - public static final String PREFIX_TIMER = "TIM"; - /** - * UserSession 超时时间 - */ - public static final int SESSION_EXPIRE_SEC = 30 * 60; - /** - * 订阅发布的主题 - */ - private static final String SCRIBE_SYSTEM = "SW_SYSTEM_"; -// private static final String SCRIBE_CACHED = "SW_CACHED"; - - private final RedisSysTask redisSysTask; - private RedisClient redisClient; - private GenericObjectPool> pool; - // 定义通道名称 - private final String channel; - - public static RedisManager getInstance() { - return SpringUtil.getBean(RedisManager.class); - } - - /** - * 初始化Redis连接池 - */ - public RedisManager(final ApplicationContext applicationContext, SysTaskManager sysTaskManager, RedisURI redisUri) { -// this.applicationContext = applicationContext; - redisClient = RedisClient.create(redisUri); - channel = SCRIBE_SYSTEM + redisUri.getDatabase() + "_" + redisUri.getClientName(); - - GenericObjectPoolConfig config = new GenericObjectPoolConfig(); - config.setTestWhileIdle(true); - pool = new GenericObjectPool<>(new RedisPooledObjectFactory(redisClient), config); - -// pool = ConnectionPoolSupport.createGenericObjectPool( -// () -> redisClient.connect(ByteArrayCodec.INSTANCE), -// new GenericObjectPoolConfig(), false); - - redisSysTask = new RedisSysTask(applicationContext, redisClient, SCRIBE_SYSTEM + redisUri.getDatabase() + "_*", channel); - sysTaskManager.add(redisSysTask); - } - - @PreDestroy - public void shutdown() { - pool.close(); - redisSysTask.close(); - redisClient.shutdown(); - } - - /** - * 执行redis命令 - */ - public T command(Function handler) { -// StatefulRedisConnection connection = redisClient.connect(ByteArrayCodec.INSTANCE); - - StatefulRedisConnection connection = null; - try { - connection = pool.borrowObject(); - } catch (Exception e) { - throw new SwException(e); - } - - try { - RedisCommands redisCommands = connection.sync(); - RedisConnection redis = new RedisConnection(redisCommands); - return handler.apply(redis); - } finally { - pool.returnObject(connection); - } - } - - public boolean expire(String key, int expireSec) { - return command(redis -> { - return redis.expire(key, expireSec); - }); - } - - /** - * 设置指定key对应的值,并更新超时时间 - * - * @param key 关键字KEY - * @param value 值 - * @param seconds 超时删除时间(秒) - * @return boolean 是否设置成功 - */ - public boolean set(byte[] key, byte[] value, int seconds) { - return command(redis -> redis.set(key, value, seconds)); - } - - public boolean setnx(byte[] key, byte[] value, int seconds) { - return command(redis -> redis.setnx(key, value, seconds)); - } - - public boolean setnx(String key, T obj, int seconds) { - return command(redis -> redis.setnx(key, obj, seconds)); - } - - public boolean set(String key, T obj, int seconds) { - return command(redis -> redis.set(key, obj, seconds)); - } - - public boolean del(String key) { - return command(redis -> redis.del(key)); - } - - public Long delKeys(String... keys) { - return command(redis -> redis.delKeys(keys)); - } - - public boolean hSet(String key, byte[] field, byte[] value) { - return command(redis -> redis.hSet(key, field, value)); - } - - - public boolean hmSet(String key, Map values) { - return command(redis -> redis.hmSet(key, values)); - } - - /** - * 获取指定key里指定的域对应的值,并转换为指定对象 此时,key对应的存储对象是map。 - * - * @param key redis关键字KEY - * @param field map的KEY值 - * @param clazz 对象存储类型 - * @return T 对象 - */ - public T hGet(String key, String field, Class clazz) { - return command(redis -> redis.hGet(key, field, clazz)); - } - - public List hVals(String key) { - return command(redis -> redis.hVals(key)); - } - - public boolean hSet(String key, String field, Serializable value) { - return command(redis -> redis.hSet(key, field, value)); - } - - public long hdel(String key, String field) { - return command(redis -> redis.hdel(key, field)); - } - - public Long ttl(String key) { - return command(redis -> redis.ttl(key)); - } - - public boolean exists(String key) { - return command(redis -> redis.exists(key)); - } - - // 发布系统消息 - public void publish(RedisBroadcastEvent message) { - try (StatefulRedisPubSubConnection connection = redisClient.connectPubSub()) { - RedisPubSubCommands sync = connection.sync(); - sync.publish(channel, JsonUtil.encodeString(message)); - } - } - - public Map hGetAll(String key) { - return command(redis -> redis.hGetAll(key)); - } - - public T get(String key, Class clazz) { - return command(redis -> redis.get(key, clazz)); - } - - public List matchKeys(String keyLike) { - return command(redis -> redis.matchKeys(keyLike)); - } - - public Long delMatchKeys(String keyLike) { - return command(redis -> redis.delMatchKeys(keyLike)); - } - - public byte[] writeObject(Serializable entity) { - return RedisConnection.writeObject(entity); - } - - public T readObject(byte[] value, Class clazz) { - return RedisConnection.readObject(value, clazz); - } - - @Override - public void destroy() throws Exception { - this.shutdown(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/config/RedisConfig.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/config/RedisConfig.java deleted file mode 100644 index 83367e3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/redis/config/RedisConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -package cc.smtweb.framework.core.cache.redis.config; - - -import cc.smtweb.framework.core.cache.redis.RedisManager; -import cc.smtweb.framework.core.systask.SysTaskManager; -import io.lettuce.core.RedisURI; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * 〈redis配置〉 - * - * @author kevin - * @since 1.0.0 - */ -@Configuration -public class RedisConfig { - @Value("${spring.redis.name:127.0.0.1}") - private String clientName; - - @Value("${spring.redis.host:127.0.0.1}") - private String redisHost; - - @Value("${spring.redis.port:6379}") - private int redisPort; - - @Value("${spring.redis.username:}") - private String redisUserName; - - @Value("${spring.redis.password:}") - private String redisPassword; - - @Value("${spring.redis.database:}") - private String redisDb; - - @Autowired - private ApplicationContext applicationContext; - - @Autowired - private SysTaskManager sysTaskManager; - - @Bean - public RedisManager redisManager() { - RedisURI redisUri = RedisURI.create (redisHost, redisPort); - if (StringUtils.isNotBlank(clientName)) { - redisUri.setClientName(clientName); - } - if (StringUtils.isNotBlank(redisDb)) { - redisUri.setDatabase(Integer.parseInt(redisDb)); - } - if (StringUtils.isNotBlank(redisUserName)) { - redisUri.setUsername(redisUserName.trim()); - } - if (StringUtils.isNotBlank(redisPassword)) { - redisUri.setPassword((CharSequence)redisPassword.trim()); - } - - return new RedisManager(applicationContext, sysTaskManager, redisUri); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java deleted file mode 100644 index d859d04..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java +++ /dev/null @@ -1,290 +0,0 @@ -package cc.smtweb.framework.core.common; - -import org.apache.commons.lang3.StringUtils; - -import java.sql.Types; - -/** - * Created by Akmm at 2022/3/23 9:39 - * 系统的一些枚举变量 - */ -public interface SwEnum { - - - /** - * Created by Akmm at 2022/2/9 10:01 - * 字段业务类别 - */ - class FieldTypeBean extends AbstractEnum.IntEnumBean { - public String dataType; - public int notNull; - - public FieldTypeBean(Integer value, String name, String dataType) { - super(value, name); - this.dataType = dataType; - this.notNull = 0; - } - public FieldTypeBean(Integer value, String name, String dataType, int notNull) { - super(value, name); - this.dataType = dataType; - this.notNull = notNull; - } - } - - class FieldType extends AbstractEnum { - public static FieldType instance = new FieldType(); - - public static FieldTypeBean ID = instance.addEnum(1, "主键", DataType.ID.value,1); - public static FieldTypeBean CODE = instance.addEnum(2, "编码字段", DataType.CODE.value,1); - public static FieldTypeBean NAME = instance.addEnum(3, "名称字段", DataType.NAME.value,1); - public static FieldTypeBean PARENT_ID = instance.addEnum(4, "父ID", DataType.ID.value); - public static FieldTypeBean LEVEL_CODE = instance.addEnum(5, "级次码", DataType.CODE.value); - public static FieldTypeBean ORDER = instance.addEnum(6, "排序字段", ""); - public static FieldTypeBean CREATE_USER = instance.addEnum(7, "创建人", DataType.ID.value); - public static FieldTypeBean CREATE_TIME = instance.addEnum(8, "创建时间", DataType.DATETIME.value); - public static FieldTypeBean UPDATE_USER = instance.addEnum(9, "更新人", DataType.ID.value); - public static FieldTypeBean LAST_TIME = instance.addEnum(10, "更新时间", DataType.DATETIME.value); - - @Override - protected FieldTypeBean buildBean(Integer value, String name) { - return new FieldTypeBean(value, name, ""); - } - - public FieldTypeBean addEnum(Integer value, String name, String dataType) { - final FieldTypeBean bean = new FieldTypeBean(value, name, dataType); - mapAll.put(value, bean); - return bean; - } - public FieldTypeBean addEnum(Integer value, String name, String dataType, int notNull) { - final FieldTypeBean bean = new FieldTypeBean(value, name, dataType,notNull); - mapAll.put(value, bean); - return bean; - } - } - - /** - * 字段编辑类型 - */ - class EditorType extends StrEnum { - public static EditorType instance = new EditorType(); - - public static StrEnumBean INPUT = instance.addEnum("text", "文本"); - public static StrEnumBean TEXT = instance.addEnum("textarea", "长文本"); - public static StrEnumBean NUMBER = instance.addEnum("number", "数字"); - public static StrEnumBean SWITCH = instance.addEnum("switch", "布尔型"); - public static StrEnumBean DATE = instance.addEnum("date", "日期"); - public static StrEnumBean TIME = instance.addEnum("time", "时间"); - public static StrEnumBean DATETIME = instance.addEnum("datetime", "日期时间"); - public static StrEnumBean COMBO = instance.addEnum("select", "下拉列表"); - public static StrEnumBean TREE = instance.addEnum("select-tree", "下拉树"); - } - - /** - * 数据字段类型Bean - */ - class DataTypeBean extends AbstractEnum.StrEnumBean { - public String sqlType; - public int dataLength; - public String javaType; - public String shortJavaType; - //java.sql.Types里的值 - public int type; - public String defaultValue; - public String editor; - - public DataTypeBean(String value, String name, String sqlType, int dataLength, String javaType, String shortJavaType, int type, String defaultValue, String editor) { - super(value, name); - this.sqlType = sqlType; - this.dataLength = dataLength; - this.javaType = javaType; - this.shortJavaType = shortJavaType; - this.defaultValue = defaultValue; - this.editor = editor; - this.type = type; - } - - public String getSqlTypeCreate() { - if (dataLength > 0) return sqlType + "(" + dataLength + ")"; - return sqlType; - } - - } - - /** - * 数据类型定义,参见design_db.yaml配置 - */ - class DataType extends AbstractEnum { - public final static String TYPE_BOOL = "bool"; - public final static String TYPE_DATE = "date"; - public final static String TYPE_DATETIME = "datetime"; - - public static DataType instance = new DataType(); - public static DataTypeBean ID = instance.addEnum("id", "ID", "bigint", 0, "long", "Long", Types.BIGINT, "", EditorType.INPUT.value); - public static DataTypeBean CODE = instance.addEnum("code", "编码", "varchar", 32, "String", "Str", Types.VARCHAR, "", EditorType.INPUT.value); - public static DataTypeBean NAME = instance.addEnum("name", "名称", "varchar", 100, "String", "Str", Types.VARCHAR, "", EditorType.INPUT.value); - public static DataTypeBean REMARK = instance.addEnum("remark", "备注", "varchar", 255, "String", "Str", Types.VARCHAR, "", EditorType.INPUT.value); - public static DataTypeBean TEXT = instance.addEnum("text", "大文本", "text", 0, "String", "Str", Types.CLOB, "", EditorType.TEXT.value); - public static DataTypeBean LONG = instance.addEnum("long", "长整型", "bigint", 0, "long", "Long", Types.BIGINT, "0", EditorType.INPUT.value); - public static DataTypeBean INT = instance.addEnum("int", "整型", "int", 0, "int", "Int", Types.INTEGER, "0", EditorType.NUMBER.value); - public static DataTypeBean SHORT = instance.addEnum("short", "短整型", "smallint", 0, "int", "Int", Types.SMALLINT, "0", EditorType.NUMBER.value); - public static DataTypeBean BOOL = instance.addEnum("bool", "布尔型", "tinyint", 0, "boolean", "Bool", Types.TINYINT, "0", EditorType.SWITCH.value); - public static DataTypeBean CURRENCY = instance.addEnum("currency", "金额型", "bigint", 0, "long", "Long", Types.BIGINT, "0", EditorType.NUMBER.value); - public static DataTypeBean DATE = instance.addEnum("date", "日期型", "bigint", 0, "long","Long", Types.BIGINT, "0", EditorType.DATE.value); - public static DataTypeBean TIME = instance.addEnum("time", "时间型", "bigint", 0, "long", "Long", Types.BIGINT, "0", EditorType.TIME.value); - public static DataTypeBean DATETIME = instance.addEnum("datetime", "日期时间型", "bigint", 0, "long", "Long", Types.BIGINT, "0", EditorType.DATETIME.value); - - @Override - protected DataTypeBean buildBean(String value, String name) { - return null; - } - - public DataTypeBean addEnum(String value, String name, String sqlType, int dataLength, String javaType, String shortJavaType, int type, String defaultValue, String editor) { - final DataTypeBean bean = new DataTypeBean(value, name, sqlType, dataLength, javaType, shortJavaType, type, defaultValue, editor); - mapAll.put(value, bean); - return bean; - } - - @Override - public DataTypeBean getByValue(String value) { - if (value == null) return null; - return super.getByValue(value.toLowerCase()); - } - - //根据数据库查询的metadata适配类型 - public static DataTypeBean getBySqlType(int sqlType, int precision, int scale) { - for (DataTypeBean bean: instance.mapAll.values()) { - if (bean.type != sqlType) continue; - if (bean.dataLength == 0 || bean.dataLength == precision) return bean; - } - return REMARK; - } - } - - /** - * 数据字段类型Bean - */ - class IndexTypeBean extends AbstractEnum.StrEnumBean { - public String fullName; - - public IndexTypeBean(String value, String name, String fullName) { - super(value, name); - this.fullName = fullName; - } - } - - class IndexType extends AbstractEnum { - public static IndexType instance = new IndexType(); - public static IndexTypeBean PK = instance.addEnum("P", "主键", "prim-key"); - public static IndexTypeBean I = instance.addEnum("I", "一般索引", ""); - public static IndexTypeBean U = instance.addEnum("U", "唯一索引", "unique"); - - @Override - protected IndexTypeBean buildBean(String value, String name) { - return null; - } - - public IndexTypeBean addEnum(String value, String name, String fullName) { - final IndexTypeBean bean = new IndexTypeBean(value, name, fullName); - mapAll.put(value, bean); - return bean; - } - } - - /** - * 表类型 - */ - class TableType extends IntEnum { - public static TableType instance = new TableType(); - - public static AbstractEnum.IntEnumBean TYPE_GENERAL = instance.addEnum(0, "普通表"); - public static AbstractEnum.IntEnumBean TYPE_TREE = instance.addEnum(1, "树型表"); - public static AbstractEnum.IntEnumBean TYPE_CODE = instance.addEnum(2, "编码表"); - public static AbstractEnum.IntEnumBean TYPE_ABSTRACT = instance.addEnum(3, "虚拟抽象表"); - public static AbstractEnum.IntEnumBean TYPE_VIEW = instance.addEnum(4, "视图"); - } - - /** - * 界面定义类型:::控件/页面 - */ - class FormType extends IntEnum { - public static FormType instance = new FormType(); - - public static IntEnumBean PAGE = instance.addEnum(0, "页面"); - public static IntEnumBean WIDGET = instance.addEnum(1, "控件"); - } - - /** - * 控件类型:::grid,tree,combotree,combogrid、custom - */ - class WidgetType extends StrEnum { - public static WidgetType instance = new WidgetType(); - - public static StrEnumBean GRID = instance.addEnum("grid", "表格"); - public static StrEnumBean TREE = instance.addEnum("tree", "树"); - public static StrEnumBean COMBOGRID = instance.addEnum("combogrid", "下拉表格"); - public static StrEnumBean COMBOTREE = instance.addEnum("combotree", "下拉树"); - public static StrEnumBean CUSTOM = instance.addEnum("custom", "自定义"); - } - - /** - * 数据集类型:::list-列表;form-表单;editList-编辑列表;tree;enum - */ - class DatasetType extends StrEnum { - public static DatasetType instance = new DatasetType(); - - public static StrEnumBean LIST = instance.addEnum("list", "查询列表"); - public static StrEnumBean FORM = instance.addEnum("form", "表单"); - public static StrEnumBean ITEM = instance.addEnum("item", "子表编辑"); - public static StrEnumBean TREE = instance.addEnum("tree", "树"); - public static StrEnumBean ENUM = instance.addEnum("enum", "枚举"); - } - - /** - * 过滤条件类型:::控件/参数/link/const - */ - class FilterType extends StrEnum { - public static FilterType instance = new FilterType(); - - public static StrEnumBean INPUT = instance.addEnum("input", "输入"); - public static StrEnumBean PARAM = instance.addEnum("param", "参数"); - public static StrEnumBean LINK = instance.addEnum("link", "关联"); - public static StrEnumBean CONST = instance.addEnum("const", "常量"); - } - - /** - * 操作符类型:::and/or/=/>=/<=/like/p - */ - class OptType extends StrEnum { - public static OptType instance = new OptType(); - - public static StrEnumBean AND = instance.addEnum("and", "且"); - public static StrEnumBean OR = instance.addEnum("or", "或"); - - public static StrEnumBean EQ = instance.addEnum("=", "等于"); - public static StrEnumBean NE = instance.addEnum("<>", "不等于"); - public static StrEnumBean GT = instance.addEnum(">", "大于"); - public static StrEnumBean GE = instance.addEnum(">=", "大于等于"); - public static StrEnumBean LT = instance.addEnum("<", "小于"); - public static StrEnumBean LE = instance.addEnum("<=", "小于等于"); - public static StrEnumBean BT = instance.addEnum("bt", "介于"); - public static StrEnumBean PLIKE = instance.addEnum("plike", "开始以"); - public static StrEnumBean LIKE = instance.addEnum("like", "包含"); - } - - //合计栏类型 "summary": "COUNT/SUM/AVG/MAX/MIN/其他为文本" - class SummaryType extends StrEnum { - public static SummaryType instance = new SummaryType(); - - public static StrEnumBean COUNT = instance.addEnum("count", "计数"); - public static StrEnumBean SUM = instance.addEnum("sum", "求和"); - public static StrEnumBean AVG = instance.addEnum("avg", "均值"); - public static StrEnumBean MAX = instance.addEnum("max", "最大值"); - public static StrEnumBean MIN = instance.addEnum("min", "最小值"); - - //是字符串 - public boolean isText(String v) { - if (StringUtils.isEmpty(v)) return true; - return !mapAll.containsKey(v.toLowerCase()); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/ModelTableCache.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/ModelTableCache.java deleted file mode 100644 index 703e606..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/cache/ModelTableCache.java +++ /dev/null @@ -1,123 +0,0 @@ -package cc.smtweb.framework.core.db.cache; - -import cc.smtweb.framework.core.annotation.SwCache; -import cc.smtweb.framework.core.cache.AbstractCache; -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.vo.ModelField; -import cc.smtweb.framework.core.db.vo.ModelTable; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; - -/** - * Created by Akmm at 2022/1/12 18:34 - */ -@SwCache(ident = "ASP_MODEL_TABLE", title = "数据库表定义") -public class ModelTableCache extends AbstractCache { - private final static String mk = "k"; - private final static String md = "d"; - private final static String mc = "c"; - private final static String mk_link = "l"; - - public static ModelTableCache getInstance() { - return CacheManager.getIntance().getCache(ModelTableCache.class); - } - - public ModelTableCache() { - regMap(mk, k-> k.getName().toUpperCase()); - regList(md, k-> String.valueOf(k.getDbId())); - regList(mc, k-> String.valueOf(k.getMcId())); - regListEx(mk_link, k-> { - Set list = new HashSet<>(); - for (ModelField field: k.getFields()) { - if (field.getLink() > 0) list.add(String.valueOf(field.getLink())); - } - return list.toArray(new String[list.size()]); - }); -// regList(mf, k-> k.get); - } - - @Override - protected String getId(ModelTable bean) { - return String.valueOf(bean.getId()); - } - - @Override - protected List loadAll() { - return DbEngine.getInstance().query("SELECT\n" + - "t.tb_id,\n" + - "t.tb_prj_id,\n" + - "t.tb_mc_id,\n" + - "t.tb_db_id,\n" + - "t.tb_extends,\n" + - "t.tb_name,\n" + - "t.tb_title,\n" + - "t.tb_abbr,\n" + - "t.tb_type,\n" + - "t.tb_need_cache,\n" + - "t.tb_content,\n" + - "t.tb_create_uid,\n" + - "t.tb_update_uid,\n" + - "t.tb_create_at,\n" + - "t.tb_update_at\n" + - "from asp_model_table t\n", new ResultSetExtractor>() { - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { - List list = new ArrayList<>(); - while (rs.next()) { - ModelTable table = new ModelTable(); - list.add(table); - table.setId(rs.getLong("tb_id")); - table.setDbId(rs.getLong("tb_db_id")); - table.setPrjId(rs.getLong("tb_prj_id")); - table.setMcId(rs.getLong("tb_mc_id")); - table.setExtends(rs.getString("tb_extends")); - table.setName(rs.getString("tb_name").toUpperCase()); - table.setTitle(rs.getString("tb_title")); - table.setAbbr(rs.getString("tb_abbr")); - table.setType(rs.getInt("tb_type")); - table.setNeedCache(rs.getInt("tb_need_cache") == 1); - table.setCreateUid(rs.getLong("tb_create_uid")); - table.setUpdateUid(rs.getLong("tb_update_uid")); - table.setCreateAt(rs.getLong("tb_create_at")); - table.setUpdateAt(rs.getLong("tb_update_at")); - table.setContent(rs.getString("tb_content")); - } - return list; - } - }); - } - - public final ModelTable getByName(String key) { - return getByKey(mk, key.toUpperCase()); - } - public final Set getDbTables(long dbId) { - return getListByKey(md, String.valueOf(dbId)); - } - - public final Set getTablesByMc(long mcId) { - return getListByKey(mc, String.valueOf(mcId)); - } - - public final List getTablesByMc(long mcId, Comparator comparator) { - Set set = getListByKey(mc, String.valueOf(mcId)); - if (set == null || set.isEmpty()) return null; - List list = new ArrayList<>(set); - list.sort(comparator); - return list; - } - - public final String getTableName(long id) { - ModelTable bean = get(id); - return bean == null ? String.valueOf(id) : bean.getTitle(); - } - - //根据外键 - public final Set getByLink(long tableId) { - return getListByKey(mk_link, String.valueOf(tableId)); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumn.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumn.java deleted file mode 100644 index 3bc20ea..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/dao/EntityColumn.java +++ /dev/null @@ -1,66 +0,0 @@ -package cc.smtweb.framework.core.db.dao; - -import cc.smtweb.framework.core.db.impl.DefaultEntity; -import cc.smtweb.framework.core.db.vo.ModelField; -import cc.smtweb.framework.core.exception.DbException; -import lombok.Getter; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -/** - * 值对象字段处理类 - * @author xkliu - */ -@Getter -public class EntityColumn { - private ModelField field; - private final Method readMethod; - private final Method writeMethod; - - /** - * 构建值对象字段 - * @param field 字段名 - * @param readMethod 读值方法 - * @param writeMethod 写值方法 - */ - public EntityColumn(ModelField field, Method readMethod, Method writeMethod) { - this.field = field; - this.readMethod = readMethod; - this.writeMethod = writeMethod; - } - - /** - * 从对象中读取字段对应的属性值 - * @param obj 值对象 - * @return 属性值 - */ - public Object readValue(Object obj) { - if (readMethod != null) { - try { - return readMethod.invoke(obj); - } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) { - throw new DbException(e); - } - } else { - return ((DefaultEntity)obj).get(field.getName()); - } - } - - /** - * 写入值到对象字段对象属性 - * @param obj 值对象 - * @param value 属性值 - */ - public void writeValue(Object obj, Object value) { - if (readMethod != null) { - try { - writeMethod.invoke(obj, value); - } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) { - throw new DbException(e); - } - } else { - ((DefaultEntity)obj).put(field.getName(), value); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/BaseBean.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/BaseBean.java deleted file mode 100644 index b4de094..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/BaseBean.java +++ /dev/null @@ -1,103 +0,0 @@ -package cc.smtweb.framework.core.db.impl; - -import cc.smtweb.framework.core.common.SwMap; -import cc.smtweb.framework.core.util.JsonUtil; -import cc.smtweb.framework.core.util.NumberUtil; -import cc.smtweb.framework.core.util.jackson.BaseBeanSerializer; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.io.Serializable; -import java.util.Map; - -/** - * Created by Akmm at 2016-02-23 9:31 - * bean基类,基于Map, - */ -@JsonSerialize(using = BaseBeanSerializer.class) -public class BaseBean implements Serializable { - protected SwMap data = new SwMap(); - - public SwMap getData() { - return data; - } - - public void setData(SwMap data) { - this.data = data; - } - - @Override - public BaseBean clone() throws CloneNotSupportedException { - BaseBean bean = (BaseBean) super.clone(); - bean.data = new SwMap(); - bean.getData().putAll(this.data); - return bean; - } - - public boolean isEmpty() { - return data.isEmpty(); - } - - public String getStr(String fieldName) { - return getStr(fieldName, ""); - } - - public String getStr(String fieldName, String defValue) { - Object o = data.get(fieldName); - return o != null ? o.toString() : defValue; - } - - public double getDouble(String fieldName) { - return getDouble(fieldName, 0.0); - } - - public double getDouble(String fieldName, double defValue) { - Object o = data.get(fieldName); - if (o == null) return defValue; - if (o instanceof Number) return ((Number) o).doubleValue(); - return NumberUtil.getDoubleIgnoreErr(o.toString()); - } - - public int getInt(String fieldName) { - Object o = data.get(fieldName); - if (o == null) return 0; - if (o instanceof Number) return ((Number) o).intValue(); - return NumberUtil.getIntIgnoreErr(o.toString()); - } - - public long getLong(String fieldName) { - Object o = data.get(fieldName); - if (o == null) return 0L; - if (o instanceof Number) return ((Number) o).longValue(); - return NumberUtil.getLongIgnoreErr(o.toString()); - } - - public boolean getBool(String fieldName) { - Object o = data.get(fieldName); - if (o == null) return false; - String v = o.toString(); - return "1".equals(v) || "t".equalsIgnoreCase(v) || "true".equalsIgnoreCase(v); - } - - public void put(String fieldName, Object value) { - this.data.put(fieldName, value); - } - - public void setBool(String fieldName, boolean value) { - this.data.put(fieldName, value ? 1 : 0); - } - - public Object get(String fieldName) { - return this.data.get(fieldName); - } - - public void readFromJson(String json) { - Map map = JsonUtil.parseMap(json); - if (map != null) { - data.putAll(map); - } - } - - public void readFromMap(SwMap map) { - data.putAll(map); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/UtilTime.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/UtilTime.java deleted file mode 100644 index 7863faf..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/UtilTime.java +++ /dev/null @@ -1,158 +0,0 @@ -package cc.smtweb.framework.core.db.impl; - -/** - * Created with IntelliJ IDEA. - * User: AKhh - * Date: 12-12-21 下午10:04 - * To change this template use File | Settings | File Templates. - */ -public class UtilTime { - long realStartTime; - long startTime; - long lastMessageTime; - String lastMessage = null; - boolean log = false; - - /** - * Default constructor. Starts the timer. - */ - public UtilTime() { - lastMessageTime = realStartTime = startTime = System.currentTimeMillis(); - lastMessage = "Begin"; - } - - /** - * Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since the beginning - * - * @param message A message to put into the timer String - * @return A String with the timing information, the timer String - */ - public String timerString(String message) { - return timerString(message, this.getClass().getName()); - } - - /** - * Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since the beginning - * - * @param message A message to put into the timer String - * @param module The debug/log module/thread to use, can be null for root module - * @return A String with the timing information, the timer String - */ - public String timerString(String message, String module) { - // time this call to avoid it interfering with the main timer - long tsStart = System.currentTimeMillis(); - - String retString = "[[" + message + "- total:" + secondsSinceStart() + - ",since last(" + ((lastMessage.length() > 20) ? (lastMessage.substring(0, 17) + "..."): lastMessage) + "):" + - secondsSinceLast() + "]]"; - - lastMessage = message; - if (log) { - System.out.println(retString); - } - // have lastMessageTime come as late as possible to just time what happens between calls - lastMessageTime = System.currentTimeMillis(); - // update startTime to disclude the time this call took - startTime += (lastMessageTime - tsStart); - return retString; - } - - /** - * Returns the number of seconds since the timer started - * - * @return The number of seconds since the timer started - */ - public double secondsSinceStart() { - return ((double) timeSinceStart()) / 1000.0; - } - - /** - * Returns the number of seconds since the last time timerString was called - * - * @return The number of seconds since the last time timerString was called - */ - public double secondsSinceLast() { - return ((double) timeSinceLast()) / 1000.0; - } - - /** - * Returns the number of milliseconds since the timer started - * - * @return The number of milliseconds since the timer started - */ - public long timeSinceStart() { - long currentTime = System.currentTimeMillis(); - - return currentTime - startTime; - } - - /** - * Returns the number of milliseconds since the last time timerString was called - * - * @return The number of milliseconds since the last time timerString was called - */ - public long timeSinceLast() { - long currentTime = System.currentTimeMillis(); - - return currentTime - lastMessageTime; - } - - /** - * Sets the value of the log member, denoting whether log output is off or not - * - * @param log The new value of log - */ - public void setLog(boolean log) { - this.log = log; - } - - /** - * Gets the value of the log member, denoting whether log output is off or not - * - * @return The value of log - */ - public boolean getLog() { - return log; - } - - /** - * Creates a string with information including the passed message, the time since the last call, - * and the time since the beginning. This version allows an integer level to be specified to - * improve readability of the output. - * - * @param level Integer specifying how many levels to indent the timer string so the output can be more easily read through nested method calls. - * @param message A message to put into the timer String - * @return A String with the timing information, the timer String - */ - public String timerString(int level, String message) { - StringBuffer retStringBuf = new StringBuffer(); - for (int i = 0; i < level; i++) { - retStringBuf.append("| "); - } - retStringBuf.append("("); - - String timeSinceStartStr = String.valueOf(timeSinceStart()); - - // int spacecount = 5 - timeSinceStartStr.length(); - // for (int i=0; i < spacecount; i++) { retStringBuf.append(' '); } - retStringBuf.append(timeSinceStartStr + ","); - - String timeSinceLastStr = String.valueOf(timeSinceLast()); - - // spacecount = 4 - timeSinceLastStr.length(); - // for (int i=0; i < spacecount; i++) { retStringBuf.append(' '); } - retStringBuf.append(timeSinceLastStr); - - retStringBuf.append(")"); - int spacecount = 12 + (2 * level) - retStringBuf.length(); - - for (int i = 0; i < spacecount; i++) { - retStringBuf.append(' '); - } - retStringBuf.append(message); - // lastMessageTime = (new Date()).getTime(); - lastMessageTime = System.currentTimeMillis(); - // lastMessage = message; - return retStringBuf.toString(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/BaseBeanPropertyRowMapper.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/BaseBeanPropertyRowMapper.java deleted file mode 100644 index 8c4607a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/BaseBeanPropertyRowMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package cc.smtweb.framework.core.db.jdbc; - -import cc.smtweb.framework.core.db.impl.BaseBean; -import org.springframework.beans.BeanUtils; -import org.springframework.jdbc.core.RowMapper; - -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; - -/** - * ORM映射处理器,实现spring jdbcTemplate的行集映射器 - * @author xkliu - */ -public class BaseBeanPropertyRowMapper implements RowMapper { - private Class mappedClass; - - public BaseBeanPropertyRowMapper(Class mappedClass) { - this.mappedClass = mappedClass; - } - - @Override - public T mapRow(ResultSet resultSet, int i) throws SQLException { - T mappedObject = BeanUtils.instantiateClass(this.mappedClass); - BaseBean map = (BaseBean) mappedObject; - - ResultSetMetaData rsmd = resultSet.getMetaData(); - int columnCount = rsmd.getColumnCount(); - - for(int index = 1; index <= columnCount; ++index) { - Object value = resultSet.getObject(index); - - if (value != null) { - map.put(rsmd.getColumnLabel(index), value); - } - } - - return mappedObject; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/IdGenerator.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/IdGenerator.java deleted file mode 100644 index 4be311a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/IdGenerator.java +++ /dev/null @@ -1,134 +0,0 @@ -package cc.smtweb.framework.core.db.jdbc; - -/** - * 主键生成器。 - */ -//public class IdGenerator { -// private AtomicLong key; -// -// public IdGenerator() { -// this(0); -// } -// -// /** -// * -// * @param seed 集群服务id,用于集群产生的数据不重复(0~255) -// */ -// public IdGenerator(int seed) { -// long now = System.currentTimeMillis(); -// -// if(seed > 0xFF){ -// seed = 0xFF; -// } -// -// if(seed <= 0){ -// seed = 1; -// } -// -// key = new AtomicLong(now | (((long) seed) << 48)); -// } -// -// public long nextCode() { -// return key.incrementAndGet(); -// } -//} - -/** - * tweeter的snowflake - * time—42bits,精确到ms,那就意味着其可以表示长达(2^42-1)/(1000360024*365)=139.5年 - * (a) id构成: 42位的时间前缀 + 10位的节点标识 + 12位的sequence避免并发的数字(12位不够用时强制得到新的时间前缀) - * 注意这里进行了小改动: snowkflake是5位的datacenter加5位的机器id; 这里变成使用10位的机器id - * (b) 对系统时间的依赖性非常强,需关闭ntp的时间同步功能。当检测到ntp时间调整后,将会拒绝分配id - * @author xkliu - */ -public class IdGenerator { - /** - * 起始的时间戳 epoch 2017-1-1 - */ - private final static long EPOCH_STMP = 1483200000000L; - - /** - * 每一部分占用的位数 - */ - //序列号占用的位数 - private final static long SEQUENCE_BIT = 12; - //机器标识占用的位数 - private final static long MACHINE_BIT = 10; - - /** - * 每一部分的最大值 - */ - private final static long MAX_MACHINE_NUM = ~(-1L << MACHINE_BIT); - private final static long MAX_SEQUENCE = ~(-1L << SEQUENCE_BIT); - - /** - * 每一部分向左的位移 - */ - private final static long MACHINE_LEFT = SEQUENCE_BIT; - private final static long TIMESTMP_LEFT = SEQUENCE_BIT + MACHINE_BIT; - - // private long datacenterId; //数据中心 - // 机器标识 - private long machineIdShift; - // 序列号 - private long sequence = 0L; - // 上一次时间戳 - private long lastStmp = -1L; - - // 0 ~ 1023 - public IdGenerator(long machineId) { - if (machineId > MAX_MACHINE_NUM || machineId < 0) { - throw new IllegalArgumentException("machineId " + machineId + " can't be greater than " + MAX_MACHINE_NUM + " or less than 0"); - } - - this.machineIdShift = machineId << MACHINE_LEFT; - } - - /** - * 产生下一个ID - * - * @return ID值 - */ - public synchronized long nextId() { - long currStmp = getNewStamp(); - if (currStmp < lastStmp) { - throw new RuntimeException("Clock moved backwards. Refusing to generate id"); - } - - if (currStmp == lastStmp) { - //相同毫秒内,序列号自增 - sequence = (sequence + 1) & MAX_SEQUENCE; - //同一毫秒的序列数已经达到最大 - if (sequence == 0L) { - currStmp = getNextMill(); - } - } else { - //不同毫秒内,序列号置为0 - sequence = 0L; - } - - lastStmp = currStmp; - - // 时间戳部分 + 机器标识部分 + 序列号部分 - return (currStmp - EPOCH_STMP) << TIMESTMP_LEFT - | machineIdShift - | sequence; - } - - private long getNextMill() { - long mill = getNewStamp(); - while (mill <= lastStmp) { - mill = getNewStamp(); - } - return mill; - } - - private long getNewStamp() { - return System.currentTimeMillis(); - } - - // 根据ID值反向计算时间戳 - public static long queryTimestamp(long id) { - return (id >>> TIMESTMP_LEFT) + EPOCH_STMP; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcTrans.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcTrans.java deleted file mode 100644 index 31a6c33..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/jdbc/JdbcTrans.java +++ /dev/null @@ -1,87 +0,0 @@ -package cc.smtweb.framework.core.db.jdbc; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.transaction.TransactionDefinition; -import org.springframework.transaction.TransactionStatus; -import org.springframework.transaction.support.DefaultTransactionDefinition; - -import java.util.concurrent.atomic.AtomicInteger; - -/** - * JDBC事务处理类,可以在try中使用自动结束事务 - * - * @author xkliu - */ -public class JdbcTrans implements AutoCloseable { - - private Logger logger = LoggerFactory.getLogger("trans"); - protected long time = System.currentTimeMillis(); - protected String info = Thread.currentThread().getStackTrace()[6].getFileName() + "::::" + Thread.currentThread().getStackTrace()[6].getLineNumber(); - private AtomicInteger count = new AtomicInteger(1); - - public int getCount() { - return count.get(); - } - - public void inc() { - count.incrementAndGet(); - } - - public boolean canCommit() { - return count.decrementAndGet() == 0; - } - - public void doEnd(String ei) { - long t = System.currentTimeMillis() - time; - if (t > 10000L) { - logger.info(info + "::::::" + t + "::::::" + ei); - } - } - - private DataSourceTransactionManager transactionManager; - private TransactionStatus status; - - /** - * 构造事务执行 - * - * @param transactionManager spring事务管理对象 - */ - public JdbcTrans(DataSourceTransactionManager transactionManager) { - this.transactionManager = transactionManager; - // 事务定义类 - DefaultTransactionDefinition def = new DefaultTransactionDefinition(); - def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); - // 返回事务对象 - this.status = transactionManager.getTransaction(def); - } - - /** - * 回滚事务 - */ - public void rollback() { - if (status != null) { - transactionManager.rollback(status); - status = null; - } - } - - /** - * 提交事务 - */ - public void commit() { - if (status != null) { - transactionManager.commit(status); - status = null; - } - } - - /** - * 实现自动关闭,回滚方式结束事务 - */ - @Override - public void close() { - this.rollback(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DeleteSqlBuilder.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DeleteSqlBuilder.java deleted file mode 100644 index 4fdcc78..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DeleteSqlBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -package cc.smtweb.framework.core.db.sqlbuilder; - -import cc.smtweb.framework.core.db.jdbc.JdbcEngine; - -public class DeleteSqlBuilder extends AbstractUpdateSqlBuilder { - private String tableName; - - DeleteSqlBuilder(String tableName) { - this.tableName = tableName; - } - - @Override - public int update(JdbcEngine dbEngine) { - int fieldSize = wheres.size(); - Object[] params = new Object[fieldSize]; - - StringBuilder sb = new StringBuilder("delete from "); - - sb.append(tableName).append(" where "); - - int index = 0; - for (SqlWhereValue whereValue: wheres) { - if (index > 0){ - sb.append(" and "); - } - sb.append(whereValue.getName()).append("=?"); - params[index] = whereValue.getValue(); - index++; - } - - return dbEngine.update(sb.toString(), params); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DirectSelectSqlBuilder.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DirectSelectSqlBuilder.java deleted file mode 100644 index 6986db6..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/DirectSelectSqlBuilder.java +++ /dev/null @@ -1,20 +0,0 @@ -package cc.smtweb.framework.core.db.sqlbuilder; - -import java.util.function.BiFunction; - -public class DirectSelectSqlBuilder extends AbstractSelectSqlBuilder { - private String sql; - - DirectSelectSqlBuilder(String sql) { - this.sql = sql; - } - - @Override - public T exec(BiFunction execute) { - StringBuilder sb = new StringBuilder(sql); - - Object[] params = makeParams(sb); - - return execute.apply(sb.toString(), params); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlBuilder.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlBuilder.java deleted file mode 100644 index c4ef731..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/SqlBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -package cc.smtweb.framework.core.db.sqlbuilder; - -import java.util.ArrayList; -import java.util.List; - -/** - * SQL语句建造器 - * @author admin - * @param 建造器类型 - */ -public abstract class SqlBuilder { - protected List fields = new ArrayList<>(); - protected List wheres; - - SqlBuilder() { - } - - public static InsertSqlBuilder createInsert(String tableName) { - return new InsertSqlBuilder(tableName); - } - public static UpdateSqlBuilder createUpdate(String tableName) { - return new UpdateSqlBuilder(tableName); - } - public static SelectSqlBuilder createSelect(String tableName) { - return new SelectSqlBuilder(tableName); - } - public static DeleteSqlBuilder createDelete(String tableName) { - return new DeleteSqlBuilder(tableName); - } - - public static InsertSqlBuilder createInsert(String dbName, String tableName) { - return new InsertSqlBuilder(dbName + "." + tableName); - } - - public static UpdateSqlBuilder createUpdate(String dbName, String tableName) { - return new UpdateSqlBuilder(dbName + "." + tableName); - } - - public static AbstractSelectSqlBuilder createSelect(String dbName, String tableName) { - return new SelectSqlBuilder(dbName + "." + tableName); - } - - public static AbstractSelectSqlBuilder createDirectSelect(String sql) { - return new DirectSelectSqlBuilder(sql); - } - - public static DeleteSqlBuilder createDelete(String dbName, String tableName) { - return new DeleteSqlBuilder(dbName + "." + tableName); - } - - public T add(String fieldName) { - fields.add(new SqlFieldValue(fieldName, null)); - return (T)this; - } - - public T add(String fieldName, Object fieldValue) { - fields.add(new SqlFieldValue(fieldName, fieldValue)); - return (T)this; - } - - public T addWhere(String fieldName, Object fieldValue, String op) { - if (wheres == null) { - wheres = new ArrayList<>(); - } - wheres.add(new SqlWhereValue(fieldName, fieldValue, op)); - return (T)this; - } - - public T addWhere(String fieldName, Object fieldValue) { - return addWhere(fieldName, fieldValue, "="); - } - - public T addWhereOrBegin() { - return addWhere(null, "(", " or "); - } - - public T addWhereOrEnd() { - return addWhere(null, ")", " and "); - } - - public T addOrderBy(String orderBy) { - return (T)this; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/UpdateSqlBuilder.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/UpdateSqlBuilder.java deleted file mode 100644 index e7c638a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/sqlbuilder/UpdateSqlBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -package cc.smtweb.framework.core.db.sqlbuilder; - -import cc.smtweb.framework.core.db.jdbc.JdbcEngine; - -import java.util.ArrayList; -import java.util.List; - -public class UpdateSqlBuilder extends AbstractUpdateSqlBuilder { - private String tableName; - - UpdateSqlBuilder(String tableName) { - this.tableName = tableName; - } - - @Override - public int update(JdbcEngine dbEngine) { - int fieldSize = fields.size() + wheres.size(); - List params = new ArrayList<>(fieldSize); -// Object[] params = new Object[fieldSize]; - - StringBuilder sb = new StringBuilder("update "); - - sb.append(tableName).append(" set "); - -// int index = 0; - for (SqlFieldValue field: fields) { - if (field.getValue() == VALUE_INVALID) { - sb.append(field.getName()); - } else { - sb.append(field.getName()).append("=?,"); - params.add(field.getValue()); - } -// params[index] = field.getValue(); -// index++; - } - - sb.setCharAt(sb.length() - 1, ' '); - sb.append("where "); - - boolean first = true; - for (SqlWhereValue whereValue: wheres) { - if (first) { - first = false; - } else { - sb.append(" and "); - } - sb.append(whereValue.getName()).append("=?"); - params.add(whereValue.getValue()); -// params[index] -// index++; - } - - return dbEngine.update(sb.toString(), params.toArray()); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCache.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCache.java deleted file mode 100644 index edd4d1b..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCache.java +++ /dev/null @@ -1,28 +0,0 @@ -package cc.smtweb.framework.core.db.vo; - -import lombok.Data; - -/** - * 表缓存信息定义:{"name":"tn","title":"按表名","fields":"table_name","type":"M"} - * Created by Akmm at 2022/2/21 16:22 - */ -@Data -public class ModelCache { - //按map缓存 - public static String CACHE_TYPE_MAP = "M"; - //按list缓存 - public static String CACHE_TYPE_LIST = "L"; - - //缓存名,根据此名称去获取缓存信息 getByKey的参数 - private String name; - //缓存中文名,给人看的 - private String title; - //字段,多个字段,键值以下划线分隔 - private String fields; - //缓存类别:list/map - private String type; - - public boolean isMapType() { - return CACHE_TYPE_MAP.equalsIgnoreCase(type); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCatalog.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCatalog.java deleted file mode 100644 index b46e984..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelCatalog.java +++ /dev/null @@ -1,96 +0,0 @@ -package cc.smtweb.framework.core.db.vo; - -import cc.smtweb.framework.core.annotation.SwTable; -import cc.smtweb.framework.core.db.impl.DefaultEntity; - -/** - * Created by Akmm at 2022/3/1 15:35 - */ -@SwTable("ASP_MODEL_CATALOG") -public class ModelCatalog extends DefaultEntity { - public static final String ENTITY_NAME = "ASP_MODEL_CATALOG"; - - public ModelCatalog() { - super(ENTITY_NAME); - } - - public long getId() { - return getLong("mc_id"); - } - - public void setId(long mcId) { - put("mc_id", mcId); - } - - public long getParentId() { - return getLong("mc_parent_id"); - } - - public void setParentId(long mcParentId) { - put("mc_parent_id", mcParentId); - } - - public String getLevelCode() { - return getStr("mc_level_code"); - } - - public void setLevelCode(String mcLevelCode) { - put("mc_level_code", mcLevelCode); - } - - public String getCode() { - return getStr("mc_code"); - } - - public void setCode(String mcCode) { - put("mc_code", mcCode); - } - - public String getName() { - return getStr("mc_name"); - } - - public void setName(String mcName) { - put("mc_name", mcName); - } - - public long getPrjId() { - return getLong("mc_prj_id"); - } - - public void setPrjId(long mcPrjId) { - put("mc_prj_id", mcPrjId); - } - - public long getCreateUid() { - return getLong("mc_create_uid"); - } - - public void setCreateUid(long mcCreateUid) { - put("mc_create_uid", mcCreateUid); - } - - public long getUpdateUid() { - return getLong("mc_update_uid"); - } - - public void setUpdateUid(long mcUpdateUid) { - put("mc_update_uid", mcUpdateUid); - } - - public long getCreateAt() { - return getLong("mc_create_at"); - } - - public void setCreateAt(long mcCreateAt) { - put("mc_create_at", mcCreateAt); - } - - public long getUpdateAt() { - return getLong("mc_update_at"); - } - - public void setUpdateAt(long mcUpdateAt) { - put("mc_update_at", mcUpdateAt); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelField.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelField.java deleted file mode 100644 index 0263245..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelField.java +++ /dev/null @@ -1,41 +0,0 @@ -package cc.smtweb.framework.core.db.vo; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -/** - * 字段定义 - * {name:"字段名,如id",fieldType:"字段类型,如编码字段", dataType:"数据类型,如ID/CODE/NAME等", null:"0-空/1-非空", default: "默认值", title:"中文名",link:"外键关联表",editor:"控件类型:TEXT/TextArea/NUMBER/COMBO"} - */ -@Data -public class ModelField { - private String name; - private String title; - private String remark; - //字段类型,如编码字段,参见FieldTypeDef - private int fieldType; - /** - * 数据类型,参见DataType - */ - private String dataType; - /** - * '禁止为空' - */ - @JsonProperty("null") - private int notNull; - /** - * '默认值' - */ - @JsonProperty("default") - private String defaultValue; - //外键关联表 - private long link; - //控件类型:TEXT/TextArea/NUMBER/COMBO - private String editor; - @JsonIgnore - public boolean isNotNull() { - return notNull == 1; - } - -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelProject.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelProject.java deleted file mode 100644 index 33925e8..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelProject.java +++ /dev/null @@ -1,96 +0,0 @@ -package cc.smtweb.framework.core.db.vo; - -import cc.smtweb.framework.core.annotation.SwTable; -import cc.smtweb.framework.core.db.impl.DefaultEntity; - -/** - * Created by Akmm at 2022/3/1 15:35 - */ -@SwTable("ASP_MODEL_PROJECT") -public class ModelProject extends DefaultEntity { - public static final String ENTITY_NAME = "ASP_MODEL_PROJECT"; - - public ModelProject() { - super(ENTITY_NAME); - } - - public long getId() { - return getLong("prj_id"); - } - - public void setId(long prjId) { - put("prj_id", prjId); - } - - public String getName() { - return getStr("prj_name"); - } - - public void setName(String prjName) { - put("prj_name", prjName); - } - - public String getModule() { - return getStr("prj_module"); - } - - public void setModule(String prj_module) { - put("prj_module", prj_module); - } - - public String getDepends() { - return getStr("prj_depends"); - } - - public void setDepends(String prjDepends) { - put("prj_depends", prjDepends); - } - - public String getDesc() { - return getStr("prj_desc"); - } - - public void setDesc(String prjDesc) { - put("prj_desc", prjDesc); - } - - public int getStatus() { - return getInt("prj_status"); - } - - public void setStatus(int prjStatus) { - put("prj_status", prjStatus); - } - - public long getCreateUid() { - return getLong("prj_create_uid"); - } - - public void setCreateUid(long prjCreateUid) { - put("prj_create_uid", prjCreateUid); - } - - public long getUpdateUid() { - return getLong("prj_update_uid"); - } - - public void setUpdateUid(long prjUpdateUid) { - put("prj_update_uid", prjUpdateUid); - } - - public long getCreateAt() { - return getLong("prj_create_at"); - } - - public void setCreateAt(long prjCreateAt) { - put("prj_create_at", prjCreateAt); - } - - public long getUpdateAt() { - return getLong("prj_update_at"); - } - - public void setUpdateAt(long prjUpdateAt) { - put("prj_update_at", prjUpdateAt); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelTable.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelTable.java deleted file mode 100644 index 8ffeea1..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelTable.java +++ /dev/null @@ -1,282 +0,0 @@ -package cc.smtweb.framework.core.db.vo; - -import cc.smtweb.framework.core.annotation.SwTable; -import cc.smtweb.framework.core.common.SwConsts; -import cc.smtweb.framework.core.common.SwEnum; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.cache.ModelDatabaseCache; -import cc.smtweb.framework.core.db.cache.ModelTableCache; -import cc.smtweb.framework.core.db.impl.DefaultEntity; -import cc.smtweb.framework.core.util.JsonUtil; -import org.apache.commons.lang3.StringUtils; - -import java.util.ArrayList; -import java.util.List; - -@SwTable(value = "ASP_MODEL_TABLE") -public class ModelTable extends DefaultEntity { - public final static String ENTITY_NAME = "ASP_MODEL_TABLE"; - - /*冗余*/ - private String idField; - - private List fields = new ArrayList<>(); - private List indexes = new ArrayList<>(); - private List caches = new ArrayList<>(); - - public ModelTable() { - super(ENTITY_NAME); - } - - public long getId() { - return getLong("tb_id"); - } - - public void setId(long tbId) { - put("tb_id", tbId); - } - - public long getPrjId() { - return getLong("tb_prj_id"); - } - - public void setPrjId(long tbPrjId) { - put("tb_prj_id", tbPrjId); - } - - public long getMcId() { - return getLong("tb_mc_id"); - } - - public void setMcId(long tbMcId) { - put("tb_mc_id", tbMcId); - } - - public long getDbId() { - return getLong("tb_db_id"); - } - - public void setDbId(long tbDbId) { - put("tb_db_id", tbDbId); - } - - public String getExtends() { - return getStr("tb_extends"); - } - - public void setExtends(String tbExtends) { - put("tb_extends", tbExtends); - } - - public String getName() { - return getStr("tb_name"); - } - - public void setName(String tbName) { - put("tb_name", tbName); - } - - public String getTitle() { - return getStr("tb_title"); - } - - public void setTitle(String tbTitle) { - put("tb_title", tbTitle); - } - - public String getAbbr() { - return getStr("tb_abbr"); - } - - public void setAbbr(String tbAbbr) { - put("tb_abbr", tbAbbr); - } - - public int getType() { - return getInt("tb_type"); - } - - public void setType(int tbType) { - put("tb_type", tbType); - } - - public boolean isNeedCache() { - return getBool("tb_need_cache"); - } - - public void setNeedCache(boolean tbNeedCache) { - setBool("tb_need_cache", tbNeedCache); - } - - public String getContent() { - return getStr("tb_content"); - } - - public long getCreateUid() { - return getLong("tb_create_uid"); - } - - public void setCreateUid(long tbCreateUid) { - put("tb_create_uid", tbCreateUid); - } - - public long getUpdateUid() { - return getLong("tb_update_uid"); - } - - public void setUpdateUid(long tbUpdateUid) { - put("tb_update_uid", tbUpdateUid); - } - - public long getCreateAt() { - return getLong("tb_create_at"); - } - - public void setCreateAt(long tbCreateAt) { - put("tb_create_at", tbCreateAt); - } - - public long getUpdateAt() { - return getLong("tb_update_at"); - } - - public void setUpdateAt(long tbUpdateAt) { - put("tb_update_at", tbUpdateAt); - } - - public String getIdField() { - return idField; - } - - public String getDbName() { - return ModelDatabaseCache.getInstance().getName(getDbId()); - } - - public List getFields() { - return fields; - } - - public List getIndexes() { - return indexes; - } - - public List getCaches() { - return caches; - } - - public ModelField findField(String fieldName) { - if (fieldName != null && fields != null) { - for (ModelField modelField : fields) { - if (fieldName.equals(modelField.getName())) { - return modelField; - } - } - } - - return null; - } - - public String findFieldTitle(String fieldName) { - ModelField field = findField(fieldName); - return field != null ? field.getTitle() : fieldName; - } - - public String fullName() { - return getDbName() + '.' + getName(); - } - - public void addIndex(ModelIndex modelIndex) { - indexes.add(modelIndex); - } - - public ModelIndex findIndexByName(String indexName) { - for (ModelIndex modelIndex : indexes) { - if (indexName.equals(modelIndex.getName())) { - return modelIndex; - } - } - - return null; - } - - public ModelIndex findPrimaryIndex() { - for (ModelIndex modelIndex : indexes) { - if (ModelIndex.TYPE_PRIMARY.equalsIgnoreCase(modelIndex.getType())) { - return modelIndex; - } - } - - return null; - } - - public ModelField findFieldByName(String name) { - if (name != null) { - for (ModelField value : fields) { - if (name.equalsIgnoreCase(value.getName())) { - return value; - } - } - } - - return null; - } - - public ModelField findFieldByType(int type) { - for (ModelField value : fields) { - if (type == value.getFieldType()) { - return value; - } - } - - return null; - } - - public ModelField findIdField() { - ModelIndex index = findPrimaryIndex(); - if (index != null) { - return findField(index.getFields()); - } - - return null; - } - - public List findLinkeNames() { - List list = new ArrayList<>(); - for (ModelField field : fields) { - if (field.getLink()<=0) { - continue; - } - ModelTable linkTable = ModelTableCache.getInstance().get(field.getLink()); - if (linkTable == null) { - continue; - } - ModelField linkNameField = linkTable.findFieldByType(SwEnum.FieldType.NAME.value); - if (linkNameField != null) { - list.add(new ModelLinkName(field.getName(), linkTable, linkNameField.getName())); - } - } - return list; - } - - public void setContent(String tableContent) { - put("tb_content", tableContent); - //读取表定义信息 - ModelTable bean = JsonUtil.parse(tableContent, ModelTable.class); - if (bean == null) { - return; - } - this.fields = bean.fields; - this.indexes = bean.indexes; - this.caches = bean.caches; - ModelIndex i = findPrimaryIndex(); - if (i != null) { - this.idField = i.getFields(); - } - } - - public String getSchemaTableName() { - String dbName = getDbName(); - if (StringUtils.isEmpty(dbName) || dbName.equals(SwConsts.DEF_DB_NAME)) return getName(); - return DbEngine.getInstance().getDbSchema() + "_" + dbName + "." + getName(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BindBeanException.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BindBeanException.java deleted file mode 100644 index 0168e3a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/BindBeanException.java +++ /dev/null @@ -1,39 +0,0 @@ -package cc.smtweb.framework.core.exception; - -/** - * bean绑定错误 - * @author kevin - * @since 2010-9-14 上午11:17:43 - * - */ -public class BindBeanException extends SwException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - private static String msg = "绑定bean异常:Context中已经存在这个bean: "; - - public BindBeanException() { - super(); - // TODO Auto-generated constructor stub - } - - public BindBeanException(String message, Throwable cause) { - super(message, cause); - // TODO Auto-generated constructor stub - } - - public BindBeanException(String message) { - - super(msg+message); - // TODO Auto-generated constructor stub - } - - public BindBeanException(Throwable cause) { - super(cause); - // TODO Auto-generated constructor stub - } - -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/DbException.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/DbException.java deleted file mode 100644 index 5ca0635..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/DbException.java +++ /dev/null @@ -1,31 +0,0 @@ -package cc.smtweb.framework.core.exception; - -/** - * bean绑定错误 - * @author kevin - * @since 2010-9-14 上午11:17:43 - * - */ -public class DbException extends RuntimeException { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public DbException() { - super(); - } - - public DbException(String message, Throwable cause) { - super(message, cause); - } - - public DbException(String message) { - super(message); - } - - public DbException(Throwable cause) { - super(cause.getMessage(), cause); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/JsonParseException.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/JsonParseException.java deleted file mode 100644 index 22fc5bf..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/exception/JsonParseException.java +++ /dev/null @@ -1,7 +0,0 @@ -package cc.smtweb.framework.core.exception; - -public class JsonParseException extends SwException { - public JsonParseException(String s, Exception e) { - super(s, e); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/SchedulerManager.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/SchedulerManager.java deleted file mode 100644 index 5baf5aa..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/SchedulerManager.java +++ /dev/null @@ -1,29 +0,0 @@ -package cc.smtweb.framework.core.mvc; - -import org.springframework.stereotype.Component; - -/** - * 定时器服务 - * @author xkliu - */ -@Component -public class SchedulerManager { - private ISchedulerWakeup schedulerWakeup; - - public void install(ISchedulerWakeup schedulerWakeup) { - this.schedulerWakeup = schedulerWakeup; - } - - /** - * 唤醒定时器立即执行 - * @param clazz 定时器类 - * @param methodName 有@SwScheduling注解的定时器方法名 - */ - public boolean wakeup(Class clazz, String methodName) { - if (this.schedulerWakeup != null) { - return schedulerWakeup.wakeup(clazz, methodName); - } - - return false; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/ControllerConfig.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/ControllerConfig.java deleted file mode 100644 index a36f7bd..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/ControllerConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package cc.smtweb.framework.core.mvc.config; - -import cc.smtweb.framework.core.mvc.controller.scan.IScanActionBuilder; -import lombok.Getter; - -@Getter -public class ControllerConfig { - /** 模块名称 */ - private final String module; - /** 控制器的包路径 */ - private final String packagePath; - - private IScanActionBuilder scanActionBuilder; - - public ControllerConfig(String module, String packagePath) { - this(module, packagePath, null); - } - - public ControllerConfig(String module, String packagePath, IScanActionBuilder scanActionBuilder) { - this.module = module; - this.packagePath = packagePath; - this.scanActionBuilder = scanActionBuilder; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/SettingsEnvironmentPostProcessor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/SettingsEnvironmentPostProcessor.java deleted file mode 100644 index e31d3a9..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/config/SettingsEnvironmentPostProcessor.java +++ /dev/null @@ -1,58 +0,0 @@ -package cc.smtweb.framework.core.mvc.config; - -import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.PropertiesPropertySource; -import org.springframework.core.io.FileSystemResource; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -/** - * 〈读取外部配置文件〉 - * - * @author kevin - * @since 1.0.0 - */ -public class SettingsEnvironmentPostProcessor implements EnvironmentPostProcessor { - - @Override - public void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, - SpringApplication springApplication) { - List files = this.getProperties(); - for (File file : files) { - if (file.exists()) { - YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean(); - FileSystemResource resource = new FileSystemResource(file); - yaml.setResources(resource); - if (yaml.getObject() != null) { - configurableEnvironment.getPropertySources() - .addLast(new PropertiesPropertySource(file.getName(), yaml.getObject())); - } - } - } - } - - /** - * <>获取所有资源配置文件 - */ - private List getProperties() { - List result = new ArrayList<>(); - String tomcatConf = System.getProperty("catalina.base") + File.separator + "conf" + File.separator; - File[] listFiles = new File(tomcatConf).listFiles(); - if (listFiles != null && listFiles.length > 0) { - for (File lf : listFiles) { - if (lf.isFile()) { - if (lf.getName().endsWith(".yaml")) { - result.add(lf); - } - } - } - } - return result; - } - -} \ No newline at end of file diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiController.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiController.java deleted file mode 100644 index 4ee218c..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/ApiController.java +++ /dev/null @@ -1,60 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.PreDestroy; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; - -/** - * API接口控制器,所有API的入口 - * @author xkliu - */ -@RestController -public class ApiController { - @Autowired - private MethodAccessManager methodAccessManager; - - /** - * 处理API的GET请求 - * @param params URL请求参数 - * @param request Http请求类 - * @param response Http应答类 - * @return 返回对象,一般在函数里面使用R - * @throws Exception API处理异常 - */ - @GetMapping(value = "/api/**", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}) - public Object commonGet(@RequestParam Map params, - HttpServletRequest request, HttpServletResponse response) throws Exception { - String apiUrl = request.getRequestURI().substring(5); - return methodAccessManager.invoke(apiUrl, params, null, request, response); - } - - /** - * 处理API的POST请求 - * @param params URL请求参数 - * @param body POST内容,JSON格式 - * @param request Http请求类 - * @param response Http应答类 - * @return 返回对象,一般在函数里面使用R - * @throws Exception API处理异常 - */ - @PostMapping(value = "/api/**", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}) - public Object commonPost(@RequestParam Map params, @RequestBody(required = false) String body, - HttpServletRequest request, HttpServletResponse response) throws Exception { - String apiUrl = request.getRequestURI().substring(5); - // 保证body在post的清空下不为null,用于区分get时吧参数组合成body - if (body == null) { - body = ""; - } - return methodAccessManager.invoke(apiUrl, params, body, request, response); - } - - @PreDestroy - public void fin() { - methodAccessManager.showdown(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IActionManager.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IActionManager.java deleted file mode 100644 index 63ca1ca..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IActionManager.java +++ /dev/null @@ -1,7 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller; - -import cc.smtweb.framework.core.mvc.controller.access.IMethodAccess; - -public interface IActionManager { - boolean api(String url, IMethodAccess methodAccess); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IBeanContext.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IBeanContext.java deleted file mode 100644 index 9746ee7..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IBeanContext.java +++ /dev/null @@ -1,8 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller; - -import org.springframework.beans.BeansException; - -public interface IBeanContext { - T getBean(String name, Class type) throws BeansException; - T getBean(Class type) throws BeansException; -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IEditor.java deleted file mode 100644 index 8eff0d7..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/IEditor.java +++ /dev/null @@ -1,27 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -/** - * API参数解析器接口 - * @author xkliu - */ -public interface IEditor { - String USER_SESSION = "_SW_USER_SESSION"; - String USER_TOKEN = "_SW_TOKEN"; - String BODY_MAP = "_SW_BODY_MAP"; -// String BODY_BEAN = "_SW_BODY_BEAN"; - - /** - * 根据请求参数转为函数参数定义的类型的值 - * @param paramName 参数名 - * @param paramType 参数类型 - * @param context 全局bean对象上下文 - * @param params URL请求参数(query) - * @param body POST内容 - * @param request http请求 - * @return 转化后的值 - */ - Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/MethodAccessManager.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/MethodAccessManager.java deleted file mode 100644 index 67e99d1..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/MethodAccessManager.java +++ /dev/null @@ -1,105 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller; - -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.cache.ISwCache; -import cc.smtweb.framework.core.cache.redis.RedisManager; -import cc.smtweb.framework.core.common.R; -import cc.smtweb.framework.core.mvc.SchedulerManager; -import cc.smtweb.framework.core.mvc.controller.access.IMethodAccess; -import cc.smtweb.framework.core.mvc.controller.access.MethodAccess; -import cc.smtweb.framework.core.mvc.controller.scan.BeanManager; -import cc.smtweb.framework.core.mvc.realm.interceptor.PermInterceptor; -import cc.smtweb.framework.core.mvc.realm.service.PermChecker; -import cc.smtweb.framework.core.mvc.scheduler.SchedulerTaskManager; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; - -/** - * 服务方法调用管理,通过url进行API调用 - * @author xkliu - */ -@Slf4j -public class MethodAccessManager { - private Map controllers; - private IBeanContext beanContext; - private PermInterceptor permInterceptor; - private SchedulerTaskManager schedulerTaskManager; - private MethodAccess[] destroyMethods; - - @Getter - private CacheManager cacheManager; - - public MethodAccessManager(RedisManager redisManager, CacheManager cacheManager) { - permInterceptor = new PermInterceptor(redisManager); - this.cacheManager = cacheManager; - } - - // 执行控制器方法 - Object invoke(String url, Map params, String body, HttpServletRequest request, HttpServletResponse response) throws Exception { - // 调用普通方法 -// String url = module + "/" + service + "/" + method; - - IMethodAccess methodAccess = controllers.get(url); - - if (methodAccess != null) { - permInterceptor.preHandle(request, methodAccess.getPerm()); - - return methodAccess.invoke(beanContext, params, body, request); - } - - // TODO 调用默认方法 -// url = module + "/" + service + "/"; -// -// methodAccess = controllers.get(url); -// -// if (methodAccess != null) { -// permInterceptor.preHandle(request, methodAccess.getPerm()); -// -// request.setAttribute(PathParamEditor.ATTR_KEY, method); -// return methodAccess.invoke(beanContext, params, body, request, response); -// } - - return R.error(404, "not find api:" + url); - } - - public void init(BeanManager beanManager, ISwCache cache) { - this.beanContext = beanManager.getBeanContext(); - this.controllers = beanManager.getControllers(); - this.destroyMethods = beanManager.loadDestroyMethods(); - this.permInterceptor.setCache(cache); - - // 启动定时任务 - this.schedulerTaskManager = SchedulerTaskManager.build(beanContext, beanManager.getTasks()); - - if (this.schedulerTaskManager != null) { - // 设置用于外部服务调用 - SchedulerManager schedulerManager = this.beanContext.getBean(SchedulerManager.class); - if (schedulerManager != null) { - schedulerManager.install(this.schedulerTaskManager); - } else { - log.error("not find spring bean schedulerManager"); - } - } - } - - void showdown() { - // 强行关闭定时任务 - if (this.schedulerTaskManager != null) { - this.schedulerTaskManager.shutdown(); - } - - if (destroyMethods != null) { - for (MethodAccess methodAccess : destroyMethods) { - try { - methodAccess.invoke(beanContext); - } catch (Exception e) { - log.error(methodAccess.fullName(), e); - } - } - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/BindFieldAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/BindFieldAccess.java deleted file mode 100644 index 482b0df..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/BindFieldAccess.java +++ /dev/null @@ -1,27 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; - -import java.lang.reflect.Field; -import java.util.Map; - -public class BindFieldAccess extends FieldAccess { - private IEditor editor; - private final String beanName; - - public BindFieldAccess(IEditor editor, Field field, String beanName) { - super(field); - this.editor = editor; - this.beanName = beanName; - } - - @Override - protected Object getFieldValue(Object instance, IBeanContext context, Map params) { - if (editor != null) { - return editor.getParamValue(beanName, this.field.getType(), context, params, null, null); - } - - return null; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/FieldAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/FieldAccess.java deleted file mode 100644 index 392ec6e..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/FieldAccess.java +++ /dev/null @@ -1,39 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -import cc.smtweb.framework.core.exception.BindBeanException; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; - -import java.lang.reflect.Field; -import java.util.Map; - -public abstract class FieldAccess { - protected final Field field; - - public FieldAccess(Field field) { - this.field = field; - } - - protected abstract Object getFieldValue(Object instance, IBeanContext context, Map params); - - public boolean writeValue(Object instance, IBeanContext context, Map params) { - Object bean = getFieldValue(instance, context, params); - - if (bean != null) { - field.setAccessible(true); - - try { - field.set(instance, bean); - } catch (IllegalArgumentException | IllegalAccessException e) { - throw new BindBeanException("not set " + getFullName(instance) + " value", e); - } - - return true; - } - - return false; - } - - public String getFullName(Object instance) { - return instance.getClass().getName() + "." + field.getName(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IBeanAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IBeanAccess.java deleted file mode 100644 index 17c8fc3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/IBeanAccess.java +++ /dev/null @@ -1,5 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -public interface IBeanAccess { - Object getSingletonInstance(); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodParamAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodParamAccess.java deleted file mode 100644 index 800c24a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/MethodParamAccess.java +++ /dev/null @@ -1,42 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; -import lombok.Getter; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -/** - * API方法参数访问器 - * @author xkliu - */ -@Getter -public class MethodParamAccess { - private int bindType; - private final IEditor editor; - private final String paramName; - private final Class collectionType; - private final Class paramType; - - public MethodParamAccess(IEditor editor, String paramName, Class paramType, int bindType, Class collectionType) { - this.editor = editor; - this.paramName = paramName; - this.paramType = paramType; - this.bindType = bindType; - this.collectionType = collectionType; - } - - public Object getParamValue(IBeanContext context, Map params, String body, HttpServletRequest request) { - if (editor != null) { - return editor.getParamValue(paramName, paramType, context, params, body, request); - } - - return null; - } - - @Override - public String toString() { - return paramName + ":" + paramType.getSimpleName() + "-" + editor.getClass().getSimpleName(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SchedulerMethodAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SchedulerMethodAccess.java deleted file mode 100644 index 6104a6a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SchedulerMethodAccess.java +++ /dev/null @@ -1,21 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -import cc.smtweb.framework.core.annotation.SwScheduling; -import com.serotonin.timer.CronTimerTrigger; -import com.serotonin.timer.TimerTrigger; -import lombok.Getter; - -import java.text.ParseException; - -@Getter -public class SchedulerMethodAccess { - private final MethodAccess methodAccess; - private final SwScheduling swScheduling; - private final TimerTrigger timerTrigger; - - public SchedulerMethodAccess(MethodAccess methodAccess, SwScheduling swScheduling) throws ParseException { - this.timerTrigger = new CronTimerTrigger(swScheduling.value()); - this.methodAccess = methodAccess; - this.swScheduling = swScheduling; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SingletonFieldAccess.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SingletonFieldAccess.java deleted file mode 100644 index 88a5d7f..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/access/SingletonFieldAccess.java +++ /dev/null @@ -1,20 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.access; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; - -import java.lang.reflect.Field; -import java.util.Map; - -public class SingletonFieldAccess extends FieldAccess { - private final Object fieldValue; - - public SingletonFieldAccess(Object fieldValue, Field field) { - super(field); - this.fieldValue = fieldValue; - } - - @Override - protected Object getFieldValue(Object instance, IBeanContext context, Map params) { - return fieldValue; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/CacheEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/CacheEditor.java deleted file mode 100644 index cc67d88..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/CacheEditor.java +++ /dev/null @@ -1,26 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder; - -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; -import org.apache.commons.lang3.StringUtils; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -public class CacheEditor implements IEditor { - private CacheManager cacheManager; - - public CacheEditor(CacheManager cacheManager) { - this.cacheManager = cacheManager; - } - - @Override - public Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request) { - if (StringUtils.isNotBlank(paramName)) { - return cacheManager.getCache(paramName); - } else { - return cacheManager.getCache(paramType.getSimpleName()); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/WebDataBinder.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/WebDataBinder.java deleted file mode 100644 index d11759e..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/WebDataBinder.java +++ /dev/null @@ -1,225 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder; - -import cc.smtweb.framework.core.cache.AbstractCache; -import cc.smtweb.framework.core.common.SwIpAddr; -import cc.smtweb.framework.core.common.SwMap; -import cc.smtweb.framework.core.mvc.controller.IEditor; -import cc.smtweb.framework.core.mvc.controller.binder.attr.BeanAttrEditor; -import cc.smtweb.framework.core.mvc.controller.binder.bean.*; -import cc.smtweb.framework.core.mvc.controller.binder.body.BeanBodyEditor; -import cc.smtweb.framework.core.mvc.controller.binder.body.StringBodyEditor; -import cc.smtweb.framework.core.mvc.controller.binder.body.SwMapBodyEditor; -import cc.smtweb.framework.core.mvc.controller.binder.param.*; -import cc.smtweb.framework.core.mvc.controller.binder.path.PathParamEditor; -import cc.smtweb.framework.core.mvc.scheduler.SchedulerPoint; -import cc.smtweb.framework.core.session.UserSession; -import lombok.extern.slf4j.Slf4j; - -import javax.servlet.http.HttpServletRequest; -import java.sql.Timestamp; - -@Slf4j -public class WebDataBinder { - private ParamEditor paramEditor = new ParamEditor(new BeanEditor()); - private ParamEditor bodyEditor = new ParamEditor(new BeanBodyEditor()); - private ParamEditor pathEditor = new ParamEditor(new PathParamEditor()); - private ParamEditor headerEditor = new ParamEditor(new NullEditor()); - private ParamEditor attributeEditor = new ParamEditor(new BeanAttrEditor()); - private IEditor cacheEditor; - - public WebDataBinder(IEditor cacheEditor) { - this.cacheEditor = cacheEditor; - initParamEditor(); - initBodyEditor(); - initHeaderEditor(); - } - -// public void addParamEditor(Class type, IEditor editor) { -// paramEditor.add(String.class, editor); -// } - - public IEditor findEditor(Class paramType, int bindType) { - IEditor result; - - switch (bindType) { - case ParamEditor.TYPE_UNKNOWN: - case ParamEditor.TYPE_PARAM: - case ParamEditor.TYPE_FIELD: - if (AbstractCache.class.isAssignableFrom(paramType)) { - result = cacheEditor; - } else { - result = paramEditor.find(paramType); - } - break; - case ParamEditor.TYPE_BODY: - // @SwBody - result = bodyEditor.find(paramType); - break; - case ParamEditor.TYPE_PATH: - result = pathEditor.find(paramType); - break; - case ParamEditor.TYPE_HEADER: - result = headerEditor.find(paramType); - break; - case ParamEditor.TYPE_ATTR: - result = attributeEditor.find(paramType); - break; - default: - throw new IllegalStateException("Unexpected type value: " + bindType); - } - - return result; - } - - private void initParamEditor() { - TimestampEditor timestampEditor = new TimestampEditor(ParamEditor.TYPE_PARAM); - paramEditor.add(String.class, new StringEditor(ParamEditor.TYPE_PARAM)); - paramEditor.add(Timestamp.class, timestampEditor); - paramEditor.add(java.util.Date.class, timestampEditor); - paramEditor.add(java.sql.Date.class, new DateEditor(ParamEditor.TYPE_PARAM)); - paramEditor.add(java.sql.Time.class, new TimeEditor(ParamEditor.TYPE_PARAM)); - - paramEditor.add(Byte.TYPE, new ByteEditor(ParamEditor.TYPE_PARAM,true)); - paramEditor.add(Long.TYPE, new LongEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Double.TYPE, new DoubleEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Float.TYPE, new FloatEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Short.TYPE, new ShortEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Integer.TYPE, new IntegerEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Boolean.TYPE, new BooleanEditor(ParamEditor.TYPE_PARAM, true)); - paramEditor.add(Character.TYPE,new CharEditor(ParamEditor.TYPE_PARAM, true)); - - paramEditor.add(Byte.class, new ByteEditor(ParamEditor.TYPE_PARAM, false)); - paramEditor.add(Long.class, new LongEditor(ParamEditor.TYPE_PARAM, false)); - paramEditor.add(Double.class, new DoubleEditor(ParamEditor.TYPE_PARAM,false)); - paramEditor.add(Float.class, new FloatEditor(ParamEditor.TYPE_PARAM,false)); - paramEditor.add(Short.class, new ShortEditor(ParamEditor.TYPE_PARAM,false)); - paramEditor.add(Integer.class, new IntegerEditor(ParamEditor.TYPE_PARAM,false)); - paramEditor.add(Boolean.class, new BooleanEditor(ParamEditor.TYPE_PARAM,false)); - - paramEditor.add(HttpServletRequest.class, new HttpServletRequestEditor()); -// paramEditor.add(HttpServletResponse.class, new HttpServletResponseEditor()); - paramEditor.add(UserSession.class, new UserSessionEditor()); - paramEditor.add(SwIpAddr.class, new SwIpAddrEditor()); - paramEditor.add(SchedulerPoint.class, new BeanTypeEditor()); - } - - private void initBodyEditor() { - TimestampEditor timestampEditor = new TimestampEditor(ParamEditor.TYPE_BODY); - bodyEditor.add(String.class, new StringEditor(ParamEditor.TYPE_BODY)); - bodyEditor.add(Timestamp.class, timestampEditor); - bodyEditor.add(java.util.Date.class, timestampEditor); - bodyEditor.add(java.sql.Date.class, new DateEditor(ParamEditor.TYPE_BODY)); - bodyEditor.add(java.sql.Time.class, new TimeEditor(ParamEditor.TYPE_BODY)); - - bodyEditor.add(Byte.TYPE, new ByteEditor(ParamEditor.TYPE_BODY,true)); - bodyEditor.add(Long.TYPE, new LongEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Double.TYPE, new DoubleEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Float.TYPE, new FloatEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Short.TYPE, new ShortEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Integer.TYPE, new IntegerEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Boolean.TYPE, new BooleanEditor(ParamEditor.TYPE_BODY, true)); - bodyEditor.add(Character.TYPE,new CharEditor(ParamEditor.TYPE_BODY, true)); - - bodyEditor.add(Byte.class, new ByteEditor(ParamEditor.TYPE_BODY, false)); - bodyEditor.add(Long.class, new LongEditor(ParamEditor.TYPE_BODY, false)); - bodyEditor.add(Double.class, new DoubleEditor(ParamEditor.TYPE_BODY,false)); - bodyEditor.add(Float.class, new FloatEditor(ParamEditor.TYPE_BODY,false)); - bodyEditor.add(Short.class, new ShortEditor(ParamEditor.TYPE_BODY,false)); - bodyEditor.add(Integer.class, new IntegerEditor(ParamEditor.TYPE_BODY,false)); - bodyEditor.add(Boolean.class, new BooleanEditor(ParamEditor.TYPE_BODY,false)); - - bodyEditor.add(String.class, new StringBodyEditor()); - bodyEditor.add(SwMap.class, new SwMapBodyEditor()); - } - - private void initHeaderEditor() { - TimestampEditor timestampEditor = new TimestampEditor(ParamEditor.TYPE_HEADER); - headerEditor.add(String.class, new StringEditor(ParamEditor.TYPE_HEADER)); - headerEditor.add(Timestamp.class, timestampEditor); - headerEditor.add(java.util.Date.class, timestampEditor); - headerEditor.add(java.sql.Date.class, new DateEditor(ParamEditor.TYPE_HEADER)); - headerEditor.add(java.sql.Time.class, new TimeEditor(ParamEditor.TYPE_HEADER)); - - headerEditor.add(Byte.TYPE, new ByteEditor(ParamEditor.TYPE_HEADER,true)); - headerEditor.add(Long.TYPE, new LongEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Double.TYPE, new DoubleEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Float.TYPE, new FloatEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Short.TYPE, new ShortEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Integer.TYPE, new IntegerEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Boolean.TYPE, new BooleanEditor(ParamEditor.TYPE_HEADER, true)); - headerEditor.add(Character.TYPE,new CharEditor(ParamEditor.TYPE_HEADER, true)); - - headerEditor.add(Byte.class, new ByteEditor(ParamEditor.TYPE_HEADER, false)); - headerEditor.add(Long.class, new LongEditor(ParamEditor.TYPE_HEADER, false)); - headerEditor.add(Double.class, new DoubleEditor(ParamEditor.TYPE_HEADER,false)); - headerEditor.add(Float.class, new FloatEditor(ParamEditor.TYPE_HEADER,false)); - headerEditor.add(Short.class, new ShortEditor(ParamEditor.TYPE_HEADER,false)); - headerEditor.add(Integer.class, new IntegerEditor(ParamEditor.TYPE_HEADER,false)); - headerEditor.add(Boolean.class, new BooleanEditor(ParamEditor.TYPE_HEADER,false)); - } - - public void bindParam(Class type, IEditor editor) { - paramEditor.add(type, editor); - } - - public void bindBody(Class type, IEditor editor) { - bodyEditor.add(type, editor); - } - - /** - * 绑定自定义参数读取器 - * @param bindType 绑定类型ParamEditor.TYPE_XXX - * @param type 参数类型 - * @param editor 参数读取器 - */ - public void bind(int bindType, Class type, IEditor editor) { - switch (bindType) { - case ParamEditor.TYPE_PARAM: - paramEditor.add(type, editor); - break; - case ParamEditor.TYPE_BODY: - // @SwBody - bodyEditor.add(type, editor); - break; - case ParamEditor.TYPE_PATH: - pathEditor.add(type, editor); - break; - case ParamEditor.TYPE_HEADER: - headerEditor.add(type, editor);; - break; - case ParamEditor.TYPE_ATTR: - attributeEditor.add(type, editor); - break; - default: - throw new IllegalStateException("Unexpected type value: " + bindType); - } - } - - /** - * 绑定默认自定义参数读取器 - * @param bindType 绑定类型ParamEditor.TYPE_XXX - * @param editor 默认参数读取器 - */ - public void bindDefault(int bindType, IEditor editor) { - switch (bindType) { - case ParamEditor.TYPE_PARAM: - paramEditor.setDefaultEditor(editor); - break; - case ParamEditor.TYPE_BODY: - // @SwBody - bodyEditor.setDefaultEditor(editor); - break; - case ParamEditor.TYPE_PATH: - pathEditor.setDefaultEditor(editor); - break; - case ParamEditor.TYPE_HEADER: - headerEditor.setDefaultEditor(editor);; - break; - case ParamEditor.TYPE_ATTR: - attributeEditor.setDefaultEditor(editor); - break; - default: - throw new IllegalStateException("Unexpected type value: " + bindType); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/AbstractAttrEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/AbstractAttrEditor.java deleted file mode 100644 index e28d213..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/AbstractAttrEditor.java +++ /dev/null @@ -1,20 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.attr; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -/** - * API函数@SwBody参数的转换处理,POST请求直接转换Json内容为Bean对象,GET请求转换Map请求参数为Bean对 - * @author xkliu - */ -public abstract class AbstractAttrEditor implements IEditor { - @Override - public Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request) { - return getValue(paramName, paramType, request); - } - - public abstract Object getValue(String paramName, Class paramType, HttpServletRequest request); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/BeanAttrEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/BeanAttrEditor.java deleted file mode 100644 index fc6058f..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/attr/BeanAttrEditor.java +++ /dev/null @@ -1,14 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.attr; - -import javax.servlet.http.HttpServletRequest; - -/** - * API函数@SwBody参数的转换处理,POST请求直接转换Json内容为Bean对象,GET请求转换Map请求参数为Bean对 - * @author xkliu - */ -public class BeanAttrEditor extends AbstractAttrEditor { - @Override - public Object getValue(String paramName, Class paramType, HttpServletRequest request) { - return request.getAttribute(paramName); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/UserSessionEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/UserSessionEditor.java deleted file mode 100644 index 3478ebb..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/bean/UserSessionEditor.java +++ /dev/null @@ -1,13 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.bean; - -import cc.smtweb.framework.core.mvc.controller.binder.param.AbstractRequestEditor; -import cc.smtweb.framework.core.session.SessionUtil; - -import javax.servlet.http.HttpServletRequest; - -public class UserSessionEditor extends AbstractRequestEditor { - @Override - public Object getValue(HttpServletRequest request) { - return SessionUtil.getSession(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanBodyEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanBodyEditor.java deleted file mode 100644 index e950924..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanBodyEditor.java +++ /dev/null @@ -1,82 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.body; - -import cc.smtweb.framework.core.common.SwMap; -import cc.smtweb.framework.core.exception.BindBeanException; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; -import cc.smtweb.framework.core.util.JsonUtil; -import org.apache.commons.lang3.StringUtils; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -/** - * API函数@SwBody参数的转换处理,POST请求直接转换Json内容为Bean对象,GET请求转换Map请求参数为Bean对 - * @author xkliu - */ -public class BeanBodyEditor implements IEditor { - @Override - public Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request) { - if (paramName != null) { - Object map = request.getAttribute(BODY_MAP); - if (map != null) { - return getFieldValue((SwMap) map, paramName, paramType); - } - } - - if (body != null) { - return getPostValue(paramName, paramType, body, request); - } else { - return getGetValue(paramName, paramType, params); - } - } - - private Object getGetValue(String paramName, Class paramType, Map params) { - if (paramName == null) { - return JsonUtil.parse(params, paramType); - } - - // Json字符进行类型转化 - Object result = params.get(paramName); - if (result == null) { - return null; - } - - if (paramType.isAssignableFrom(result.getClass())) { - return result; - } - - throw new BindBeanException("传入的 @SwBody(" + paramName + ") " + paramType.getName() + "类型不一致! " + result.getClass().getName()); - } - - private Object getPostValue(String paramName, Class paramType, String body, HttpServletRequest request) { - if (body == null || StringUtils.isBlank(body)) { - return null; - } - - if (paramName == null) { - return JsonUtil.parse(body, paramType); - } else { - SwMap map = JsonUtil.parse(body, SwMap.class); - if (map != null) { - request.setAttribute(BODY_MAP, map); - return getFieldValue(map, paramName, paramType); - } - - return null; - } - } - - private Object getFieldValue(SwMap result, String paramName, Class paramType) { - Object value = result.get(paramName); - if (value == null) { - return null; - } - - if (value instanceof Map) { - return BeanUtil.toBean((Map)value, paramType); - } - - throw new BindBeanException("传入的 @SwBody(" + paramName + ") 值非Object类型! " + value.getClass().getName()); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanUtil.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanUtil.java deleted file mode 100644 index 641492a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/BeanUtil.java +++ /dev/null @@ -1,160 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.body; - -import cc.smtweb.framework.core.common.SwMap; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.BeansException; -import org.springframework.beans.FatalBeanException; -import org.springframework.util.Assert; -import org.springframework.util.ClassUtils; - -import java.beans.PropertyDescriptor; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.sql.Timestamp; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -public class BeanUtil { - private static final Set> simpleType = new HashSet<>(); - - static { - simpleType.add(String.class); - simpleType.add(Timestamp.class); - simpleType.add(java.util.Date.class); - simpleType.add(java.sql.Date.class); - simpleType.add(java.sql.Time.class); - - simpleType.add(Byte.TYPE); - simpleType.add(Long.TYPE); - simpleType.add(Double.TYPE); - simpleType.add(Float.TYPE); - simpleType.add(Short.TYPE); - simpleType.add(Integer.TYPE); - simpleType.add(Boolean.TYPE); - simpleType.add(Character.TYPE); - - simpleType.add(Byte.class); - simpleType.add(Long.class); - simpleType.add(Double.class); - simpleType.add(Float.class); - simpleType.add(Short.class); - simpleType.add(Integer.class); - simpleType.add(Boolean.class); - } - - private BeanUtil() {} - - public static Object toBean(Map source, Class clazz) { - Object target = null; - try { - target = clazz.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { - throw new FatalBeanException( - "Could not copy property '" + clazz.getName() + "' from source to target", e); - } - mapToBean(source, target); - return target; - } - - private static void mapToBean(Map source, Object target) { - mapToBean(source, target, true); - } - - private static void mapToBean(Map source, Object target, boolean root) throws BeansException { - Assert.notNull(source, "Source must not be null"); - Assert.notNull(target, "Target must not be null"); - - Class actualEditable = target.getClass(); -// if (editable != null) { -// if (!editable.isInstance(target)) { -// throw new IllegalArgumentException("Target class [" + target.getClass().getName() + -// "] not assignable to Editable class [" + editable.getName() + "]"); -// } -// actualEditable = editable; -// } - PropertyDescriptor[] targetPds = BeanUtils.getPropertyDescriptors(actualEditable); - - for (PropertyDescriptor targetPd : targetPds) { - Method writeMethod = targetPd.getWriteMethod(); - Object value = source.get(targetPd.getName()); - - if (value == null) { - Class parameterType = writeMethod.getParameterTypes()[0]; - - if (ClassUtils.isAssignable(parameterType, value.getClass())) { - writeBeanValue(target, targetPd, writeMethod, value); - } else { - if (root && value instanceof Map) { - Object propValue; - try { - propValue = parameterType.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { - throw new FatalBeanException( - "Could not copy property '" + targetPd.getName() + "' from source to target", e); - } - - mapToBean((Map) value, propValue, false); - writeBeanValue(target, targetPd, writeMethod, propValue); - } - } - } - } - } - - private static void writeBeanValue(Object target, PropertyDescriptor targetPd, Method writeMethod, Object value) { - try { - if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers())) { - writeMethod.setAccessible(true); - } - writeMethod.invoke(target, value); - } catch (Throwable ex) { - throw new FatalBeanException( - "Could not copy property '" + targetPd.getName() + "' from source to target", ex); - } - } - - public static void beanToMap(Object source, SwMap target) throws BeansException { - beanToMap(source, target, true); - } - - public static void beanToMap(Object source, SwMap target, boolean root) throws BeansException { - Assert.notNull(source, "Source must not be null"); - Assert.notNull(target, "Target must not be null"); - PropertyDescriptor[] sourcePds = BeanUtils.getPropertyDescriptors(source.getClass()); - - for (PropertyDescriptor sourcePd: sourcePds) { -// PropertyDescriptor sourcePd = BeanUtils.getPropertyDescriptor(source.getClass(), targetPd.getKey()); -// if (sourcePd != null) { - Method readMethod = sourcePd.getReadMethod(); - if (readMethod != null) { - try { - if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers())) { - readMethod.setAccessible(true); - } - Object value = readMethod.invoke(source); - target.put(sourcePd.getName(), root ? toMapValue(value) : value); - } - catch (Throwable ex) { - throw new FatalBeanException( - "Could not copy property '" + sourcePd.getName() + "' from source to target", ex); - } - } -// } - } - } - - private static Object toMapValue(Object value) { - if (value != null && isBeanType(value.getClass())) { - SwMap mapValue = new SwMap(); - beanToMap(value, mapValue, false); - return mapValue; - } - - return value; - } - - private static boolean isBeanType(Class type) { - return !simpleType.contains(type); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/StringBodyEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/StringBodyEditor.java deleted file mode 100644 index 9de8a32..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/body/StringBodyEditor.java +++ /dev/null @@ -1,18 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.body; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -/** - * API函数@SwBody参数的转换处理,直接获取POST请求文本内容 - * @author xkliu - */ -public class StringBodyEditor implements IEditor { - @Override - public Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request) { - return body; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BeanTypeEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BeanTypeEditor.java deleted file mode 100644 index b96da02..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/BeanTypeEditor.java +++ /dev/null @@ -1,14 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.controller.IEditor; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -public class BeanTypeEditor implements IEditor { - @Override - public Object getParamValue(String paramName, Class paramType, IBeanContext context, Map params, String body, HttpServletRequest request) { - return params.get(paramType.getName()); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DateEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DateEditor.java deleted file mode 100644 index 8f49da3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/DateEditor.java +++ /dev/null @@ -1,53 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - -import cc.smtweb.framework.core.exception.BindParamException; -import org.apache.commons.lang3.StringUtils; - -import java.text.ParseException; -import java.util.Date; - -public class DateEditor extends AbstractParameterEditor { - public DateEditor(int header) { - super(header); - } - - @Override - protected Object parseText(Object value) { - if (value == null) { - return null; - } - - if (value instanceof Date) { - return new java.sql.Date(((Date) value).getTime()); - } - - String text = value.toString(); - if (StringUtils.isBlank(text)) { - return null; - } - - Object result = null; - - if (StringUtils.isNotBlank(text)) { - text = text.trim(); - - if ("null".equals(text)) { - return null; - } else { - int pos = text.indexOf(' '); - if (pos > 0) { - text = text.substring(0, pos); - } - - try { - result = new java.sql.Date(parseDate(text).getTime()); - } catch (ParseException e) { - throw new BindParamException(e); - } - } - - } - - return result; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/FloatEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/FloatEditor.java deleted file mode 100644 index c6cfe12..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/FloatEditor.java +++ /dev/null @@ -1,25 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - - -public class FloatEditor extends AbstractNumberEditor { - private static final Float FLOAT_ZERO = 0.0f; - - public FloatEditor(int header, boolean automicType) { - super(header, automicType); - } - - @Override - protected Object convert(Number value) { - return value.floatValue(); - } - - @Override - protected Object getValue(String text) { - return Float.valueOf(text); - } - - @Override - protected Object defaultValue() { - return FLOAT_ZERO; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/IntegerEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/IntegerEditor.java deleted file mode 100644 index e3666e2..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/IntegerEditor.java +++ /dev/null @@ -1,24 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - -public class IntegerEditor extends AbstractNumberEditor { - private static final Integer INT_ZERO = 0; - - public IntegerEditor(int header, boolean automicType) { - super(header, automicType); - } - - @Override - protected Object convert(Number value) { - return value.intValue(); - } - - @Override - protected Object getValue(String text) { - return Integer.valueOf(text); - } - - @Override - protected Object defaultValue() { - return INT_ZERO; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ShortEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ShortEditor.java deleted file mode 100644 index 5587c17..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/ShortEditor.java +++ /dev/null @@ -1,25 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - - -public class ShortEditor extends AbstractNumberEditor { - private static final Short SHORT_ZERO = 0; - - public ShortEditor(int header, boolean automicType) { - super(header, automicType); - } - - @Override - protected Object convert(Number value) { - return value.shortValue(); - } - - @Override - protected Object getValue(String text) { - return Short.valueOf(text); - } - - @Override - protected Object defaultValue() { - return SHORT_ZERO; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/StringEditor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/StringEditor.java deleted file mode 100644 index c6f7e69..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/binder/param/StringEditor.java +++ /dev/null @@ -1,17 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.binder.param; - - -public class StringEditor extends AbstractParameterEditor { - public StringEditor(int header) { - super(header); - } - - @Override - protected Object parseText(Object text) { - if (text == null) { - return text; - } - - return text.toString(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ApplicationScanner.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ApplicationScanner.java deleted file mode 100644 index 34ac3e3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/ApplicationScanner.java +++ /dev/null @@ -1,73 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.scan; - -import cc.smtweb.framework.core.cache.AbstractCache; -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.cache.ISwCache; -import cc.smtweb.framework.core.mvc.config.ControllerConfig; -import cc.smtweb.framework.core.mvc.controller.ApiConfigBean; -import cc.smtweb.framework.core.mvc.controller.MethodAccessManager; -import cc.smtweb.framework.core.mvc.controller.binder.CacheEditor; -import cc.smtweb.framework.core.mvc.controller.binder.WebDataBinder; -import lombok.extern.slf4j.Slf4j; -import org.springframework.context.ConfigurableApplicationContext; - -import java.util.ArrayList; -import java.util.List; - -/** - * 微服务API扫描,扫描生成api接口实现放入methodAccessManager - * - * @author xkliu - */ -@Slf4j -public class ApplicationScanner { - public static void scan(ConfigurableApplicationContext applicationContext) throws Exception { - MethodAccessManager methodAccessManager = applicationContext.getBean(MethodAccessManager.class); - BeanManager beanManager = BeanManager.getInstance(); - beanManager.install(applicationContext); - - String[] names = applicationContext.getBeanNamesForType(ControllerConfig.class); - if (names != null) { - WebDataBinder webDataBinder = new WebDataBinder(new CacheEditor(methodAccessManager.getCacheManager())); - ApiConfigBean apiConfig = applicationContext.getBean(ApiConfigBean.class); - List controllerConfigs = new ArrayList<>(); - - ScanContext scanContext = new ScanContext(beanManager, webDataBinder); - - for (String name : names) { - ControllerConfig controllerConfig = applicationContext.getBean(name, ControllerConfig.class); - controllerConfigs.add(controllerConfig); - - // 先注册自定义注解解析器 - IScanActionBuilder scanActionBuilder = controllerConfig.getScanActionBuilder(); - if (scanActionBuilder != null) { - scanContext.addScanAction(scanActionBuilder.build(applicationContext, webDataBinder)); - } - } - - for (ControllerConfig controllerConfig : controllerConfigs) { - scanContext.setModule(controllerConfig.getModule()); - log.info("[/api/{}/*]start scan {}", controllerConfig.getModule(), controllerConfig.getPackagePath()); - - // 扫描 Service 类 - PackageScanner packageScanner = new PackageScanner( - new ClassParser(new UrlMaker(apiConfig, controllerConfig.getModule()), scanContext)); - packageScanner.scan(controllerConfig.getPackagePath()); - } - - // 单例进行实例化,并设置实例的field(@SwParam),关联扩展的action(@SwAction)到方法执行器 - beanManager.init(); - - log.info("[smt] scan ok."); - } - - // 处理权限管理和启动定时任务 - AbstractCache realmCache = CacheManager.getIntance().getCache(ISwCache.REALM_CACHE); - - if (realmCache == null) { - log.error("not find RealmCache"); - } - - methodAccessManager.init(beanManager, realmCache); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/UrlMaker.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/UrlMaker.java deleted file mode 100644 index 7aa6aa9..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/controller/scan/UrlMaker.java +++ /dev/null @@ -1,95 +0,0 @@ -package cc.smtweb.framework.core.mvc.controller.scan; - -import cc.smtweb.framework.core.annotation.SwAction; -import cc.smtweb.framework.core.mvc.controller.ApiConfigBean; -import cc.smtweb.framework.core.mvc.controller.access.MethodAccess; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; - -import java.lang.reflect.Method; - -/** - * URL构造器,用于API的访问路径构造 - * @author xkliu - */ -@Slf4j -class UrlMaker { - private static final String SERVICE_SUFFIX = "Service"; - - private final ApiConfigBean apiConfig; - @Getter - private final String module; - private String serviceUrl; - - UrlMaker(ApiConfigBean apiConfig, String module) { - this.apiConfig = apiConfig; - this.module = module; - } - - private String getServiceName(Class clazz) { - String simpleName = clazz.getSimpleName(); - if (simpleName.endsWith(SERVICE_SUFFIX)) { - simpleName = simpleName.substring(0, simpleName.length() - SERVICE_SUFFIX.length()); - } - - return simpleName; - } - - /** - * 添加API映射到BeanManager,API的url先取SwApi配置的值,然后取SwService配置的值+“/”+方法名,最后使用默认规则: “服务名” / "方法名" - * url都以模块名开头,避免应用模块服务名称重复 - * @param clazz 服务类 - * @param method 执行方法,用于映射API - * @param methodAccess 方法实际执行 - * @param controllers 控制器管理容器 - */ - void addApi(Class clazz, Method method, MethodAccess methodAccess, BeanManager controllers) { - String serviceName = getServiceName(clazz); - String methodName = method.getName(); - String urlPrefix = module + "/"; - SwAction swAction = method.getAnnotation(SwAction.class); - - if (swAction != null && StringUtils.isNotBlank(swAction.value())) { - // SwApi设置了URL - mappingApi(methodAccess, controllers, urlPrefix + swAction.value()); - } else if (this.serviceUrl != null) { - // SwService设置了URL - mappingApi(methodAccess, controllers, urlPrefix + this.serviceUrl + "/" + methodName); - } else { - // 小驼峰路径 - String littleCamelCaseUrl = urlPrefix + toLittleCamelName(serviceName) + "/" + methodName; - - if (mappingApi(methodAccess, controllers, littleCamelCaseUrl)) { - // 大驼峰路径,类原名 - if (apiConfig.isBigCameCaseUrl()) { - mappingApi(methodAccess, controllers, urlPrefix + serviceName + "/" + methodName); - } - - // 小写服务名路径 - if (apiConfig.isLowerCaseUrl()) { - mappingApi(methodAccess, controllers, urlPrefix + serviceName.toLowerCase() + "/" + methodName); - } - } - } - } - - private String toLittleCamelName(String serviceName) { - return Character.toLowerCase(serviceName.charAt(0)) - + serviceName.substring(1); - } - - private boolean mappingApi(MethodAccess methodAccess, BeanManager controllers, String url) { - if (controllers.putIfAbsent(url, methodAccess) != null) { - log.error("url is repeat: " + url + ", " + methodAccess.controllerFullName()); - return false; - } - - log.debug("[smt]init: " + url + ", " + methodAccess.controllerFullName()); - return true; - } - - void setServiceUrl(String value) { - this.serviceUrl = StringUtils.trimToNull(value); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/ForbiddenException.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/ForbiddenException.java deleted file mode 100644 index 2aa0cdd..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/ForbiddenException.java +++ /dev/null @@ -1,7 +0,0 @@ -package cc.smtweb.framework.core.mvc.realm.exception; - -public class ForbiddenException extends AuthorizationException { - public ForbiddenException(String s) { - super(s); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnknownAccountException.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnknownAccountException.java deleted file mode 100644 index 3ac1681..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/exception/UnknownAccountException.java +++ /dev/null @@ -1,7 +0,0 @@ -package cc.smtweb.framework.core.mvc.realm.exception; - -public class UnknownAccountException extends AuthorizationException { - public UnknownAccountException(String s) { - super(s); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/PermInterceptor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/PermInterceptor.java deleted file mode 100644 index dcf9184..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/realm/interceptor/PermInterceptor.java +++ /dev/null @@ -1,25 +0,0 @@ -package cc.smtweb.framework.core.mvc.realm.interceptor; - -import cc.smtweb.framework.core.cache.redis.RedisManager; - -import javax.servlet.http.HttpServletRequest; - -/** - * 权限拦截器,在API请求处理中一起完成 - * @author xkliu - */ -public class PermInterceptor extends AbstractPermInterceptor { - public PermInterceptor(RedisManager redisManager) { - super(redisManager); - } - - /** - * 校验用户是否有API权限 - * @param request http请求 - * @param permissionValue 权限值 - * @return 是否有权限 - */ - public boolean preHandle(HttpServletRequest request, String permissionValue) { - return super.handle(request, permissionValue); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobExecutor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobExecutor.java deleted file mode 100644 index 57a0fe4..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/AbstractJobExecutor.java +++ /dev/null @@ -1,85 +0,0 @@ -package cc.smtweb.framework.core.mvc.scheduler; - -import cc.smtweb.framework.core.common.SwMap; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.util.DateUtil; -import cc.smtweb.framework.core.util.JsonUtil; -import lombok.Getter; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.ExecutorService; - -public abstract class AbstractJobExecutor { - @Getter - private IBeanContext beanContext; - private ExecutorService executor; - protected Long redisLockValue; - private DbEngine dbEngine; - protected final Map jobMap = new HashMap<>(); - - public AbstractJobExecutor(IBeanContext beanContext, ExecutorService executor, Long redisLockValue, DbEngine dbEngine) { - this.beanContext = beanContext; - this.executor = executor; - this.redisLockValue = redisLockValue; - this.dbEngine = dbEngine; - } - - public abstract boolean tryLock(AbstractJob job); - - public abstract void unlock(AbstractJob job); - - // 执行任务 - public void execute(final AbstractJobQueue jobQueue, final AbstractJob job) { - this.executor.submit(() -> { - if (tryLock(job)) { - try { - jobQueue.execute(job); - } finally { - unlock(job); - } - } - }); - } - - void saveBreakPoint(AbstractJob job, SchedulerPoint schedulerPoint) { - if (schedulerPoint != null && schedulerPoint.changed) { - String value = JsonUtil.encodeString(schedulerPoint.value); - long now = DateUtil.nowDateTimeLong(); - if (schedulerPoint.insert) { - dbEngine.update("insert into sw_user.sch_break_point(bp_id, bp_job_name, bp_machine_id, bp_value, bp_create_time, bp_last_time) values(?,?,?,?,?,?)", - dbEngine.nextId(), job.getName(), this.redisLockValue, value, now, now); - } else { - dbEngine.update("update sw_user.sch_break_point set bp_machine_id=?, bp_value=?, bp_last_time=? where bp_job_name=?", - this.redisLockValue, value, now, job.getName()); - } - } - } - - SchedulerPoint loadBreakPoint(AbstractJob job) { - String value = dbEngine.queryString("select bp_value from sw_user.sch_break_point where bp_job_name=?", job.getName()); - - SchedulerPoint result; - if (value != null) { - SwMap swMap = JsonUtil.parse(value, SwMap.class); - result = new SchedulerPoint(swMap); - } else { - result = new SchedulerPoint(); - } - - return result; - } - - AbstractJobQueue initJobQueue(AbstractJob job) { - String key = job.getKey(); - - AbstractJobQueue jobQueue = jobMap.get(key); - if (jobQueue == null) { - jobQueue = job.createJobQueue(this); - jobMap.put(key, jobQueue); - } - - return jobQueue; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/CronTimerTask.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/CronTimerTask.java deleted file mode 100644 index 4184df9..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/CronTimerTask.java +++ /dev/null @@ -1,30 +0,0 @@ -package cc.smtweb.framework.core.mvc.scheduler; - -import com.serotonin.timer.TimerTask; -import com.serotonin.timer.TimerTrigger; -import lombok.extern.slf4j.Slf4j; - - -/** - * 包装定时器任务 - * - * @author xkliu - * - */ -@Slf4j -public class CronTimerTask extends TimerTask { - private final AbstractJobQueue jobQueue; - private AbstractJob job; - - CronTimerTask(TimerTrigger timerTrigger, AbstractJobQueue jobQueue, AbstractJob job) { - super(timerTrigger); - this.jobQueue = jobQueue; - this.job = job; - } - - @Override - public void run(long time) { - // 开启线程执行 - jobQueue.getJobExecutor().execute(jobQueue, job); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJob.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJob.java deleted file mode 100644 index 0fc49c5..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/GroupJob.java +++ /dev/null @@ -1,19 +0,0 @@ -package cc.smtweb.framework.core.mvc.scheduler.job; - -import cc.smtweb.framework.core.cache.redis.RedisManager; -import cc.smtweb.framework.core.mvc.controller.access.MethodAccess; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJob; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJobExecutor; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJobQueue; - -public class GroupJob extends AbstractJob { - @Override - public AbstractJobQueue createJobQueue(AbstractJobExecutor jobManager) { - return new GroupJobQueue(jobManager); - } - - public GroupJob(String group, MethodAccess methodAccess) { - super(methodAccess); - initKey(RedisManager.PREFIX_TIMER + '.' + group); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/LocalJobExecutor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/LocalJobExecutor.java deleted file mode 100644 index d085307..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/LocalJobExecutor.java +++ /dev/null @@ -1,23 +0,0 @@ -package cc.smtweb.framework.core.mvc.scheduler.job; - -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJob; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJobExecutor; - -import java.util.concurrent.ExecutorService; - -public class LocalJobExecutor extends AbstractJobExecutor { - public LocalJobExecutor(IBeanContext beanContext, ExecutorService executor, Long redisLockValue, DbEngine dbEngine) { - super(beanContext, executor, redisLockValue, dbEngine); - } - - @Override - public boolean tryLock(AbstractJob job) { - return true; - } - - @Override - public void unlock(AbstractJob job) { - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/RedisJobExecutor.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/RedisJobExecutor.java deleted file mode 100644 index 643d67a..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/scheduler/job/RedisJobExecutor.java +++ /dev/null @@ -1,70 +0,0 @@ -package cc.smtweb.framework.core.mvc.scheduler.job; - -import cc.smtweb.framework.core.cache.redis.RedisManager; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.mvc.controller.IBeanContext; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJob; -import cc.smtweb.framework.core.mvc.scheduler.AbstractJobExecutor; -import lombok.extern.slf4j.Slf4j; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.locks.ReentrantLock; - -@Slf4j -public class RedisJobExecutor extends AbstractJobExecutor implements Runnable { - public static final int TIME_CHECK_SEC = 30; - public static final int TIME_LOOK_SEC = 3 * TIME_CHECK_SEC; - - private ReentrantLock lock = new ReentrantLock(); - private RedisManager redisManager; - - public RedisJobExecutor(IBeanContext beanContext, ExecutorService executor, Long redisLockValue, DbEngine dbEngine, RedisManager redisManager) { - super(beanContext, executor, redisLockValue, dbEngine); - this.redisManager = redisManager; - } - - @Override - public boolean tryLock(AbstractJob job) { - // redis检查, 同group需要排队等待执行\ - String key = job.getKey(); - - boolean redisLocked = redisManager.setnx(key, redisLockValue, TIME_LOOK_SEC); - - if (!redisLocked) { - Long oldLockedValue = redisManager.get(key, Long.class); - if (!redisLockValue.equals(oldLockedValue)) { - return false; - } - } - - return redisLocked; - } - - @Override - public void unlock(AbstractJob job) { - redisManager.del(job.getKey()); - } - - @Override - public void run() { - if (lock.tryLock()) { - try { - // 定时更新redis锁定状态 - long now = System.currentTimeMillis(); - jobMap.forEach((key, value) -> { - long lastTime = value.getLastTime(); - - if (lastTime > 0 && now - lastTime >= TIME_CHECK_SEC) { - if (redisManager.set(key, redisLockValue, TIME_LOOK_SEC)) { - value.updateLastTime(); - } else { - log.error("update redis lock failed, key: " + key); - } - } - }); - } finally { - lock.unlock(); - } - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompService.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompService.java deleted file mode 100644 index 1352112..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractCompService.java +++ /dev/null @@ -1,96 +0,0 @@ -package cc.smtweb.framework.core.mvc.service; - -import cc.smtweb.framework.core.annotation.SwBody; -import cc.smtweb.framework.core.common.R; -import cc.smtweb.framework.core.exception.BizException; -import cc.smtweb.framework.core.exception.SwException; -import cc.smtweb.framework.core.common.SwMap; -import cc.smtweb.framework.core.session.UserSession; - -/** - * Created by Akmm at 2022/3/2 10:39 - * 通用业务mvc总调度 - */ -public abstract class AbstractCompService { - public final static String TYPE_LIST = "list"; - public final static String TYPE_COMBO = "combo"; - public final static String TYPE_TREE = "tree"; - public final static String TYPE_LOAD = "load"; - public final static String TYPE_SAVE = "save"; - public final static String TYPE_DEL = "del"; - - protected abstract AbstractHandler createHandler(String type); - - protected AbstractHandler getHandler(SwMap params, UserSession us, String type) throws Exception { - AbstractHandler handler = createHandler(type); - if (handler == null) throw new BizException("暂不支持此类服务:" + type); - if (params == null) params = new SwMap(); - if (us == null) us = UserSession.createSys(); - handler.init(params, us); - return handler; - } - - protected R pageHandler(SwMap params, UserSession us, String type, IWorker worker) { - try { - AbstractHandler handler = getHandler(params, us, type); - return worker.doWork(handler); - } catch (Exception e) { - return R.error("操作失败!", e); - } - } - - //保存 - public R save(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_SAVE, handler -> ((AbstractSaveHandler)handler).save()); - } - - //树,换爹 - public R trcp(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_SAVE, handler -> ((AbstractSaveHandler)handler).changeParent()); - } - - //读取 - public R load(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_LOAD, handler -> ((AbstractLoadHandler)handler).load()); - } - - //删除 - public R del(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_DEL, handler -> ((AbstractDelHandler)handler).del()); - } - - //列表数据 - public R list(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_LIST, handler -> ((AbstractListHandler)handler).data()); - } - - //列表总记录数及合计栏 - public R listTotal(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_LIST, handler -> ((AbstractListHandler)handler).getTotal()); - } - - //combo数据 - public R combo(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_COMBO, handler -> ((DefaultComboHandler)handler).data()); - } - - //combo总记录数及合计栏 - public R comboTotal(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_COMBO, handler -> ((DefaultComboHandler)handler).getTotal()); - } - - //combo数据过滤 - public R comboFilter(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_COMBO, handler -> ((DefaultComboHandler)handler).filter()); - } - - //树数据 - public R tree(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_TREE, handler -> ((AbstractTreeHandler)handler).data()); - } - - //树过滤 - public R treeFilter(@SwBody SwMap params, UserSession us) { - return pageHandler(params, us, TYPE_TREE, handler -> ((AbstractTreeHandler)handler).filter()); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractSaveHandler.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractSaveHandler.java deleted file mode 100644 index 26b4b16..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractSaveHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -package cc.smtweb.framework.core.mvc.service; - -import cc.smtweb.framework.core.common.R; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.jdbc.AbsDbWorker; -import lombok.extern.slf4j.Slf4j; - -/** - * Created by Akmm at 2022/3/2 19:44 - * 保存 - */ -@Slf4j -public abstract class AbstractSaveHandler extends AbstractHandler { - protected T bean; - protected boolean isNew; - - - - public R save() { - long id = readId(); - - isNew = id <= 0L; - if (isNew) { - bean = createComp(); - } else { - bean = loadComp(id); - } - readFromPage(); - if (isNew) { - setNewId(); - } - checkValid(); - DbEngine.getInstance().doTrans(new AbsDbWorker() { - @Override - public void work(){ - saveDb(); - } - - @Override - public void doAfterDbCommit(){ - saveSuccess(); - } - - @Override - public void doAfterDbRollback(){ - saveFailed(); - } - }); - return R.success(bean); - } - - /** - * 读取页面传回来的id - * - * @return - */ - protected long readId() { - return params.readLong("id", 0L); - } - protected abstract void setNewId(); - - //从页面读取数据 - protected abstract void readFromPage(); - - //保存前的校验 - protected abstract void checkValid(); - - //保存到数据库 - protected abstract void saveDb(); - - //保存成功之后 - protected void saveSuccess() { - } - - //保存失败之后 - protected void saveFailed() { - } - - //构建一个新对象 - protected abstract T createComp(); - - //从数据库读取 - protected abstract T loadComp(long id); - - //树,改变父亲 - public abstract R changeParent(); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractTreeHandler.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractTreeHandler.java deleted file mode 100644 index 0bd7382..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/AbstractTreeHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -package cc.smtweb.framework.core.mvc.service; - -import cc.smtweb.framework.core.common.R; -import cc.smtweb.framework.core.common.SwMap; -import lombok.extern.slf4j.Slf4j; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created by Akmm at 2022/3/2 19:44 - * 列表服务 - */ -@Slf4j -public abstract class AbstractTreeHandler extends AbstractHandler { - //树过滤 - public R filter() { - List rows = filterData(); - List listRet = buildNodes(rows, true); - return R.success(listRet); - } - - public R data() { - List rows = getChildren(params.readLong("parent_id")); - List listRet = buildNodes(rows, params.readBool("lazy")); - - return R.success(listRet); - } - - //搜索 - protected abstract List filterData(); - //获取指定节点的下级节点 - protected abstract List getChildren(long id); - protected List getChildren(T bean) { - return getChildren(getId(bean)); - } - - //根据bean,构建treenode - private List buildNodes(List rows, boolean lazy) { - List listRet = new ArrayList<>(); - if (rows == null || rows.isEmpty()) { - return listRet; - } - for (T row : rows) { - SwMap node = new SwMap(); - node.put("id", getId(row)); - node.put("text", getText(row)); - List children = getChildren(row); - node.put("leaf", children == null || children.isEmpty()); - node.put("bean", row); - buildNode(node, row); - listRet.add(node); - if (!lazy) { - List list = buildNodes(children, lazy); - node.put("children", list); - } - } - return listRet; - } - - //根据bean,构建treenode - protected void buildNode(SwMap node, T bean) {} - - protected abstract long getId(T bean); - - protected abstract String getText(T bean); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultDelHandler.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultDelHandler.java deleted file mode 100644 index de73fc3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultDelHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package cc.smtweb.framework.core.mvc.service; - -import cc.smtweb.framework.core.cache.AbstractCache; -import cc.smtweb.framework.core.cache.CacheManager; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.EntityDao; -import cc.smtweb.framework.core.db.EntityHelper; -import cc.smtweb.framework.core.db.cache.ModelTableCache; -import cc.smtweb.framework.core.db.impl.DefaultEntity; -import cc.smtweb.framework.core.db.vo.ModelTable; - -/** - * Created by Akmm at 2022/3/2 19:52 - * 默认实体实现 - */ -public class DefaultDelHandler extends AbstractDelHandler { - protected String tableName; - - public DefaultDelHandler(String tableName) { - this.tableName = tableName; - } - - @Override - protected void checkValid() { - EntityHelper.checkExists(tableName, id); -// ModelTable table = ModelTableCache.getInstance().getByName(tableName); - //todo 检查外键引用的使用情况 - - } - - @Override - protected void delDb() { - EntityDao dao = DbEngine.getInstance().findDao(tableName); - dao.deleteEntity(id); - } - - @Override - protected void saveSuccess() { - super.saveSuccess(); - ModelTable table = ModelTableCache.getInstance().getByName(tableName); - if (table.isNeedCache()) { - AbstractCache cache = CacheManager.getIntance().getCache(tableName); - cache.remove(id); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultProvider.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultProvider.java deleted file mode 100644 index 3f15f88..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/DefaultProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -package cc.smtweb.framework.core.mvc.service; - -import cc.smtweb.framework.core.exception.BizException; -import cc.smtweb.framework.core.exception.SwException; -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.EntityDao; -import cc.smtweb.framework.core.db.EntityHelper; -import cc.smtweb.framework.core.db.impl.DefaultEntity; - -/** - * Created by Akmm at 2022/3/3 20:04 - */ -public class DefaultProvider extends AbstractCompProvider { - public String tableName; - - public DefaultProvider(String tableName) { - this.tableName = tableName; - } - - public T getBean(long id) { - return doGetData(tableName + "." + id, () -> this.loadBean(id)); - } - - private T loadBean(long id) { - EntityDao bdao = (EntityDao) DbEngine.getInstance().findDao(tableName); - T bean = bdao.queryEntity(id); - if (bean == null) throw new BizException("没有找到指定数据(id=" + id + ")"); - EntityHelper.loadBeanLink(bean.getTableName(), bean.getData(), null); - return bean; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/UserSession.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/UserSession.java deleted file mode 100644 index 492c6cf..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/session/UserSession.java +++ /dev/null @@ -1,31 +0,0 @@ -package cc.smtweb.framework.core.session; - -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; - -/** - * 用户会话缓存,前端调用API时传输 Auto_Token 参数来查找用户会话 - * @author xkliu - */ -@Getter @Setter -public class UserSession implements Serializable { - private static final long serialVersionUID = 3854315462714888716L; - // 用户ID - private long userId; - // 当前组织ID - private long companyId; - // 站点ID - private long siteId; - // 终端类型 - private byte terminalType; - - public static UserSession createSys() { - UserSession us = new UserSession(); - us.userId = 1; - us.companyId = 1; - us.terminalType = 0; - return us; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/ISysTask.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/ISysTask.java deleted file mode 100644 index cb5d8ec..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/ISysTask.java +++ /dev/null @@ -1,8 +0,0 @@ -package cc.smtweb.framework.core.systask; - -/** - * 任务接口 - */ -public interface ISysTask { - int run(); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/TaskStartEvent.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/TaskStartEvent.java deleted file mode 100644 index 35b8bf0..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/systask/TaskStartEvent.java +++ /dev/null @@ -1,4 +0,0 @@ -package cc.smtweb.framework.core.systask; - -public class TaskStartEvent { -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/DateUtil.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/DateUtil.java deleted file mode 100644 index 6c55dd3..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/DateUtil.java +++ /dev/null @@ -1,319 +0,0 @@ -package cc.smtweb.framework.core.util; - -import org.apache.commons.lang3.time.DateUtils; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * 日期工具类 - */ -public class DateUtil { -// private static ThreadLocal stdTimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("HH:mm:ss")); - private static ThreadLocal stdDateFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd")); - private static ThreadLocal stdDatetimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); -// private static ThreadLocal stdLongDatetimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")); - - private static ThreadLocal simpleWeekFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("EEEE")); - private static ThreadLocal simpleTimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("HHmmss")); - private static ThreadLocal simpleDateFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMdd")); - private static ThreadLocal simpleDatetimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmmss")); - private static ThreadLocal simpleLongDatetimeFormat = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmmssSSS")); - - - private DateUtil(){} - - /** - * 获取当前时间 - * @return - */ - public static Date now() { - return new Date(System.currentTimeMillis()); - } - - /** - * 按yyyy-MM-dd格式化 - * @param date - * @return - */ - public static String formatDate(Date date) { - return stdDateFormat.get().format(date); - } - - /** - * 按yyyy-MM-dd HH:mm:ss格式化 - * @param date - * @return - */ - public static String formatDateTime(Date date) { - return stdDatetimeFormat.get().format(date); - } - - /** - * 格式化 - * @param date YYYYMMDD格式 - * @return - */ - public static String formatDate(long date) { - String d = String.valueOf(date); - if(d.length() < 8) return d; //就是2011-03-04 13:11:01这种形式 - return d.substring(0, 4) + "-" + d.substring(4, 6) + "-" + d.substring(6, 8); - } - - public static String formatDateTime(long date) { - String d = String.valueOf(date); - if(d.length() < 8) return d; //就是2011-03-04 13:11:01这种形式 - if(d.length() < 14) return d.substring(0, 4) + "-" + d.substring(4, 6) + "-" + d.substring(6, 8); - return d.substring(0, 4) + "-" + d.substring(4, 6) + "-" + d.substring(6, 8) + " " + d.substring(8, 10) + ":" + d.substring(10, 12) + ":" + d.substring(12); - } - - /** - * 按yyyyMMdd格式化 - * @param date - * @return - */ - public static String formatSimpleDate(Date date) { - return simpleDateFormat.get().format(date); - } - - /** - * 按yyyyMMddHHmmss格式化 - * @param date - * @return - */ - public static String formatSimpleDateTime(Date date) { - return simpleDatetimeFormat.get().format(date); - } - - /** - * 按yyyyMMddHHmmssSSS格式化 - * @param date - * @return - */ - public static String formatSimpleDateTimeS(Date date) { - return simpleLongDatetimeFormat.get().format(date); - } - - /** - * 按yyyyMMdd格式化 - * @param date - * @return - */ - public static long date2Long(Date date) { - return Long.parseLong(formatSimpleDate(date)); - } - - /** - * 按yyyyMMddHHmmss格式化 - * @param date - * @return - */ - public static long dateTime2Long(Date date) { - return Long.parseLong(formatSimpleDateTime(date)); - } - - public static String nowDate() { - return formatDate(now()); - } - - public static String nowDateTime() { - return formatDateTime(now()); - } - - public static long nowDateLong() { - return date2Long(now()); - } - - public static long nowDateTimeLong() { - return dateTime2Long(now()); - } - - // 获得当天0点时间 - public static long getTimesmorning() { - return getTimesmorning(System.currentTimeMillis()); - } - - // 获得指定时间0点时间 - public static long getTimesmorning(long time) { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(time); - cal.set(Calendar.HOUR_OF_DAY, 0); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.MILLISECOND, 0); - return cal.getTimeInMillis(); - } - - // 获得昨天0点时间 - public static long getYesterdaymorning() { - return getTimesmorning() - DateUtils.MILLIS_PER_DAY; - } - - // 获得当天近7天时间 - public static long getWeekFromNow() { - return getTimesmorning() - DateUtils.MILLIS_PER_DAY * 7; - } - - // 获得当天24点时间 - public static long getTimesnight() { - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.HOUR_OF_DAY, 24); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.MILLISECOND, 0); - return cal.getTimeInMillis(); - } - - public static long getTimesnight(long time) { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(time); - cal.set(Calendar.HOUR_OF_DAY, 24); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.MILLISECOND, 0); - return cal.getTimeInMillis(); - } - - // 获得本周一0点时间 - public static long getTimesWeekmorning() { - Calendar cal = Calendar.getInstance(); - cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); - cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); - return cal.getTimeInMillis(); - } - - // 获得本周日24点时间 - public static long getTimesWeeknight() { - return getTimesWeekmorning() + DateUtils.MILLIS_PER_DAY * 7; - } - - // 获得本月第一天0点时间 - public static long getTimesMonthMorning() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(System.currentTimeMillis()); - cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); - cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH)); - return cal.getTimeInMillis(); - } - - // 获得本月最后一天24点时间 - public static long getTimesMontgHight() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(System.currentTimeMillis()); - cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); - cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH)); - cal.set(Calendar.HOUR_OF_DAY, 24); - return cal.getTimeInMillis(); - } - - public static long getLastMonthStartMorning() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(getTimesMonthMorning()); - cal.add(Calendar.MONTH, -1); - return cal.getTimeInMillis(); - } - - public static long getLastMonthStartMorning(long timeInMillis) { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(timeInMillis); - cal.add(Calendar.MONTH, -1); - return cal.getTimeInMillis(); - } - - public static Date getCurrentQuarterStartTime() { - Calendar c = Calendar.getInstance(); - c.setTimeInMillis(getTimesMonthMorning()); - int currentMonth = c.get(Calendar.MONTH) + 1; - SimpleDateFormat longSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - SimpleDateFormat shortSdf = new SimpleDateFormat("yyyy-MM-dd"); - Date now = null; - try { - if (currentMonth <= 3) { - c.set(Calendar.MONTH, 0); - } else if (currentMonth <= 6) { - c.set(Calendar.MONTH, 3); - } else if (currentMonth <= 9) { - c.set(Calendar.MONTH, 4); - } else if (currentMonth <= 12) { - c.set(Calendar.MONTH, 9); - } - - c.set(Calendar.DATE, 1); - now = longSdf.parse(shortSdf.format(c.getTime()) + " 00:00:00"); - } catch (Exception e) { - e.printStackTrace(); - } - return now; - } - - /** - * 当前季度的结束时间,即2012-03-31 23:59:59 - * - * @return - */ - public static Date getCurrentQuarterEndTime() { - Calendar cal = Calendar.getInstance(); - cal.setTime(getCurrentQuarterStartTime()); - cal.add(Calendar.MONTH, 3); - return cal.getTime(); - } - - public static long getCurrentYearStartTime() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(getTimesMonthMorning()); - cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); - cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.YEAR)); - return cal.getTimeInMillis(); - } - - public static long getCurrentYearEndTime() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(getCurrentYearStartTime()); - cal.add(Calendar.YEAR, 1); - return cal.getTimeInMillis(); - } - - public static long getLastYearStartTime() { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(getCurrentYearStartTime()); - cal.add(Calendar.YEAR, -1); - return cal.getTimeInMillis(); - } - - public static long getLastYearStartTime(long timeInMillis) { - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(timeInMillis); - cal.add(Calendar.YEAR, -1); - return cal.getTimeInMillis(); - } - - public static String parseTimeTag(Date date){ - if(date == null){ - return ""; - } - int now = date2Day(new Date()); - int day = date2Day(date); - int deDay = now - day; -// int deMonth = now/100 - day/100; - int deYear = now/10000 - day/10000; - if(deYear < 1){ - switch(deDay){ - case 0: return new SimpleDateFormat("HH:mm").format(date); - case 1: return "昨天"; - default: - return new SimpleDateFormat("MM-dd").format(date); - } - } - return new SimpleDateFormat("yyyy-MM-dd").format(date); - } - - private static int date2Day(Date date){ - return Integer.parseInt(new SimpleDateFormat("yyyyMMdd").format(date)); - } - - public static void main(String[] args) { - System.out.println(getTimesmorning()); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/FileUtil.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/FileUtil.java new file mode 100644 index 0000000..69669ae --- /dev/null +++ b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/FileUtil.java @@ -0,0 +1,7 @@ +package cc.smtweb.framework.core.util; + +/** + * Created by Akmm at 2022/7/4 21:37 + */ +public class FileUtil { +} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/MapUtil.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/MapUtil.java deleted file mode 100644 index 9b38819..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/MapUtil.java +++ /dev/null @@ -1,221 +0,0 @@ -package cc.smtweb.framework.core.util; - -import cc.smtweb.framework.core.common.SwMap; -import org.apache.commons.lang3.StringUtils; - -import java.util.*; - -/** - * map工具类 - */ -public class MapUtil { - private MapUtil() {} - - public static String readString(Map map, String name) { - return readString(map, name, ""); - } - - public static String readString(Map map, String name, String defaultValue) { - Object s = map.get(name); - - if (s != null) { - return s.toString(); - } - - return defaultValue; - } - - public static long readLong(Map map, String name) { - return readLong(map, name, 0L); - } - - public static long readLong(Map map, String name, Long defaultValue) { - Object s = map.get(name); - - if (s != null) { - if (s instanceof Number) { - return ((Number) s).longValue(); - } else { - String value = s.toString(); - if (StringUtils.isNotBlank(value)) { - return Long.parseLong(value); - } - } - } - - return defaultValue; - } - - public static Long[] readLongArray(Map map, String name) { - return readLongArray(map, name, null); - } - - public static Long[] readLongArray(Map map, String name, Long[] defaultValue) { - Object value = map.get(name); - - if (value != null) { - if (value instanceof Long[]) { - return (Long[]) value; - } else if (value instanceof Object[]) { - Object[] items = (Object[])value; - List result = new ArrayList<>(items.length); - - for (Object item: items) { - if (item != null) { - String s = item.toString(); - if (StringUtils.isNotBlank(s)) { - result.add(Long.valueOf(s)); - } - } - } - - if (result.size() > 0) { - return result.toArray(new Long[result.size()]); - } - } else if (value instanceof List) { - List items = (List)value; - List result = new ArrayList<>(items.size()); - - for (Object item: items) { - if (item != null) { - String s = item.toString(); - if (StringUtils.isNotBlank(s)) { - result.add(Long.valueOf(s)); - } - } - } - - if (result.size() > 0) { - return result.toArray(new Long[result.size()]); - } - } else if (value instanceof String) { - String[] ary = value.toString().split(","); - if (ary.length > 0) { - List result = new ArrayList<>(ary.length); - - for (String item: ary) { - if (StringUtils.isNotBlank(item)) { - result.add(Long.valueOf(item)); - } - } - - if (result.size() > 0) { - return result.toArray(new Long[result.size()]); - } - } - } - } - - return defaultValue; - } - - public static int readInt(Map map, String name) { - return readInt(map, name, 0); - } - - public static int readInt(Map map, String name, int defaultValue) { - Object s = map.get(name); - - if (s != null) { - if (s instanceof Number) { - return ((Number) s).intValue(); - } else { - String value = s.toString(); - if (StringUtils.isNotBlank(value)) { - return Integer.parseInt(value); - } - } - } - - return defaultValue; - } - - public static float readFloat(Map map, String name) { - return readFloat(map, name, 0.0F); - } - - public static float readFloat(Map map, String name, float defaultValue) { - Object s = map.get(name); - - if (s != null) { - if (s instanceof Number) { - return ((Number) s).floatValue(); - } else { - String value = s.toString(); - if (StringUtils.isNotBlank(value)) { - return Float.parseFloat(value); - } - } - } - - return defaultValue; - } - - public static double readDouble(Map map, String name) { - return readDouble(map, name, 0d); - } - - public static double readDouble(Map map, String name, double defaultValue) { - Object s = map.get(name); - - if (s != null) { - if (s instanceof Number) { - return ((Number) s).doubleValue(); - } else { - String value = s.toString(); - if (StringUtils.isNotBlank(value)) { - return Double.parseDouble(value); - } - } - } - - return defaultValue; - } - - public static boolean readBool(Map map, String name) { - return readBool(map, name, false); - } - - public static boolean readBool(Map map, String name, boolean defaultValue) { - Object s = map.get(name); - - if (s != null) { - if (s instanceof Boolean) { - return (Boolean) s; - } else { - String value = s.toString(); - if ("true".equalsIgnoreCase(value) || "1".equals(value) || "y".equalsIgnoreCase(value)) { - return Boolean.TRUE; - } - } - } - - return defaultValue; - } - - public static Set readLongSet(SwMap swMap, String name) { - Object value = swMap.get(name); - if (value != null) { - String[] ary = value.toString().split(","); - if (ary.length > 0) { - Set result = new HashSet<>(ary.length); - - for (String item : ary) { - if (StringUtils.isNotBlank(item)) { - result.add(Long.valueOf(item)); - } - } - - return result; - } - } - - return null; - } - - public static List> readListMap(Map map, String name) { - Object v = map.get(name); - if (v == null) return null; - return (List>)v; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/SqlUtil.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/SqlUtil.java deleted file mode 100644 index f67d777..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/SqlUtil.java +++ /dev/null @@ -1,18 +0,0 @@ -package cc.smtweb.framework.core.util; - -/** - * Created by Akmm at 2022/5/20 16:57 - * sql工具类 - */ -public class SqlUtil { - /** - * 将sql中的表名替换成schema.table的格式 - * @param sql - * @return - */ - public static String replaceTable(String sql) { - return sql; - } - - -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/DateSerializer.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/DateSerializer.java deleted file mode 100644 index c0e3961..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/DateSerializer.java +++ /dev/null @@ -1,70 +0,0 @@ -package cc.smtweb.framework.core.util.jackson; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; -import java.util.Date; - -public class DateSerializer extends JsonSerializer { - - @Override - public void serialize(Date value, JsonGenerator gen, - SerializerProvider serializers) throws IOException, - JsonProcessingException { - if (value == null) { - gen.writeNull(); - } else { - gen.writeString(toString(value)); -// gen.writeNumber(value); -// gen.writeString("\""); - } - } - - @SuppressWarnings("deprecation") - public String toString (Date value) { - int year = value.getYear() + 1900; - int month = value.getMonth() + 1; - int day = value.getDate(); - String yearString; - String monthString; - String dayString; - String yearZeros = "0000"; - StringBuffer timestampBuf; - - if (year < 1000) { - // Add leading zeros - yearString = "" + year; - yearString = yearZeros.substring(0, (4-yearString.length())) + - yearString; - } else { - yearString = "" + year; - } - if (month < 10) { - monthString = "0" + month; - } else { - monthString = Integer.toString(month); - } - if (day < 10) { - dayString = "0" + day; - } else { - dayString = Integer.toString(day); - } - - // do a string buffer here instead. - timestampBuf = new StringBuffer(10); - timestampBuf.append(yearString); - timestampBuf.append("-"); - timestampBuf.append(monthString); - timestampBuf.append("-"); - timestampBuf.append(dayString); - - return (timestampBuf.toString()); - } - - public static void main(String[] args) { - System.out.println(new DateSerializer().toString(new Date())); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/TimeSerializer.java b/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/TimeSerializer.java deleted file mode 100644 index ffc457b..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/util/jackson/TimeSerializer.java +++ /dev/null @@ -1,61 +0,0 @@ -package cc.smtweb.framework.core.util.jackson; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; -import java.util.Date; - -public class TimeSerializer extends JsonSerializer { - - @Override - public void serialize(Date value, JsonGenerator gen, - SerializerProvider serializers) throws IOException, - JsonProcessingException { - if (value == null) { - gen.writeNull(); - } else { - gen.writeString(toString(value)); -// gen.writeNumber(value); -// gen.writeString("\""); - } - } - - @SuppressWarnings("deprecation") - public String toString (Date value) { - int hour = value.getHours(); - int minute = value.getMinutes(); - int second = value.getSeconds(); - String hourString; - String minuteString; - String secondString; - if (hour < 10) { - hourString = "0" + hour; - } else { - hourString = Integer.toString(hour); - } - if (minute < 10) { - minuteString = "0" + minute; - } else { - minuteString = Integer.toString(minute); - } - if (second < 10) { - secondString = "0" + second; - } else { - secondString = Integer.toString(second); - } - - // do a string buffer here instead. - StringBuffer timestampBuf = new StringBuffer(8); - timestampBuf.append(hourString); - timestampBuf.append(":"); - timestampBuf.append(minuteString); - timestampBuf.append(":"); - timestampBuf.append(secondString); - - return (timestampBuf.toString()); - } - -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/AbstractTimer.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/AbstractTimer.java deleted file mode 100644 index c2713d0..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/AbstractTimer.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.serotonin.timer; - -import org.apache.commons.lang3.StringUtils; - -import java.util.List; - -abstract public class AbstractTimer { - abstract public boolean isInitialized(); - - abstract public long currentTimeMillis(); - - abstract public void execute(Runnable command); - - public void execute(Runnable command, String name) { - if (StringUtils.isBlank(name)) - execute(command); - else - execute(new NamedRunnable(command, name)); - } - - abstract public void execute(ScheduledRunnable command, long fireTime); - - public void execute(ScheduledRunnable command, long fireTime, String name) { - if (StringUtils.isBlank(name)) - execute(command, fireTime); - else - execute(new ScheduledNamedRunnable(command, name), fireTime); - } - - final public TimerTask schedule(TimerTask task) { - if (task.getTimer() == this) - throw new IllegalStateException("Task already scheduled or cancelled"); - - task.setTimer(this); - scheduleImpl(task); - - return task; - } - - public void scheduleAll(AbstractTimer that) { - for (TimerTask task : that.cancel()) - schedule(task); - } - - abstract protected void scheduleImpl(TimerTask task); - - abstract public List cancel(); - - abstract public int purge(); - - abstract public int size(); - - abstract public List getTasks(); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/CronTimerTrigger.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/CronTimerTrigger.java deleted file mode 100644 index 3c55a1b..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/CronTimerTrigger.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.serotonin.timer; - -import java.text.ParseException; -import java.util.Date; - -public class CronTimerTrigger extends TimerTrigger { - private final CronExpression cronExpression; - private long mostRecent; - - public CronTimerTrigger(String pattern) throws ParseException { - cronExpression = new CronExpression(pattern); - } - - @Override - protected long calculateNextExecutionTimeImpl() { - mostRecent = nextExecutionTime; - return cronExpression.getNextValidTimeAfter(new Date(nextExecutionTime)).getTime(); - } - - @Override - protected long calculateNextExecutionTimeImpl(long after) { - return cronExpression.getNextValidTimeAfter(new Date(after)).getTime(); - } - - @Override - protected long getFirstExecutionTime() { - return cronExpression.getNextValidTimeAfter(new Date(timer.currentTimeMillis())).getTime(); - } - - @Override - public long mostRecentExecutionTime() { - return mostRecent; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ExecutionRejectedException.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ExecutionRejectedException.java deleted file mode 100644 index abf9455..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ExecutionRejectedException.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.serotonin.timer; - -public class ExecutionRejectedException extends Exception { - /** - * - */ - private static final long serialVersionUID = 1L; - - public ExecutionRejectedException() { - super(); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/FixedDelayTrigger.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/FixedDelayTrigger.java deleted file mode 100644 index 9f7e141..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/FixedDelayTrigger.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.serotonin.timer; - -import java.util.Date; - -public class FixedDelayTrigger extends AbstractTimerTrigger { - private final long period; - - public FixedDelayTrigger(long delay, long period) { - super(delay); - this.period = period; - } - - public FixedDelayTrigger(Date start, long period) { - super(start); - this.period = period; - } - - @Override - protected long calculateNextExecutionTimeImpl() { - return timer.currentTimeMillis() + period; - } - - @Override - protected long calculateNextExecutionTimeImpl(long after) { - return after + period; - } - - @Override - public long mostRecentExecutionTime() { - return nextExecutionTime - period; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/NamedRunnable.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/NamedRunnable.java deleted file mode 100644 index 6d4b116..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/NamedRunnable.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.serotonin.timer; - -/** - * A class that wraps a Runnable and sets the thread name to the given name. - * - * @author Matthew Lohbihler - */ -public class NamedRunnable implements Runnable { - private final Runnable runnable; - private final String name; - - public NamedRunnable(Runnable runnable, String name) { - this.runnable = runnable; - this.name = name; - } - - public void run() { - String originalName = Thread.currentThread().getName(); - - // Append the given name to the original name. - Thread.currentThread().setName(originalName + " --> " + name); - - try { - // Ok, go ahead and run the thingy. - runnable.run(); - } - finally { - // Return the name to its original. - Thread.currentThread().setName(originalName); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledNamedRunnable.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledNamedRunnable.java deleted file mode 100644 index 0f75b9c..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledNamedRunnable.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.serotonin.timer; - -/** - * A class that wraps a Runnable and sets the thread name to the given name. - * - * @author Matthew Lohbihler - */ -public class ScheduledNamedRunnable implements ScheduledRunnable { - private final ScheduledRunnable runnable; - private final String name; - - public ScheduledNamedRunnable(ScheduledRunnable runnable, String name) { - this.runnable = runnable; - this.name = name; - } - - @Override - public void run(long fireTime) { - String originalName = Thread.currentThread().getName(); - - // Append the given name to the original name. - Thread.currentThread().setName(originalName + " --> " + name); - - try { - // Ok, go ahead and run the thingy. - runnable.run(fireTime); - } - finally { - // Return the name to its original. - Thread.currentThread().setName(originalName); - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledRunnable.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledRunnable.java deleted file mode 100644 index e16ef8c..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/ScheduledRunnable.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.serotonin.timer; - -/** - * Same as {@link Runnable}, but has a fireTime (millis) parameter. - */ -public interface ScheduledRunnable { - void run(long fireTime); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimeSource.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimeSource.java deleted file mode 100644 index a2b1e69..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimeSource.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.serotonin.timer; - -public class SimulationTimeSource implements TimeSource { - private long time; - - public long currentTimeMillis() { - return time; - } - - public void setTime(long time) { - this.time = time; - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimer.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimer.java deleted file mode 100644 index 542691c..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/SimulationTimer.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.serotonin.timer; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -/** - * The simulation timer is a single threaded timer under the temporal control of the next and fastForward methods. Tasks - * are run in the same thread as the timer, so they will seem to complete instantly. Running them in an executor has the - * opposite effect of making them appear to take an awful long time to complete. - * - * @author Matthew Lohbihler - */ -public class SimulationTimer extends AbstractTimer { - private final List queue = new ArrayList(); - private boolean cancelled; - private long currentTime; - - @Override - public boolean isInitialized() { - return true; - } - - public void setStartTime(long startTime) { - currentTime = startTime; - } - - public void next() { - fastForwardTo(currentTime + 1); - } - - public void fastForwardTo(long time) { - while (!queue.isEmpty() && queue.get(0).trigger.nextExecutionTime <= time) { - TimerTask task = queue.get(0); - - currentTime = task.trigger.nextExecutionTime; - - if (task.state == TimerTask.CANCELLED) - queue.remove(0); - else { - long next = task.trigger.calculateNextExecutionTime(); - if (next <= 0) { // Non-repeating, remove - queue.remove(0); - task.state = TimerTask.EXECUTED; - } - else { - // Repeating task, reschedule - task.trigger.nextExecutionTime = next; - updateQueue(); - } - - task.run(); - } - } - - currentTime = time; - } - - @Override - public void execute(Runnable command) { - command.run(); - } - - @Override - public void execute(ScheduledRunnable command, long fireTime) { - command.run(fireTime); - } - - @Override - protected void scheduleImpl(TimerTask task) { - if (cancelled) - throw new IllegalStateException("Timer already cancelled."); - - if (task.state == TimerTask.CANCELLED || task.state == TimerTask.EXECUTED) - throw new IllegalStateException("Task already executed or cancelled"); - - if (task.state == TimerTask.VIRGIN) { - long time = task.trigger.getFirstExecutionTime(); - if (time < 0) - throw new IllegalArgumentException("Illegal execution time."); - - task.trigger.nextExecutionTime = time; - task.state = TimerTask.SCHEDULED; - } - - queue.add(task); - updateQueue(); - } - - private void updateQueue() { - Collections.sort(queue, new Comparator() { - @Override - public int compare(TimerTask t1, TimerTask t2) { - long diff = t1.trigger.nextExecutionTime - t2.trigger.nextExecutionTime; - if (diff < 0) - return -1; - if (diff == 0) - return 0; - return 1; - } - }); - } - - @Override - public List cancel() { - cancelled = true; - List tasks = getTasks(); - queue.clear(); - return tasks; - } - - @Override - public int purge() { - int result = 0; - - for (int i = queue.size(); i > 0; i--) { - if (queue.get(i).state == TimerTask.CANCELLED) { - queue.remove(i); - result++; - } - } - - return result; - } - - @Override - public int size() { - return queue.size(); - } - - @Override - public List getTasks() { - return new ArrayList(queue); - } - - @Override - public long currentTimeMillis() { - return currentTime; - } - // - // public static void main(String[] args) throws Exception { - // long startTime = System.currentTimeMillis() - 32000; - // SimulationTimer simTimer = new SimulationTimer(); - // simTimer.setStartTime(startTime); - // - // simTimer.schedule(new NamedTask("task 7", new OneTimeTrigger(25000))); - // simTimer.schedule(new NamedTask("task 1", new OneTimeTrigger(1000))); - // simTimer.schedule(new NamedTask("task 2", new OneTimeTrigger(2000))); - // simTimer.schedule(new NamedTask("task 4", new OneTimeTrigger(20000))); - // simTimer.schedule(new NamedTask("task 5", new OneTimeTrigger(21000))); - // simTimer.schedule(new NamedTask("task 3", new OneTimeTrigger(10000))); - // simTimer.schedule(new NamedTask("task 6", new OneTimeTrigger(22000))); - // simTimer.schedule(new NamedTask("rate", new FixedRateTrigger(5000, - // 1800))); - // simTimer.schedule(new NamedTask("delay", new FixedDelayTrigger(6000, - // 2100))); - // simTimer.schedule(new NamedTask("cron", new - // CronTimerTrigger("0/6 * * * * ?"))); - // - // simTimer.fastForwardTo(System.currentTimeMillis()); - // - // System.out.println("Rescheduling"); - // - // RealTimeTimer rtTimer = new RealTimeTimer(); - // ExecutorService executorService = Executors.newCachedThreadPool(); - // rtTimer.init(executorService); - // rtTimer.scheduleAll(simTimer); - // - // Thread.sleep(20000); - // - // rtTimer.cancel(); - // executorService.shutdown(); - // } - // - // static class NamedTask extends TimerTask { - // String name; - // - // NamedTask(String name, TimerTrigger trigger) { - // super(trigger); - // this.name = name; - // } - // - // @Override - // public String toString() { - // return "NamedTask(" + name + ")"; - // } - // - // @Override - // protected void run(long runtime) { - // System.out.println(name + " ran at " + runtime); - // } - // } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimeoutTask.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimeoutTask.java deleted file mode 100644 index eb6d679..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimeoutTask.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.serotonin.timer; - -import java.util.Date; - -/** - * A simple way of creating a timeout. - * - * @author Matthew - */ -public class TimeoutTask extends TimerTask { - private final ScheduledRunnable client; - - public TimeoutTask(long delay, ScheduledRunnable client) { - this(new OneTimeTrigger(delay), client); - } - - public TimeoutTask(Date date, ScheduledRunnable client) { - this(new OneTimeTrigger(date), client); - } - - public TimeoutTask(TimerTrigger trigger, ScheduledRunnable client) { - super(trigger); - this.client = client; - } - - @Override - public void run(long runtime) { - client.run(runtime); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerThread.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerThread.java deleted file mode 100644 index 5c52599..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerThread.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.serotonin.timer; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.RejectedExecutionException; - -class TimerThread extends Thread { - private static final Log LOG = LogFactory.getLog(TimerThread.class); - - /** - * This flag is set to false by the reaper to inform us that there are no more live references to our Timer object. - * Once this flag is true and there are no more tasks in our queue, there is no work left for us to do, so we - * terminate gracefully. Note that this field is protected by queue's monitor! - */ - boolean newTasksMayBeScheduled = true; - - /** - * Our Timer's queue. We store this reference in preference to a reference to the Timer so the reference graph - * remains acyclic. Otherwise, the Timer would never be garbage-collected and this thread would never go away. - */ - private final TaskQueue queue; - - private final ExecutorService executorService; - private final TimeSource timeSource; - - TimerThread(TaskQueue queue, ExecutorService executorService, TimeSource timeSource) { - this.queue = queue; - this.executorService = executorService; - this.timeSource = timeSource; - } - - @Override - public void run() { - try { - mainLoop(); - } - catch (Throwable t) { - LOG.fatal("TimerThread failed", t); - } - finally { - // Someone killed this Thread, behave as if Timer was cancelled - synchronized (queue) { - newTasksMayBeScheduled = false; - queue.clear(); // Eliminate obsolete references - } - } - } - - void execute(Runnable command) { - executorService.execute(command); - } - - void execute(final ScheduledRunnable command, final long fireTime) { - executorService.execute(new Runnable() { - @Override - public void run() { - command.run(fireTime); - } - }); - } - - ExecutorService getExecutorService() { - return executorService; - } - - /** - * The main timer loop. (See class comment.) - */ - private void mainLoop() { - while (true) { - try { - TimerTask task; - boolean taskFired; - synchronized (queue) { - // Wait for queue to become non-empty - while (queue.isEmpty() && newTasksMayBeScheduled) - queue.wait(); - if (queue.isEmpty()) - break; // Queue is empty and will forever remain; die - - // Queue nonempty; look at first evt and do the right thing - long executionTime; - task = queue.getMin(); - synchronized (task.lock) { - if (task.state == TimerTask.CANCELLED) { - queue.removeMin(); - continue; // No action required, poll queue again - } - executionTime = task.trigger.nextExecutionTime; - if (taskFired = (executionTime <= timeSource.currentTimeMillis())) { - long next = task.trigger.calculateNextExecutionTime(); - if (next <= 0) { // Non-repeating, remove - queue.removeMin(); - task.state = TimerTask.EXECUTED; - } - else - // Repeating task, reschedule - queue.rescheduleMin(next); - } - } - if (!taskFired) {// Task hasn't yet fired; wait - long wait = executionTime - timeSource.currentTimeMillis(); - if (wait > 0) - queue.wait(wait); - } - } - if (taskFired) { - // Task fired; run it, holding no locks - try { - executorService.execute(task); - } - catch (RejectedExecutionException e) { - LOG.warn("Rejected task: " + task, e); - } - } - } - catch (InterruptedException e) { - // no op - } - } - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerTrigger.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerTrigger.java deleted file mode 100644 index be2e734..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/TimerTrigger.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.serotonin.timer; - -import java.util.Date; - -abstract public class TimerTrigger { - // The maximum time that a task can run late. If the next run time is calculated to be more than this in the past - // it will be adjusted to be more current. - private static final int MAX_TARDINESS = 1000 * 60 * 10; // 10 minutes. - - protected AbstractTimer timer; - - void setTimer(AbstractTimer timer) { - this.timer = timer; - } - - AbstractTimer getTimer() { - return timer; - } - - /** - * Next execution time for this task in the format returned by System.currentTimeMillis, assuming this task is - * scheduled for execution. For repeating tasks, this field is updated prior to each task execution. - */ - long nextExecutionTime; - - /** - * Returns the scheduled execution time of the most recent actual execution of this task. (If this - * method is invoked while task execution is in progress, the return value is the scheduled execution time of the - * ongoing task execution.) - * - *

- * This method is typically invoked from within a task's run method, to determine whether the current execution of - * the task is sufficiently timely to warrant performing the scheduled activity: - * - *

-     * public void run() {
-     *     if (System.currentTimeMillis() - scheduledExecutionTime() >= MAX_TARDINESS)
-     *         return; // Too late; skip this execution.
-     *     // Perform the task
-     * }
-     * 
- * - * This method is typically not used in conjunction with fixed-delay execution repeating tasks, as - * their scheduled execution times are allowed to drift over time, and so are not terribly significant. - * - * @return the time at which the most recent execution of this task was scheduled to occur, in the format returned - * by Date.getTime(). The return value is undefined if the task has yet to commence its first execution. - * @see Date#getTime() - */ - abstract public long mostRecentExecutionTime(); - - abstract protected long getFirstExecutionTime(); - - public long getNextExecutionTime() { - return nextExecutionTime; - } - - /** - * Return the time of the next execution, or -1 if there isn't one. - * - * @return - */ - protected final long calculateNextExecutionTime() { - long next = calculateNextExecutionTimeImpl(); - - // If the system time changes on the O/S (due to NTP, manual change, or some other reason) this calculation - // can cause a good amount of disturbance (either a schedule that doesn't run for a while, or one that runs - // repeatedly in order to catch up). We check here to assure that the next execution time is not entirely - // ridiculous, and adjust it if so. - long now = timer.currentTimeMillis(); - if (now - next >= MAX_TARDINESS) - next = calculateNextExecutionTimeImpl(now); - - return next; - } - - abstract protected long calculateNextExecutionTimeImpl(); - - abstract protected long calculateNextExecutionTimeImpl(long after); -} diff --git a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/AsyncJobSink.java b/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/AsyncJobSink.java deleted file mode 100644 index b506920..0000000 --- a/smtweb-framework/sw-framework-core/src/main/java/com/serotonin/timer/sync/AsyncJobSink.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.serotonin.timer.sync; - -import java.util.concurrent.ConcurrentLinkedQueue; - -public class AsyncJobSink implements Runnable { - private final ConcurrentLinkedQueue inbox = new ConcurrentLinkedQueue(); - - private Thread thread; - private volatile boolean running; - - public synchronized boolean initialize() { - if (thread == null) { - running = true; - thread = new Thread(this); - thread.start(); - return true; - } - return false; - } - - public synchronized void terminate() { - if (thread != null) { - running = false; - try { - thread.join(); - } - catch (InterruptedException e) { - // no op - } - thread = null; - } - } - - public boolean add(Event event) { - if (running) - return inbox.offer(event); - return false; - } - - @Override - public void run() { - int processed = 0; - - while (true) { - Event event = inbox.poll(); - if (event != null) { - System.out.println("Processed " + event.getId()); - processed++; - } - else if (!running) - break; - else { - System.out.println("null"); - try { - Thread.sleep(50); - } - catch (InterruptedException e) { - // no op - } - } - } - - System.out.println("Exiting having processed " + processed); - } - - static class Event { - static int nextId = 0; - - private final String id; - - public Event() { - id = Integer.toString(nextId++); - } - - public String getId() { - return id; - } - } - - public static void main(String[] args) throws Exception { - AsyncJobSink sink = new AsyncJobSink(); - sink.initialize(); - - long start = System.currentTimeMillis(); - - int failed = 0; - for (int i = 0; i < 100; i++) { - Event event = new Event(); - if (!sink.add(event)) - failed++; - } - - Thread.sleep(10000); - sink.terminate(); - - System.out.println("Failed to add " + failed); - System.out.println("Runtime: " + (System.currentTimeMillis() - start)); - } -} diff --git a/smtweb-framework/sw-framework-core/src/main/resources/config/application.yaml b/smtweb-framework/sw-framework-core/src/main/resources/config/application.yaml deleted file mode 100644 index caf4dfc..0000000 --- a/smtweb-framework/sw-framework-core/src/main/resources/config/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - profiles: - active: dev \ No newline at end of file diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/JsonTest.java b/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/JsonTest.java deleted file mode 100644 index b2de949..0000000 --- a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/JsonTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package cc.smtweb.framework.test; - -import cc.smtweb.framework.core.util.JsonUtil; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import lombok.Data; -import org.junit.jupiter.api.Test; -import org.omg.PortableInterceptor.SYSTEM_EXCEPTION; - -import java.util.ArrayList; -import java.util.List; - -public class JsonTest { - @Test - public void testList() throws JsonProcessingException { - { - List list = JsonUtil.OBJECT_MAPPER.readValue("[{ \"value\": 1 }, { \"value\": 2 }, { \"value\": 3 }]", ArrayList.class); - - System.out.println(list.get(0).getClass()); - } - - { - List list = JsonUtil.parseList("[{ \"value\": 1 }, { \"value\": 2 }, { \"value\": 3 }]", JsonItem.class); - - System.out.println(list.get(0).getClass()); - } - } -} - -@Data -class JsonItem { - private Integer value; -} diff --git a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/TestMain.java b/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/TestMain.java deleted file mode 100644 index 748ed58..0000000 --- a/smtweb-framework/sw-framework-core/src/test/java/cc/smtweb/framework/test/TestMain.java +++ /dev/null @@ -1,23 +0,0 @@ -package cc.smtweb.framework.test; - -import cc.smtweb.framework.core.db.DbEngine; -import cc.smtweb.framework.core.db.impl.DefaultEntity; -import cc.smtweb.framework.core.db.vo.ModelTable; -import cc.smtweb.framework.core.util.JsonUtil; - -import java.util.List; -import java.util.Map; - -/** - * Created by Akmm at 2021/12/25 22:21 - */ -public class TestMain { - - public static void main(String[] args) { - List list = DbEngine.getInstance().query("select * from asp_model_project", DefaultEntity.class); - System.out.println(list.size()); - /*ModelTable table = new ModelTable(); - table.setId(1); - table.setContent(s);*/ - } -} diff --git a/smtweb-framework/sw-framework-core/target/classes/META-INF/spring.factories b/smtweb-framework/sw-framework-core/target/classes/META-INF/spring.factories deleted file mode 100644 index 341ca1d..0000000 --- a/smtweb-framework/sw-framework-core/target/classes/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cc.smtweb.framework.core.CoreAutoConfiguration diff --git a/smtweb-framework/sw-framework-core/target/classes/config/application-dev.yaml b/smtweb-framework/sw-framework-core/target/classes/config/application-dev.yaml deleted file mode 100644 index bf8c0cf..0000000 --- a/smtweb-framework/sw-framework-core/target/classes/config/application-dev.yaml +++ /dev/null @@ -1,61 +0,0 @@ -smtweb: - machine-id: 1 - file: - local-path: /data/files/smart/ - host: http://127.0.0.1 - url: ${smtweb.file.host}:${server.port}${server.servlet.context-path}/${smtweb.file.local-path} - db: - type: mysql - default: - rule: - prefix: _smt_ - replace: smt_ -server: - port: 8888 - servlet: - context-path: / -logging: - level: - root: INFO - cc.smtweb: DEBUG -spring: - # 设置服务名 - application: - name: smtweb_core - main: - allow-bean-definition-overriding: true - mvc: - static-path-pattern: /static/** - redis: - name: ${smtweb.machine-id} - host: 127.0.0.1 - port: 6379 - password: - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/smt_asp?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false - username: root - password: root - servlet: - multipart: - max-file-size: 104857600000 - max-request-size: 10485760000000 -# profiles: -# include: role - cache: - type: caffeine - cache-names: - - core - caffeine: - spec: maximumSize=1024,expireAfterWrite=2h -park: - secret: - key: null -# key: cmVmb3JtZXJyZWZvcm1lcg== -swagger: - name: smtweb-core - version: 2.0 - enabled: true - - - diff --git a/smtweb-framework/sw-framework-core/target/classes/config/application-prod.yaml b/smtweb-framework/sw-framework-core/target/classes/config/application-prod.yaml deleted file mode 100644 index eaed90b..0000000 --- a/smtweb-framework/sw-framework-core/target/classes/config/application-prod.yaml +++ /dev/null @@ -1,52 +0,0 @@ -sme: - machine-id: 1 - file-local-path: /data/files/smart/ - file-host: http://member.sumi168.cn - file-url: ${sme.file-host}:${server.port}${server.servlet.context-path}/${sme.file-local-path} - -server: - port: 10001 - servlet: - context-path: /user - -feign: - hystrix: - enabled: false -logging: - level: - smtweb: DEBUG - -spring: - # 设置服务名 - application: - name: smtweb-user - main: - allow-bean-definition-overriding: true - mvc: - static-path-pattern: /static/** - redis: - host: 127.0.0.1 - port: 6379 - datasource: - user: - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/smt_user?useUnicode=true&characterEncoding=utf-8&useTimezone=true&serverTimezone=CTT&allowMultiQueries=true - username: smt - password: smt_123456 - - servlet: - multipart: - max-file-size: 104857600000 - max-request-size: 10485760000000 - -swagger: - name: smart - version: 1.0.1 - enabled: false - -weixin: - url: http://devpk.smart.smefdd.com - appId: wx8d11474c01b92378 - appSecret: e1fa7bcdf27b46e7d69edad68ea8724b - - diff --git a/smtweb-framework/sw-framework-core/target/classes/config/application.yaml b/smtweb-framework/sw-framework-core/target/classes/config/application.yaml deleted file mode 100644 index caf4dfc..0000000 --- a/smtweb-framework/sw-framework-core/target/classes/config/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - profiles: - active: dev \ No newline at end of file diff --git a/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index a60fe75..0000000 --- a/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,296 +0,0 @@ -cc\smtweb\framework\core\common\SwEnum$DatasetType.class -cc\smtweb\framework\core\common\SwEnum$DataType.class -cc\smtweb\framework\core\db\impl\DefaultDatabaseInfoImpl$1.class -cc\smtweb\framework\core\common\SwEnum$OptType.class -cc\smtweb\framework\core\mvc\controller\scan\ScanContext.class -cc\smtweb\framework\core\mvc\controller\access\SingletonFieldAccess.class -cc\smtweb\framework\core\common\SwEnum$EditorType.class -cc\smtweb\framework\core\db\cache\ModelTableCache$1.class -cc\smtweb\framework\core\db\cache\ModelTableCache.class -cc\smtweb\framework\core\util\jackson\LongDeserializer.class -cc\smtweb\framework\core\mvc\service\IWorker.class -cc\smtweb\framework\core\systask\TaskStartEvent.class -cc\smtweb\framework\core\cache\AbstractCache$IGetBeanKeys.class -cc\smtweb\framework\core\mvc\controller\binder\bean\UserSessionEditor.class -cc\smtweb\framework\core\cache\redis\RedisSysTask.class -cc\smtweb\framework\core\db\jdbc\BaseBeanPropertyRowMapper.class -cc\smtweb\framework\core\util\jackson\NullSerializer.class -com\serotonin\timer\sync\Synchronizer$TaskWrapper.class -cc\smtweb\framework\core\common\AbstractEnum$IntEnumBean.class -cc\smtweb\framework\core\mvc\controller\access\ControllerAccess.class -cc\smtweb\framework\core\common\SwEnum$TableType.class -cc\smtweb\framework\core\mvc\scheduler\job\GroupJobQueue.class -cc\smtweb\framework\core\util\jackson\DateSerializer.class -cc\smtweb\framework\core\CoreApplicationStartedListener.class -cc\smtweb\framework\core\mvc\controller\binder\param\AbstractRequestEditor.class -cc\smtweb\framework\core\mvc\controller\MethodAccessManager.class -cc\smtweb\framework\core\mvc\controller\binder\param\CharEditor.class -cc\smtweb\framework\core\common\SwEnum.class -cc\smtweb\framework\core\db\cache\EntityCache.class -cc\smtweb\framework\core\mvc\scheduler\job\SimpleJob.class -com\serotonin\timer\OneTimeTrigger.class -cc\smtweb\framework\core\mvc\variable\SwVariable.class -cc\smtweb\framework\core\util\kryo\KryoTool.class -cc\smtweb\framework\core\mvc\controller\scan\IScanActionBuilder.class -cc\smtweb\framework\core\mvc\realm\exception\AuthorizationException.class -cc\smtweb\framework\core\mvc\service\AbstractSaveHandler$1.class -cc\smtweb\framework\core\mvc\controller\binder\BeanContext.class -cc\smtweb\framework\core\mvc\service\AbstractCompProvider.class -cc\smtweb\framework\core\db\vo\ModelCache.class -cc\smtweb\framework\core\mvc\controller\access\MethodParamAccess.class -cc\smtweb\framework\core\db\sqlbuilder\InsertSqlBuilder.class -cc\smtweb\framework\core\mvc\service\DefaultSaveHandler.class -com\serotonin\timer\NonConcurrentTask.class -cc\smtweb\framework\core\mvc\controller\scan\PackageScanner.class -cc\smtweb\framework\core\common\AbstractEnum$EnumBean.class -cc\smtweb\framework\core\mvc\scheduler\job\SimpleJobQueue.class -com\serotonin\timer\TimeoutTask.class -cc\smtweb\framework\core\mvc\service\AbstractLoadHandler.class -cc\smtweb\framework\core\mvc\service\DefaultDelHandler.class -cc\smtweb\framework\core\util\NumberUtil.class -cc\smtweb\framework\core\db\jdbc\IdGenerator.class -com\serotonin\timer\TimerThread.class -cc\smtweb\framework\core\mvc\controller\access\IMethodAccess.class -com\serotonin\timer\sync\Synchronizer$TestTask.class -cc\smtweb\framework\core\exception\BindBeanException.class -cc\smtweb\framework\core\mvc\controller\binder\param\LongEditor.class -cc\smtweb\framework\core\CoreAutoConfiguration.class -cc\smtweb\framework\core\session\SessionManager.class -com\serotonin\timer\ScheduledRunnable.class -cc\smtweb\framework\core\mvc\controller\access\FieldAccess.class -com\serotonin\timer\ModelTimeoutTask.class -cc\smtweb\framework\core\db\vo\ModelIndex.class -cc\smtweb\framework\core\mvc\controller\binder\bean\HttpServletRequestEditor.class -cc\smtweb\framework\core\mvc\realm\service\PermChecker.class -com\serotonin\timer\TimerTrigger.class -cc\smtweb\framework\core\db\sqlbuilder\SelectSqlBuilder.class -cc\smtweb\framework\core\util\jackson\LongSerializer.class -com\serotonin\timer\SimulationTimer.class -cc\smtweb\framework\core\annotation\SwAction.class -cc\smtweb\framework\core\systask\WebStartedEvent.class -com\serotonin\timer\AbstractTimer.class -cc\smtweb\framework\core\cache\CacheManager.class -cc\smtweb\framework\core\systask\ISysTask.class -com\serotonin\timer\SystemTimeSource.class -cc\smtweb\framework\core\mvc\config\GlobalExceptionHandler.class -cc\smtweb\framework\core\db\jdbc\SwMapPropertyRowMapper.class -cc\smtweb\framework\core\util\IpAddrUtil.class -cc\smtweb\framework\core\util\MapUtil.class -cc\smtweb\framework\core\mvc\service\AbstractCompService.class -cc\smtweb\framework\core\mvc\controller\binder\param\DoubleEditor.class -cc\smtweb\framework\core\mvc\service\SwListData.class -cc\smtweb\framework\core\mvc\controller\binder\param\FloatEditor.class -cc\smtweb\framework\core\common\SwEnum$DataTypeBean.class -cc\smtweb\framework\core\mvc\scheduler\job\GroupJob.class -cc\smtweb\framework\core\db\DbEngine.class -cc\smtweb\framework\core\db\impl\UtilTime.class -cc\smtweb\framework\core\annotation\SwTable.class -cc\smtweb\framework\core\db\sqlbuilder\DirectSelectSqlBuilder.class -cc\smtweb\framework\core\cache\ISwCache.class -cc\smtweb\framework\core\db\cache\ModelDatabaseCache.class -cc\smtweb\framework\core\db\sqlbuilder\SqlBuilder.class -cc\smtweb\framework\core\session\SessionUtil.class -cc\smtweb\framework\core\util\jackson\TimestampDeserializer.class -cc\smtweb\framework\core\util\DateUtil.class -cc\smtweb\framework\core\exception\JsonParseException.class -cc\smtweb\framework\core\mvc\controller\binder\param\ShortEditor.class -cc\smtweb\framework\core\mvc\scheduler\AbstractJobExecutor.class -cc\smtweb\framework\core\mvc\service\AbstractDelHandler$1.class -cc\smtweb\framework\core\db\EntityHelper.class -cc\smtweb\framework\core\db\EntityDao.class -cc\smtweb\framework\core\db\vo\ModelDatabase.class -cc\smtweb\framework\core\cache\AbstractEntityCache.class -cc\smtweb\framework\core\common\AbstractEnum$IEnumWorker.class -com\serotonin\timer\sync\AsyncJobSink.class -cc\smtweb\framework\core\mvc\service\AbstractDelHandler.class -cc\smtweb\framework\core\mvc\controller\binder\bean\BeanEditor.class -cc\smtweb\framework\core\mvc\SchedulerManager.class -cc\smtweb\framework\core\cache\AbstractCache.class -cc\smtweb\framework\core\db\jdbc\JdbcTrans.class -com\serotonin\timer\ValueSet.class -cc\smtweb\framework\core\mvc\controller\DefaultPageController.class -cc\smtweb\framework\core\db\impl\DefaultDatabaseInfoImpl$2.class -cc\smtweb\framework\core\cache\redis\RedisManager.class -cc\smtweb\framework\core\mvc\controller\ApiController.class -cc\smtweb\framework\core\common\SwEnum$FieldType.class -cc\smtweb\framework\core\mvc\controller\binder\param\BeanTypeEditor.class -cc\smtweb\framework\core\annotation\SwService.class -cc\smtweb\framework\core\common\SwEnum$FieldTypeBean.class -cc\smtweb\framework\core\annotation\SwConstruct.class -com\serotonin\timer\TaskQueue.class -com\serotonin\timer\TimerTask.class -cc\smtweb\framework\core\db\config\DbEngineConfiguration.class -cc\smtweb\framework\core\util\VariableUtil.class -cc\smtweb\framework\core\mvc\realm\exception\AuthenticationException.class -cc\smtweb\framework\core\db\impl\IDatabaseInfo$TableCheckInfo.class -cc\smtweb\framework\core\annotation\SwHeaderParam.class -cc\smtweb\framework\core\db\sqlbuilder\AbstractUpdateSqlBuilder.class -cc\smtweb\framework\core\common\SwEnum$IndexType.class -cc\smtweb\framework\core\annotation\SwAttr.class -cc\smtweb\framework\core\db\impl\DefaultDatabaseInfoImpl.class -cc\smtweb\framework\core\cache\SessionCache.class -cc\smtweb\framework\core\common\SwEnum$SummaryType.class -cc\smtweb\framework\core\db\jdbc\AbsDbWorker.class -cc\smtweb\framework\core\mvc\controller\access\SchedulerMethodAccess.class -cc\smtweb\framework\core\mvc\controller\scan\UrlMaker.class -cc\smtweb\framework\core\exception\BindParamException.class -cc\smtweb\framework\core\exception\ExceptionMessage.class -cc\smtweb\framework\core\mvc\controller\binder\bean\SwIpAddrEditor.class -cc\smtweb\framework\core\CoreApplication.class -cc\smtweb\framework\core\mvc\service\IDataProvider.class -cc\smtweb\framework\core\db\sqlbuilder\UpdateSqlBuilder.class -cc\smtweb\framework\core\mvc\controller\scan\BeanManager.class -cc\smtweb\framework\core\util\jackson\BaseBeanSerializer.class -cc\smtweb\framework\core\db\sqlbuilder\SqlWhereValue.class -cc\smtweb\framework\core\util\SqlUtil.class -cc\smtweb\framework\core\common\AbstractEnum$StrEnumBean.class -cc\smtweb\framework\core\mvc\controller\binder\param\TimestampEditor.class -cc\smtweb\framework\core\common\SwConsts.class -cc\smtweb\framework\core\annotation\SwPerm.class -cc\smtweb\framework\core\mvc\controller\binder\path\PathParamEditor.class -com\serotonin\timer\TimerThread$1.class -cc\smtweb\framework\core\mvc\variable\ICalcVar.class -cc\smtweb\framework\core\mvc\controller\binder\body\BeanUtil.class -cc\smtweb\framework\core\mvc\controller\binder\body\SwMapBodyEditor.class -cc\smtweb\framework\core\mvc\scheduler\CronTimerTask.class -cc\smtweb\framework\core\mvc\scheduler\AbstractJob.class -cc\smtweb\framework\core\mvc\ISchedulerWakeup.class -cc\smtweb\framework\core\db\sqlbuilder\DeleteSqlBuilder.class -cc\smtweb\framework\core\db\impl\DefaultEntity.class -cc\smtweb\framework\core\util\SpringUtil.class -cc\smtweb\framework\core\mvc\service\AbstractSaveHandler.class -cc\smtweb\framework\core\mvc\service\DefaultLoadHandler.class -cc\smtweb\framework\core\mvc\scheduler\job\RedisJobExecutor.class -cc\smtweb\framework\core\mvc\service\SqlPara.class -cc\smtweb\framework\core\mvc\scheduler\FixedTimerTask.class -cc\smtweb\framework\core\common\AbstractEnum.class -cc\smtweb\framework\core\mvc\config\SettingsEnvironmentPostProcessor.class -cc\smtweb\framework\core\cache\redis\RedisSysTask$1.class -cc\smtweb\framework\core\db\vo\ModelField.class -com\serotonin\timer\AbstractTimerTrigger.class -com\serotonin\timer\RealTimeTimer.class -cc\smtweb\framework\core\db\impl\DatabaseUtil.class -cc\smtweb\framework\core\common\SwEnum$FilterType.class -cc\smtweb\framework\core\mvc\controller\binder\attr\BeanAttrEditor.class -cc\smtweb\framework\core\mvc\controller\access\MethodAccess.class -com\serotonin\timer\TimeSource.class -cc\smtweb\framework\core\annotation\SwBody.class -cc\smtweb\framework\core\mvc\scheduler\SchedulerPoint.class -cc\smtweb\framework\core\mvc\controller\access\IBeanAccess.class -cc\smtweb\framework\core\common\IntEnum.class -cc\smtweb\framework\core\cache\redis\config\RedisConfig.class -cc\smtweb\framework\core\mvc\service\AbstractHandler.class -com\serotonin\timer\FixedRateTrigger.class -cc\smtweb\framework\core\mvc\realm\exception\UnauthenticatedException.class -cc\smtweb\framework\core\cache\redis\RedisBroadcastEvent.class -cc\smtweb\framework\core\mvc\realm\interceptor\AuthorizationInterceptor.class -cc\smtweb\framework\core\mvc\scheduler\job\LocalJobExecutor.class -com\serotonin\timer\NamedRunnable.class -cc\smtweb\framework\core\mvc\controller\ApiConfigBean.class -cc\smtweb\framework\core\exception\DbException.class -cc\smtweb\framework\core\mvc\realm\exception\UnknownAccountException.class -com\serotonin\timer\ScheduledNamedRunnable.class -cc\smtweb\framework\core\mvc\controller\IBeanContext.class -cc\smtweb\framework\core\db\DbEngine$1.class -cc\smtweb\framework\core\db\sqlbuilder\SqlJoinField.class -cc\smtweb\framework\core\mvc\controller\binder\param\BooleanEditor.class -cc\smtweb\framework\core\exception\SwException.class -cc\smtweb\framework\core\systask\SysTaskManager.class -cc\smtweb\framework\core\util\CommUtil.class -cc\smtweb\framework\core\common\R.class -cc\smtweb\framework\core\db\jdbc\IDbWorker.class -com\serotonin\timer\sync\Synchronizer.class -cc\smtweb\framework\core\annotation\SwBean.class -cc\smtweb\framework\core\db\impl\IDatabaseInfo$ColumnCheckInfo.class -cc\smtweb\framework\core\annotation\SwCache.class -com\serotonin\timer\sync\SingleExecutorSingleWaiter$TaskWrapper.class -cc\smtweb\framework\core\db\sqlbuilder\SqlFieldValue.class -cc\smtweb\framework\core\mvc\service\AbstractListHandler.class -com\serotonin\timer\ModelTimeoutClient.class -cc\smtweb\framework\core\mvc\controller\scan\ApplicationScanner.class -cc\smtweb\framework\core\mvc\service\DefaultSaveHandler$1.class -cc\smtweb\framework\core\db\sqlbuilder\SqlJoinTable.class -cc\smtweb\framework\core\util\jackson\DateDeserializer.class -cc\smtweb\framework\core\mvc\controller\binder\param\DateEditor.class -cc\smtweb\framework\core\annotation\SwColumnForeign.class -com\serotonin\timer\sync\AsyncJobSink$Event.class -cc\smtweb\framework\core\mvc\controller\scan\ClassParser.class -cc\smtweb\framework\core\mvc\realm\IRealmLoader.class -cc\smtweb\framework\core\mvc\controller\binder\param\TimeEditor.class -cc\smtweb\framework\core\util\jackson\TimeSerializer.class -cc\smtweb\framework\core\db\dao\AbstractEntityDao.class -cc\smtweb\framework\core\db\sqlbuilder\AbstractSelectSqlBuilder.class -cc\smtweb\framework\core\db\vo\ModelProject.class -cc\smtweb\framework\core\mvc\controller\scan\MethodParser.class -cc\smtweb\framework\core\mvc\realm\exception\ForbiddenException.class -cc\smtweb\framework\core\mvc\service\DefaultComboHandler.class -com\serotonin\timer\FixedDelayTrigger.class -cc\smtweb\framework\core\annotation\SwColumn$Type.class -cc\smtweb\framework\core\annotation\SwPathParam.class -cc\smtweb\framework\core\common\SwIpAddr.class -cc\smtweb\framework\core\db\jdbc\JdbcEngine.class -cc\smtweb\framework\core\mvc\controller\binder\body\StringBodyEditor.class -cc\smtweb\framework\core\mvc\controller\binder\param\AbstractParameterEditor.class -cc\smtweb\framework\core\db\dao\EntityColumnForeign.class -cc\smtweb\framework\core\mvc\controller\binder\param\IntegerEditor.class -cc\smtweb\framework\core\db\config\YamlPropertyLoaderFactory.class -cc\smtweb\framework\core\mvc\service\SqlNamedPara.class -cc\smtweb\framework\core\mvc\service\DefaultListHandler.class -cc\smtweb\framework\core\mvc\controller\binder\param\StringEditor.class -cc\smtweb\framework\core\mvc\scheduler\SchedulerTaskManager.class -com\serotonin\timer\CronExpression.class -cc\smtweb\framework\core\cache\redis\RedisConnection.class -cc\smtweb\framework\core\mvc\controller\binder\param\AbstractNumberEditor.class -cc\smtweb\framework\core\mvc\controller\IActionManager.class -cc\smtweb\framework\core\db\impl\BaseBean.class -cc\smtweb\framework\core\mvc\config\ControllerConfig.class -com\serotonin\timer\SimulationTimer$1.class -cc\smtweb\framework\core\mvc\variable\SwVariableFactory.class -cc\smtweb\framework\core\util\JsonUtil.class -com\serotonin\timer\ExecutionRejectedException.class -cc\smtweb\framework\core\mvc\controller\binder\CacheEditor.class -cc\smtweb\framework\core\cache\AbstractCache$IGetBeanKey.class -cc\smtweb\framework\core\cache\SessionCacheFactory.class -cc\smtweb\framework\core\mvc\controller\binder\param\ByteEditor.class -cc\smtweb\framework\core\annotation\SwScheduling.class -cc\smtweb\framework\core\mvc\controller\binder\param\IEditorValue.class -cc\smtweb\framework\core\mvc\controller\binder\WebDataBinder.class -cc\smtweb\framework\core\db\vo\ModelLinkName.class -cc\smtweb\framework\core\mvc\service\TreeHelper.class -cc\smtweb\framework\core\common\SwEnum$IndexTypeBean.class -cc\smtweb\framework\core\common\SwEnum$FormType.class -cc\smtweb\framework\core\common\SwEnum$WidgetType.class -com\serotonin\timer\sync\SingleExecutorSingleWaiter.class -cc\smtweb\framework\core\mvc\service\AbstractTreeHandler.class -cc\smtweb\framework\core\mvc\controller\binder\body\BeanBodyEditor.class -cc\smtweb\framework\core\mvc\realm\interceptor\PermInterceptor.class -com\serotonin\timer\CronTimerTrigger.class -cc\smtweb\framework\core\mvc\service\DefaultProvider.class -cc\smtweb\framework\core\db\vo\ModelCatalog.class -cc\smtweb\framework\core\mvc\controller\scan\IScanAction.class -cc\smtweb\framework\core\mvc\controller\access\BindFieldAccess.class -cc\smtweb\framework\core\mvc\controller\scan\BeanManager$OrderMethodAccess.class -cc\smtweb\framework\core\db\jdbc\MapPropertyRowMapper.class -cc\smtweb\framework\core\common\SwMap.class -cc\smtweb\framework\core\mvc\controller\IEditor.class -cc\smtweb\framework\core\mvc\controller\binder\ParamEditor.class -cc\smtweb\framework\core\session\UserSession.class -cc\smtweb\framework\core\mvc\controller\binder\bean\NullEditor.class -cc\smtweb\framework\core\db\dao\EntityColumn.class -cc\smtweb\framework\core\cache\redis\RedisPooledObjectFactory.class -cc\smtweb\framework\core\db\vo\ModelTable.class -cc\smtweb\framework\core\mvc\realm\service\PermCheckItem.class -com\serotonin\timer\SimulationTimeSource.class -cc\smtweb\framework\core\annotation\SwDestroy.class -cc\smtweb\framework\core\mvc\controller\binder\attr\AbstractAttrEditor.class -cc\smtweb\framework\core\mvc\scheduler\AbstractJobQueue.class -cc\smtweb\framework\core\db\impl\IDatabaseInfo.class -cc\smtweb\framework\core\mvc\realm\interceptor\AbstractPermInterceptor.class -cc\smtweb\framework\core\annotation\SwColumn.class -cc\smtweb\framework\core\exception\BizException.class -cc\smtweb\framework\core\mvc\controller\binder\bean\AbstractContextEditor.class -cc\smtweb\framework\core\annotation\SwParam.class -cc\smtweb\framework\core\mvc\service\list\FooterField.class -cc\smtweb\framework\core\common\StrEnum.class -cc\smtweb\framework\core\mvc\config\WebMvcConfig.class -cc\smtweb\framework\core\session\UserSessionArgumentResolver.class diff --git a/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index f17edd0..0000000 --- a/smtweb-framework/sw-framework-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,256 +0,0 @@ -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwParam.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\DirectSelectSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\ExecutionRejectedException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\AbstractJob.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\FixedTimerTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\systask\TaskStartEvent.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\variable\ICalcVar.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\AbstractContextEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\InsertSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractTreeHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwAction.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\exception\AuthorizationException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\DateDeserializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwService.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\TimestampEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\config\YamlPropertyLoaderFactory.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\SchedulerPoint.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\session\SessionUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\IntEnum.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\CoreApplicationStartedListener.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelIndex.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\DateSerializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\MapPropertyRowMapper.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelCatalog.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\MethodAccessManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\BeanManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultComboHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\BooleanEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\FloatEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\SchedulerTaskManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\RedisBroadcastEvent.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\PackageScanner.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\BaseBeanPropertyRowMapper.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\IDataProvider.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\DefaultPageController.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractCompProvider.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\config\GlobalExceptionHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwPerm.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\LongDeserializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractSaveHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\AbstractEnum.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\SwMap.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelTable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\HttpServletRequestEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\DateEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\list\FooterField.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\SchedulerMethodAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\exception\UnauthenticatedException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\RedisPooledObjectFactory.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\NullEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\interceptor\PermInterceptor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TimerTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\StringEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SqlJoinField.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\dao\EntityColumnForeign.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\ExceptionMessage.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwAttr.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\EntityDao.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\SessionCacheFactory.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\BeanTypeEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelLinkName.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\LongSerializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\DefaultDatabaseInfoImpl.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\AbstractEntityCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\MethodParser.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\SwException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\DbException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\AbsDbWorker.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\cache\EntityCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\SpringUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\UrlMaker.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractDelHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\IBeanAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\IDatabaseInfo.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\attr\AbstractAttrEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\GroupJobQueue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\session\SessionManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\DatabaseUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\sync\Synchronizer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\session\UserSession.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\IDbWorker.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\BeanContext.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\IScanActionBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\IEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\exception\ForbiddenException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractLoadHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\ShortEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\LongEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultSaveHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\WebDataBinder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\BaseBeanSerializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\TimeSerializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\SqlNamedPara.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\AbstractCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\ParamEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\BeanEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\BindParamException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultListHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\ApiController.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\RedisConnection.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwBody.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwHeaderParam.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\AbstractSelectSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\ScheduledNamedRunnable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\EntityHelper.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwDestroy.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\config\DbEngineConfiguration.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\SwIpAddrEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\SimulationTimer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\ScanContext.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwConstruct.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\SingletonFieldAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\ClassParser.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\config\SettingsEnvironmentPostProcessor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\sync\AsyncJobSink.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\StrEnum.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\ApiConfigBean.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\AbstractJobExecutor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\sync\SingleExecutorSingleWaiter.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\body\StringBodyEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\FixedDelayTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TimerTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\SwIpAddr.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\ByteEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\body\SwMapBodyEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\systask\WebStartedEvent.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\SqlPara.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\exception\AuthenticationException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\DateUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\SqlUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelField.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\BaseBean.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\SchedulerManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TimerThread.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\CacheEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\RedisManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\VariableUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwColumnForeign.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\CharEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwColumn.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\interceptor\AbstractPermInterceptor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\TreeHelper.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\ISchedulerWakeup.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\CronTimerTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\BindFieldAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\SystemTimeSource.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\systask\ISysTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\service\PermChecker.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\UpdateSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\session\UserSessionArgumentResolver.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwScheduling.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\AbstractTimerTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\cache\ModelDatabaseCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\bean\UserSessionEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\UtilTime.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\RealTimeTimer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\IdGenerator.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SqlWhereValue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\DeleteSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\IBeanContext.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\service\PermCheckItem.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\JsonUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\LocalJobExecutor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\GroupJob.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\TimestampDeserializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SelectSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelDatabase.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\kryo\KryoTool.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultLoadHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\SessionCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultProvider.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\AbstractNumberEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\JsonParseException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\IActionManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\CommUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwTable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\cache\ModelTableCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\AbstractRequestEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\NumberUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\dao\AbstractEntityDao.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\AbstractParameterEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\DefaultDelHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TimeoutTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\IntegerEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\MapUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\CoreApplication.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\vo\ModelProject.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\CacheManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractCompService.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\FieldAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\body\BeanUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\R.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\AbstractListHandler.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\SimpleJob.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\SwEnum.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\DbEngine.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\RedisSysTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\IWorker.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\jackson\NullSerializer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\FixedRateTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\AbstractUpdateSqlBuilder.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\variable\SwVariable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\AbstractJobQueue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\JdbcEngine.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\AbstractTimer.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\OneTimeTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\SimpleJobQueue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\impl\DefaultEntity.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwBean.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\annotation\SwPathParam.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\NonConcurrentTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\ApplicationScanner.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TaskQueue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\TimeSource.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SqlJoinTable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\CronTimerTrigger.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\SwMapPropertyRowMapper.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\config\WebMvcConfig.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\exception\UnknownAccountException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\ScheduledRunnable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\common\SwConsts.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\ISwCache.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\MethodAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\scan\IScanAction.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\scheduler\job\RedisJobExecutor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\DoubleEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\variable\SwVariableFactory.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\IMethodAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\interceptor\AuthorizationInterceptor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\util\IpAddrUtil.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\CronExpression.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\ModelTimeoutTask.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\ModelTimeoutClient.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\jdbc\JdbcTrans.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\config\ControllerConfig.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\param\TimeEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\SimulationTimeSource.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\BindBeanException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\CoreAutoConfiguration.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\path\PathParamEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\sqlbuilder\SqlFieldValue.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\systask\SysTaskManager.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\db\dao\EntityColumn.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\realm\IRealmLoader.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\service\SwListData.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\attr\BeanAttrEditor.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\ControllerAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\exception\BizException.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\com\serotonin\timer\NamedRunnable.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\access\MethodParamAccess.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\cache\redis\config\RedisConfig.java -E:\jujia\git\6.0\smtweb2\smtweb-framework\sw-framework-core\src\main\java\cc\smtweb\framework\core\mvc\controller\binder\body\BeanBodyEditor.java diff --git a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java b/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java deleted file mode 100644 index 606cd02..0000000 --- a/smtweb-framework/sw-system-bpm/src/test/java/cc/smtweb/system/bpm/test/TestMain.java +++ /dev/null @@ -1,18 +0,0 @@ -package cc.smtweb.system.bpm.test; - -import cc.smtweb.framework.core.util.JsonUtil; -import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; -import cc.smtweb.system.bpm.web.design.form.define.PageDatasetDynCond; - -/** - * Created by Akmm at 2021/12/25 22:21 - */ -public class TestMain { - - public static void main(String[] args) throws Exception { - PageDatasetDynCond dc = new PageDatasetDynCond(); - dc.opt = "and"; - dc.param = "f1"; - System.out.println(JsonUtil.encodeString(dc)); - } -}