Ver código fonte

结构调整,部分调整

zhou-hao 7 anos atrás
pai
commit
75660f6c3c
100 arquivos alterados com 325 adições e 1555 exclusões
  1. 3 4
      FEATURES.md
  2. 3 4
      ISSUE_TEMPLATE.md
  3. 1 3
      README.md
  4. 0 43
      hsweb-authorization/hsweb-authorization-cloud/pom.xml
  5. 0 45
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationClientAutoConfiguration.java
  6. 0 12
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationServerAutoConfiguration.java
  7. 0 23
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationClient.java
  8. 0 17
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationServer.java
  9. 0 19
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAuthenticationManager.java
  10. 0 13
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAuthorizationAutoConfiguration.java
  11. 0 73
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignUserTokenManager.java
  12. 0 27
      hsweb-authorization/hsweb-authorization-ldap/pom.xml
  13. 0 17
      hsweb-authorization/hsweb-authorization-ldap/src/test/java/org/hswebframework/web/authorization/ldap/LdapAuthorizationTests.java
  14. 0 2
      hsweb-authorization/pom.xml
  15. 22 4
      hsweb-core/src/main/java/org/hswebframework/web/bean/FastBeanCopier.java
  16. 0 67
      hsweb-examples/hsweb-examples-cloud/README.md
  17. 0 8
      hsweb-examples/hsweb-examples-cloud/build-docker.sh
  18. 0 17
      hsweb-examples/hsweb-examples-cloud/docker-compose.yml
  19. 0 75
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/pom.xml
  20. 0 15
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/src/main/java/org/hswebframework/web/examples/cloud/gateway/GateWayApplication.java
  21. 0 33
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/src/main/resources/application.yml
  22. 0 105
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/pom.xml
  23. 0 23
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/Service01Application.java
  24. 0 19
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/UserInfoController.java
  25. 0 5
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/application-docker.yml
  26. 0 22
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/application.yml
  27. 0 13
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/bootstrap.yml
  28. 0 107
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/pom.xml
  29. 0 19
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/InfoController.java
  30. 0 38
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/UserCenterApplication.java
  31. 0 5
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/application-docker.yml
  32. 0 18
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/application.yml
  33. 0 13
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/bootstrap.yml
  34. 0 51
      hsweb-examples/hsweb-examples-cloud/pom.xml
  35. 2 2
      hsweb-examples/hsweb-examples-oauth2/hsweb-examples-oauth2-server/src/main/java/org/hswebframework/web/example/oauth2/OAuth2ServerApplication.java
  36. 5 5
      hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/TestController.java
  37. 0 26
      hsweb-examples/hsweb-examples-workflow/pom.xml
  38. 0 2
      hsweb-examples/pom.xml
  39. 1 1
      hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/HswebAutoConfiguration.java
  40. 15 11
      hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/SystemVersion.java
  41. 10 15
      hsweb-system/README.md
  42. 6 1
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorizationSettingMenuService.java
  43. 9 20
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleMenuService.java
  44. 18 16
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleUserService.java
  45. 3 3
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/pom.xml
  46. 3 8
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/java/org/hswebframework/web/authorization/starter/UserTests.java
  47. 3 3
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-web/pom.xml
  48. 0 86
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-web/src/main/java/org/hswebframework/web/authorization/controller/UserTokenInfoController.java
  49. 4 6
      hsweb-system/hsweb-system-config/hsweb-system-config-entity/pom.xml
  50. 0 0
      hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/ConfigContent.java
  51. 0 0
      hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/ConfigEntity.java
  52. 0 0
      hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/SimpleConfigEntity.java
  53. 5 2
      hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-api/src/main/java/org/hswebframework/web/service/config/ConfigService.java
  54. 0 45
      hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-api/pom.xml
  55. 0 44
      hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-mybatis/pom.xml
  56. 0 38
      hsweb-system/hsweb-system-config/hsweb-system-config-dao/pom.xml
  57. 7 6
      hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-simple/pom.xml
  58. 0 0
      hsweb-system/hsweb-system-config/hsweb-system-config-local/src/main/java/org/hswebframework/web/dao/config/ConfigDao.java
  59. 91 0
      hsweb-system/hsweb-system-config/hsweb-system-config-local/src/main/java/org/hswebframework/web/service/config/simple/SimpleConfigService.java
  60. 1 1
      hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/config/ConfigMapper.xml
  61. 0 45
      hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-api/pom.xml
  62. 0 50
      hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-simple/src/main/java/org/hswebframework/web/service/config/simple/SimpleConfigService.java
  63. 0 38
      hsweb-system/hsweb-system-config/hsweb-system-config-service/pom.xml
  64. 3 7
      hsweb-system/hsweb-system-config/hsweb-system-config-starter/pom.xml
  65. 3 2
      hsweb-system/hsweb-system-config/hsweb-system-config-controller/pom.xml
  66. 0 0
      hsweb-system/hsweb-system-config/hsweb-system-config-web/src/main/java/org/hswebframework/web/controller/config/ConfigController.java
  67. 3 4
      hsweb-system/hsweb-system-config/pom.xml
  68. 4 2
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/pom.xml
  69. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/entity/datasource/DataSourceConfigEntity.java
  70. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/entity/datasource/SimpleDataSourceConfigEntity.java
  71. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/service/datasource/DataSourceConfigService.java
  72. 0 27
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-api/pom.xml
  73. 0 26
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-mybatis/pom.xml
  74. 0 18
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/pom.xml
  75. 46 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/pom.xml
  76. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/dao/datasource/DataSourceConfigDao.java
  77. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepository.java
  78. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/service/datasource/simple/SimpleDataSourceConfigService.java
  79. 2 2
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/datasource/DataSourceConfigMapper.xml
  80. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/test/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepositoryTests.java
  81. 0 18
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/pom.xml
  82. 5 9
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/pom.xml
  83. 35 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-web/pom.xml
  84. 0 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-web/src/main/java/org/hswebframework/web/controller/datasource/DataSourceConfigController.java
  85. 7 4
      hsweb-system/hsweb-system-datasource/pom.xml
  86. 5 3
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/pom.xml
  87. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DictConfig.java
  88. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnBindEntity.java
  89. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnEntity.java
  90. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormDeployLogEntity.java
  91. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormEntity.java
  92. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormColumnEntity.java
  93. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormDeployLogEntity.java
  94. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormEntity.java
  95. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DatabaseRepository.java
  96. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormColumnService.java
  97. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormDeployLogService.java
  98. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormOperationService.java
  99. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormService.java
  100. 0 0
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/OptionalConvertBuilder.java

+ 3 - 4
FEATURES.md

@@ -12,13 +12,12 @@ hsweb3.0 是模块化的,每个功能可独立使用,可选择自己需要的功
 + [x] OAuth2.0 服务和客户端,支持使用OAuth2.0进行单点登录
 + [x] 数据字典功能,支持自定义字典解析器,满足特定字典格式需求.
 + [x] 菜单管理.支持菜单分组,灵活配置菜单结构.
-+ [ ] 动态脚本.在线编写脚本任务,维护系统更灵活.
++ [x] 动态脚本.在线编写脚本任务,维护系统更灵活.
 + [x] 动态表单.在线设计表单(需前端支持),提供统一CRUD接口,随建随用.
 + [ ] 工作流引擎.配合动态表单,实现工作流灵活自定义.
 + [x] ***组织架构.采用[地区-组织-部门-职位-人员]方式,支持灵活的数据权限控制.***
 + [x] 定时调度.在线配置任务,使用动态脚本编写任务内容,维护更方便.
 + [x] 文件管理. 文件上传下载统一接口,支持文件秒传.
 + [x] 访问日志. 记录用户每次访问信息.
-+ [ ] 历史记录. 记录数据修改记录.
-+ [ ] 在线数据库管理. 在线维护数据库,执行sql等操作.
-+ [ ] 代码生成器.可自定义模板,各种项目结构随心所欲.
++ [x] 在线数据库管理. 在线维护数据库,执行sql等操作.
++ [x] 代码生成器.可自定义模板,各种项目结构随心所欲.

+ 3 - 4
ISSUE_TEMPLATE.md

@@ -1,4 +1,3 @@
-
-1. Bugs,如果你发现了项目中存在bug,请详细描述bug存在的位置,复现的条件,以及bug引起的问题.如果可能,尽量提供复现代码.
-2. 新特性,如果你觉得项目中的某些功能不够好,或者不能满足您的需求,你可以对需求进行详细描述,我会酌情改进.
-3. 项目中遇到疑问,请确定已经看过wiki中的内容,并且在issues中未找到你需要的答案,你可以加入qq群`515649185`询问或者直接提issue.
+1. 问题描述:
+2. 复现步骤:
+3. 日志内容:

+ 1 - 3
README.md

@@ -38,9 +38,7 @@
 |[hsweb-concurrent](hsweb-concurrent)|并发包,缓存,锁,计数器等| 80%|
 |[hsweb-core](hsweb-core)|框架核心,基础工具类| 90%|
 |[hsweb-datasource](hsweb-datasource)|数据源| 90%|
-|[hsweb-examples](hsweb-examples)|例子,演示| 10%|
 |[hsweb-logging](hsweb-logging)| 日志|  100%|
 |[hsweb-message](hsweb-message)|mq,websocket...| 80%|
 |[hsweb-starter](hsweb-starter)|模块启动器| 90%|
-|[hsweb-system](hsweb-system)|**系统常用功能**| 60%|
-|[hsweb-tests](hsweb-tests)|测试| 80%|
+|[hsweb-system](hsweb-system)|**系统常用功能**| 80%|

+ 0 - 43
hsweb-authorization/hsweb-authorization-cloud/pom.xml

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-authorization</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-authorization-cloud</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-netflix-core</artifactId>
-            <version>1.3.1.RELEASE</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-feign</artifactId>
-            <version>1.3.1.RELEASE</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-oauth2-client</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <optional>true</optional>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 45
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationClientAutoConfiguration.java

@@ -1,45 +0,0 @@
-package org.hswebframework.web.authorization.cloud;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ImportSelector;
-import org.springframework.core.type.AnnotationMetadata;
-import org.springframework.util.ClassUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author zhouhao
- * @since
- */
-@Configuration
-public class AuthorizationClientAutoConfiguration implements ImportSelector {
-
-    @Override
-    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
-        Map<String, Object> attrs = importingClassMetadata.getAnnotationAttributes(EnableAuthorizationClient.class.getName());
-
-        EnableAuthorizationClient.Type type = (EnableAuthorizationClient.Type) attrs.get("type");
-        List<String> classNames = new ArrayList<>();
-
-        if (type != null) {
-            switch (type) {
-                case Feign:
-                    classNames.add("org.hswebframework.web.authorization.cloud.client.feign.FeignAutoConfiguration");
-                    break;
-                case Auto:
-                default:
-                    try {
-                        Class.forName("org.springframework.cloud.netflix.feign.FeignClient");
-                        classNames.add("org.hswebframework.web.authorization.cloud.client.feign.FeignAutoConfiguration");
-                    } catch (ClassNotFoundException e) {
-                        // load redis not support yet
-                        throw new UnsupportedOperationException("please import and config feign");
-                    }
-                    break;
-            }
-        }
-        return classNames.toArray(new String[classNames.size()]);
-    }
-}

+ 0 - 12
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationServerAutoConfiguration.java

@@ -1,12 +0,0 @@
-package org.hswebframework.web.authorization.cloud;
-
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author zhouhao
- * @since 3.0
- */
-@Configuration
-public class AuthorizationServerAutoConfiguration {
-
-}

+ 0 - 23
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationClient.java

@@ -1,23 +0,0 @@
-package org.hswebframework.web.authorization.cloud;
-
-import org.springframework.context.annotation.Import;
-
-import java.lang.annotation.*;
-
-/**
- * 启用权限认证客户端
- * @author zhouhao
- * @since 3.0
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Documented
-@Import(AuthorizationServerAutoConfiguration.class)
-public @interface EnableAuthorizationClient {
-
-    Type value() default Type.Auto;
-
-    enum Type {
-        Auto, Feign
-    }
-}

+ 0 - 17
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationServer.java

@@ -1,17 +0,0 @@
-package org.hswebframework.web.authorization.cloud;
-
-import org.springframework.context.annotation.Import;
-
-import java.lang.annotation.*;
-
-/**
- * 启用权限认证服务端
- * @author zhouhao
- * @since 3.0
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Documented
-@Import(AuthorizationServerAutoConfiguration.class)
-public @interface EnableAuthorizationServer {
-}

+ 0 - 19
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAuthenticationManager.java

@@ -1,19 +0,0 @@
-package org.hswebframework.web.authorization.cloud.client.feign;
-
-import org.hswebframework.web.authorization.Authentication;
-import org.hswebframework.web.authorization.AuthenticationManager;
-import org.springframework.cloud.netflix.feign.FeignClient;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-@FeignClient(name = "${hsweb.cloud.user-center.name:user-center}")
-public interface FeignAuthenticationManager extends AuthenticationManager {
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-auth/{userId}", method = RequestMethod.GET)
-    Authentication getByUserId(@PathVariable("userId") String userId);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-auth", method = RequestMethod.PUT)
-    Authentication sync(Authentication authentication);
-}

+ 0 - 13
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAuthorizationAutoConfiguration.java

@@ -1,13 +0,0 @@
-package org.hswebframework.web.authorization.cloud.client.feign;
-
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author zhouhao
- * @since 3.0
- */
-@Configuration
-@EnableFeignClients("org.hswebframework.web.authorization.cloud.client.feign")
-public class FeignAuthorizationAutoConfiguration {
-}

+ 0 - 73
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignUserTokenManager.java

@@ -1,73 +0,0 @@
-package org.hswebframework.web.authorization.cloud.client.feign;
-
-import org.hswebframework.web.authorization.token.TokenState;
-import org.hswebframework.web.authorization.token.UserToken;
-import org.hswebframework.web.authorization.token.UserTokenManager;
-import org.springframework.cloud.netflix.feign.FeignClient;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * @author zhouhao
- * @since 3.0
- */
-@FeignClient(name = "${hsweb.cloud.user-center.name:user-center}")
-public interface FeignUserTokenManager extends UserTokenManager {
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/token/{token}", method = RequestMethod.GET)
-    UserToken getByToken(@PathVariable("token") String token);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/user/{userId}", method = RequestMethod.GET)
-    List<UserToken> getByUserId(@PathVariable("userId") String userId);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/user/{userId}/logged", method = RequestMethod.GET)
-    boolean userIsLoggedIn(@PathVariable("userId") String userId);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/token/{token}/logged", method = RequestMethod.GET)
-    boolean tokenIsLoggedIn(@PathVariable("token") String token);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/user/total", method = RequestMethod.GET)
-    long totalUser();
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/token/total", method = RequestMethod.GET)
-    long totalToken();
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token", method = RequestMethod.GET)
-    List<UserToken> allLoggedUser();
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/user/{userId}", method = RequestMethod.DELETE)
-    void signOutByUserId(@PathVariable("userId") String userId);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/token/{token}", method = RequestMethod.DELETE)
-    void signOutByToken(@PathVariable("token") String token);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/user/{userId}/{state}", method = RequestMethod.PUT)
-    void changeUserState(@PathVariable("userId") String userId, @PathVariable("state") TokenState state);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/token/{token}/{state}", method = RequestMethod.PUT)
-    void changeTokenState(@PathVariable("token") String token, @PathVariable("state") TokenState state);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/{token}/{type}/{userId}/{maxInactiveInterval}", method = RequestMethod.POST)
-    UserToken signIn(@PathVariable("token") String token, @PathVariable("type") String type, @PathVariable("userId") String userId, @PathVariable("maxInactiveInterval") long maxInactiveInterval);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/{token}/touch", method = RequestMethod.GET)
-    void touch(@PathVariable("token") String token);
-
-    @Override
-    @RequestMapping(value = "${hsweb.cloud.user-center.prefix:/}user-token/check-expired-token", method = RequestMethod.PUT)
-    void checkExpiredToken();
-}

+ 0 - 27
hsweb-authorization/hsweb-authorization-ldap/pom.xml

@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-authorization</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-authorization-ldap</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.ldap</groupId>
-            <artifactId>spring-ldap-core</artifactId>
-            <version>2.3.1.RELEASE</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 17
hsweb-authorization/hsweb-authorization-ldap/src/test/java/org/hswebframework/web/authorization/ldap/LdapAuthorizationTests.java

@@ -1,17 +0,0 @@
-package org.hswebframework.web.authorization.ldap;
-
-import org.junit.Test;
-import org.springframework.ldap.core.LdapTemplate;
-import org.springframework.ldap.query.LdapQueryBuilder;
-
-public class LdapAuthorizationTests {
-
-    LdapTemplate ldapTemplate;
-
-   // @Test
-    public void testGetUser(){
-        ldapTemplate=new LdapTemplate();
-
-        ldapTemplate.authenticate(LdapQueryBuilder.query().base("dc=261consulting, dc=com"),"admin");
-    }
-}

+ 0 - 2
hsweb-authorization/pom.xml

@@ -16,8 +16,6 @@
         <module>hsweb-authorization-oauth2</module>
         <module>hsweb-authorization-basic</module>
         <module>hsweb-authorization-jwt</module>
-        <module>hsweb-authorization-cloud</module>
-        <module>hsweb-authorization-ldap</module>
     </modules>
 
 

+ 22 - 4
hsweb-core/src/main/java/org/hswebframework/web/bean/FastBeanCopier.java

@@ -34,11 +34,9 @@ public final class FastBeanCopier {
 
     private static final Map<Class, Class> wrapperClassMapping = new HashMap<>();
 
-    public static final DefaultConverter DEFAULT_CONVERT = new DefaultConverter();
-
     public static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
 
-    public static BeanFactory BEAN_FACTORY = new BeanFactory() {
+    private static BeanFactory BEAN_FACTORY = new BeanFactory() {
         @Override
         @SneakyThrows
         public <T> T newInstance(Class<T> beanType) {
@@ -46,6 +44,17 @@ public final class FastBeanCopier {
         }
     };
 
+    public static final DefaultConverter DEFAULT_CONVERT;
+
+    public static void setBeanFactory(BeanFactory beanFactory) {
+        BEAN_FACTORY = beanFactory;
+        DEFAULT_CONVERT.setBeanFactory(beanFactory);
+    }
+
+    public static BeanFactory getBeanFactory() {
+        return BEAN_FACTORY;
+    }
+
     static {
         wrapperClassMapping.put(byte.class, Byte.class);
         wrapperClassMapping.put(short.class, Short.class);
@@ -55,6 +64,15 @@ public final class FastBeanCopier {
         wrapperClassMapping.put(char.class, Character.class);
         wrapperClassMapping.put(boolean.class, Boolean.class);
         wrapperClassMapping.put(long.class, Long.class);
+        BEAN_FACTORY = new BeanFactory() {
+            @Override
+            @SneakyThrows
+            public <T> T newInstance(Class<T> beanType) {
+                return beanType == Map.class ? (T) new HashMap<>() : beanType.newInstance();
+            }
+        };
+        DEFAULT_CONVERT = new DefaultConverter();
+        DEFAULT_CONVERT.setBeanFactory(BEAN_FACTORY);
     }
 
     public static <T, S> T copy(S source, T target, String... ignore) {
@@ -520,7 +538,7 @@ public final class FastBeanCopier {
                     return converter.convert(targetClass, source);
                 }
 
-                return copy(source, beanFactory.newInstance(targetClass),this);
+                return copy(source, beanFactory.newInstance(targetClass), this);
             } catch (Exception e) {
                 log.warn("复制类型{}->{}失败", source, targetClass, e);
                 throw new UnsupportedOperationException(e.getMessage(), e);

+ 0 - 67
hsweb-examples/hsweb-examples-cloud/README.md

@@ -1,67 +0,0 @@
-# spring-cloud 示例
-
-```bash
-----------hsweb-examples-cloud
---------------hsweb-examples-cloud-gateway          #服务注册,路由.api的入口
---------------hsweb-examples-cloud-service01        #1号测试服务,可从用户中心获取当前登录用户并进行权限控制
---------------hsweb-examples-cloud-user-center      #用户中心,用于用户登录授权
-```
-
-# 启动
-
-## 1. main方法启动
-1. 执行`hsweb-examples-cloud-gateway`模块中的 `GateWayApplication`
-2. 执行`hsweb-examples-cloud-service01`模块中的 `Service01Application`
-3. 执行`hsweb-examples-cloud-user-center`模块中的 `UserCenterApplication`
-
-## 2. 使用spring-boot插件启动
-
-分别进入3个模块,执行`mvn spring-boot:run`
-
-## 3. docker
-
-1. 执行 `./build-docker.sh` 构建docker镜像
-
-2. 执行 'docker-compose up' 等待服务启动完成
-
-# 访问
-访问: http://localhost:8761/
-
-# 测试
-
-1. 使用 `PostMan` 之类的工具发起POST请求:
-
-    http://localhost:8761/api/user-center/authorize/login?username=admin&password=admin&token_type=jwt
-
-拿到结果如下:
-```json
-{
-    "result": {
-        "userId": "b3d4ee054b8195e8ce2dbecedefbfb49",
-        "token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJoc3dlYi1qd3QiLCJpYXQiOjE1MDc3MDU4NzgsInN1YiI6IntcInRva2VuXCI6XCJjYTQ5MjlkZGJlYTY4Y2I4OWYwYTE0YzVjYWE4YTk5OFwiLFwidXNlcklkXCI6XCJiM2Q0ZWUwNTRiODE5NWU4Y2UyZGJlY2VkZWZiZmI0OVwifSIsImV4cCI6MTUwNzcwOTQ3OH0.R09HSDbxZgM6zoW0hDHhKDVP9nmKqilLpv8SHAZoS58"
-    },
-    "status": 200,
-    "timestamp": 1507705878257
-}
-```
-
-2. 得到上一步骤的结果,再次发起GET请求:
-
-   http://localhost:8761/api/service-1/user-info
-
-需要带上请求头: jwt-token:上一步返回json中的token。
-得到返回结果类似:
-```json
-    {
-        "attributes": {},
-        "permissions": [],
-        "roles": [],
-        "user": {
-            "id": "b3d4ee054b8195e8ce2dbecedefbfb49",
-            "name": "super user",
-            "username": "admin"
-        }
-    }
-```
-
-测试成功

+ 0 - 8
hsweb-examples/hsweb-examples-cloud/build-docker.sh

@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-mvn clean package
-cd hsweb-examples-cloud-gateway
-mvn docker:build
-cd ../hsweb-examples-cloud-service01
-mvn docker:build
-cd ../hsweb-examples-cloud-user-center
-mvn docker:build

+ 0 - 17
hsweb-examples/hsweb-examples-cloud/docker-compose.yml

@@ -1,17 +0,0 @@
-version: "2"
-services:
-    gateway:
-      image: hsweb/hsweb-examples-cloud-gateway:3.0-SNAPSHOT
-      ports:
-        - 8761:8761
-      hostname: gateway
-    user-center:
-      image: hsweb/hsweb-examples-cloud-user-center:3.0-SNAPSHOT
-      links:
-          - gateway:gateway
-      hostname: user-center
-    service01:
-      image: hsweb/hsweb-examples-cloud-service01:3.0-SNAPSHOT
-      links:
-          - gateway:gateway
-      hostname: service01

+ 0 - 75
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/pom.xml

@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-examples-cloud</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-examples-cloud-gateway</artifactId>
-
-    <build>
-        <finalName>${project.artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>${spring.boot.version}</version>
-                <configuration>
-                    <mainClass>org.hswebframework.web.examples.cloud.gateway.GateWayApplication</mainClass>
-                    <layout>ZIP</layout>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zuul</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 15
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/src/main/java/org/hswebframework/web/examples/cloud/gateway/GateWayApplication.java

@@ -1,15 +0,0 @@
-package org.hswebframework.web.examples.cloud.gateway;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.cloud.client.SpringCloudApplication;
-import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
-import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
-
-@SpringCloudApplication
-@EnableEurekaServer
-@EnableZuulProxy
-public class GateWayApplication {
-    public static void main(String[] args) {
-        SpringApplication.run(GateWayApplication.class, args);
-    }
-}

+ 0 - 33
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-gateway/src/main/resources/application.yml

@@ -1,33 +0,0 @@
-server:
-  compression:
-    enabled: true
-  port: 8761
-eureka:
-  client:
-    fetch-registry: true
-    register-with-eureka: true
-  server:
-    enable-self-preservation: false
-    eviction-interval-timer-in-ms: 1000
-zuul:
-  prefix: /api
-  routes:
-    user-center:
-      path: /user-center/**
-      service-id: user-center
-    service-1:
-      path: /service-1/**
-      service-id: service01
-  sensitive-headers: Cookies
-  host:
-    connect-timeout-millis: 10000
-
-ribbon:
-  eureka:
-    enabled: true
-spring:
-  application:
-    name: gateway
-#user-center:
-#  ribbon:
-#    listOfServers: 127.0.0.1:9001

+ 0 - 105
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/pom.xml

@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-examples-cloud</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-examples-cloud-service01</artifactId>
-    <build>
-        <finalName>${project.artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>${spring.boot.version}</version>
-                <configuration>
-                    <mainClass>org.hswebframework.web.examples.cloud.service.Service01Application</mainClass>
-                    <layout>ZIP</layout>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid</artifactId>
-            <version>1.0.26</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-spring-boot-starter</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-basic</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-cloud</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-feign</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-jwt</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-logging</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-spring-boot-starter</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-hystrix</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 23
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/Service01Application.java

@@ -1,23 +0,0 @@
-package org.hswebframework.web.examples.cloud.service;
-
-
-import org.hswebframework.web.authorization.cloud.EnableAuthorizationClient;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.feign.EnableFeignClients;
-import org.springframework.cloud.netflix.hystrix.EnableHystrix;
-import org.springframework.context.annotation.Configuration;
-
-@SpringBootApplication
-@EnableDiscoveryClient
-@EnableHystrix
-@Configuration
-@EnableFeignClients("org.hswebframework.web.authorization.cloud.client.feign")
-@EnableAuthorizationClient
-public class Service01Application {
-
-    public static void main(String[] args) {
-        SpringApplication.run(Service01Application.class, args);
-    }
-}

+ 0 - 19
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/UserInfoController.java

@@ -1,19 +0,0 @@
-package org.hswebframework.web.examples.cloud.service;
-
-import org.hswebframework.web.authorization.Authentication;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * Created by zhouhao on 2017/10/10.
- */
-@RestController
-@RequestMapping("/user-info")
-public class UserInfoController {
-
-    @GetMapping
-    public Authentication authentication(){
-        return Authentication.current().orElse(null);
-    }
-}

+ 0 - 5
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/application-docker.yml

@@ -1,5 +0,0 @@
-eureka-host: gateway
-eureka-port: 8761
-spring:
-  datasource:
-     url : jdbc:h2:file:./data/service01

+ 0 - 22
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/application.yml

@@ -1,22 +0,0 @@
-spring:
-  aop:
-      auto: true
-  datasource:
-     url : jdbc:h2:mem:permission_test_mem
-     username : sa
-     password :
-     type: com.alibaba.druid.pool.DruidDataSource
-     driver-class-name : org.h2.Driver
-hsweb:
-    app:
-      name: 权限管理测试
-      version: 3.0.0
-    cloud:
-      user-center:
-        name: gateway
-        prefix: /api/user-center/
-server:
-    port: 9001
-logging:
-  level:
-    org.hswebframework.web: debug

+ 0 - 13
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/resources/bootstrap.yml

@@ -1,13 +0,0 @@
-spring:
-  application:
-    name: service01
-  cloud:
-    discovery:
-      client:
-        simple:
-          local:
-            service-id: service01
-eureka:
-  client:
-    service-url:
-        defaultZone: http://${eureka-host:localhost}:${eureka-port:8761}/eureka/

+ 0 - 107
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/pom.xml

@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-examples-cloud</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-examples-cloud-user-center</artifactId>
-    <build>
-        <finalName>${project.artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>${spring.boot.version}</version>
-                <configuration>
-                    <mainClass>org.hswebframework.web.examples.cloud.user.UserCenterApplication</mainClass>
-                    <layout>ZIP</layout>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid</artifactId>
-            <version>1.0.26</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-spring-boot-starter</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-authorization-starter</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-basic</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-jwt</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-cloud</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-logging</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-spring-boot-starter</artifactId>
-            <version>3.0.0-RC-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-hystrix</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 19
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/InfoController.java

@@ -1,19 +0,0 @@
-package org.hswebframework.web.examples.cloud.user;
-
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * TODO 完成注释
- *
- * @author zhouhao
- * @since
- */
-@RestController
-public class InfoController {
-
-    @GetMapping("/info")
-    public String info() {
-        return "success";
-    }
-}

+ 0 - 38
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/UserCenterApplication.java

@@ -1,38 +0,0 @@
-package org.hswebframework.web.examples.cloud.user;
-
-import org.hswebframework.web.authorization.cloud.EnableAuthorizationServer;
-import org.hswebframework.web.entity.authorization.UserEntity;
-import org.hswebframework.web.service.authorization.UserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.hystrix.EnableHystrix;
-import org.springframework.context.annotation.Configuration;
-
-@SpringBootApplication
-@EnableDiscoveryClient
-@EnableHystrix
-@Configuration
-@EnableCaching
-@EnableAuthorizationServer
-public class UserCenterApplication implements CommandLineRunner{
-    public static void main(String[] args) {
-        SpringApplication.run(UserCenterApplication.class, args);
-    }
-
-    @Autowired
-    UserService userService;
-
-    @Override
-    public void run(String... strings) throws Exception {
-       UserEntity userEntity= userService.createEntity();
-       userEntity.setName("super user");
-       userEntity.setUsername("admin");
-       userEntity.setPassword("admin");
-
-       userService.insert(userEntity);
-    }
-}

+ 0 - 5
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/application-docker.yml

@@ -1,5 +0,0 @@
-eureka-host: gateway
-eureka-port: 8761
-spring:
-  datasource:
-     url : jdbc:h2:file:./data/user-center

+ 0 - 18
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/application.yml

@@ -1,18 +0,0 @@
-spring:
-  aop:
-      auto: true
-  datasource:
-     url : jdbc:h2:mem:permission_test_mem
-     username : sa
-     password :
-     type: com.alibaba.druid.pool.DruidDataSource
-     driver-class-name : org.h2.Driver
-hsweb:
-    app:
-      name: 权限管理测试
-      version: 3.0.0
-server:
-    port: 9000
-logging:
-  level:
-    org.hswebframework.web: debug

+ 0 - 13
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/resources/bootstrap.yml

@@ -1,13 +0,0 @@
-spring:
-  application:
-    name: user-center
-  cloud:
-    discovery:
-      client:
-        simple:
-          local:
-            service-id: user-center
-eureka:
-  client:
-    service-url:
-       defaultZone: http://${eureka-host:localhost}:${eureka-port:8761}/eureka/

+ 0 - 51
hsweb-examples/hsweb-examples-cloud/pom.xml

@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-examples</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-examples-cloud</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-examples-cloud-gateway</module>
-        <module>hsweb-examples-cloud-user-center</module>
-        <module>hsweb-examples-cloud-service01</module>
-    </modules>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>com.spotify</groupId>
-                <artifactId>docker-maven-plugin</artifactId>
-                <version>0.4.13</version>
-                <configuration>
-                    <imageName>hsweb/${project.artifactId}:${project.version}</imageName>
-                    <baseImage>java:8</baseImage>
-                    <entryPoint>["java","-jar","-Dspring.profiles.active=docker","${project.build.finalName}.jar"]</entryPoint>
-                    <resources>
-                        <resource>
-                            <targetPath>/</targetPath>
-                            <directory>${project.build.directory}</directory>
-                            <include>${project.build.finalName}.jar</include>
-                        </resource>
-                    </resources>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.springframework.cloud</groupId>
-                <artifactId>spring-cloud-dependencies</artifactId>
-                <version>Dalston.SR4</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-</project>

+ 2 - 2
hsweb-examples/hsweb-examples-oauth2/hsweb-examples-oauth2-server/src/main/java/org/hswebframework/web/example/oauth2/OAuth2ServerApplication.java

@@ -21,11 +21,11 @@ package org.hswebframework.web.example.oauth2;
 import com.alibaba.fastjson.JSON;
 import org.hswebframework.web.authorization.Permission;
 import org.hswebframework.web.authorization.access.DataAccessConfig;
-import org.hswebframework.web.authorization.oauth2.server.entity.OAuth2ClientEntity;
+import org.hswebframework.web.entity.oauth2.server.OAuth2ClientEntity;
 import org.hswebframework.web.authorization.simple.SimpleFieldFilterDataAccessConfig;
 import org.hswebframework.web.commons.entity.DataStatus;
 import org.hswebframework.web.commons.entity.factory.EntityFactory;
-import org.hswebframework.web.dao.oauth2.OAuth2ClientDao;
+import org.hswebframework.web.dao.oauth2.server.OAuth2ClientDao;
 import org.hswebframework.web.entity.authorization.*;
 import org.hswebframework.web.entity.authorization.bind.BindRoleUserEntity;
 import org.hswebframework.web.service.authorization.AuthorizationSettingService;

+ 5 - 5
hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/TestController.java

@@ -15,7 +15,7 @@ import org.hswebframework.web.controller.message.ResponseMessage;
 import org.hswebframework.web.entity.authorization.SimpleUserEntity;
 import org.hswebframework.web.entity.authorization.UserEntity;
 import org.hswebframework.web.logging.AccessLogger;
-import org.hswebframework.web.organizational.authorization.PersonnelAuthorization;
+import org.hswebframework.web.organizational.authorization.PersonnelAuthentication;
 import org.hswebframework.web.service.QueryByEntityService;
 import org.hswebframework.web.service.QueryService;
 import org.springframework.web.bind.annotation.*;
@@ -38,9 +38,9 @@ public class TestController implements QueryController<UserEntity, String, Query
     @Authorize(action = "query")
     public ResponseMessage testSimple(Authentication authentication) {
         return ResponseMessage.ok(
-                PersonnelAuthorization.current()
+                PersonnelAuthentication.current()
                         //查找人员关系
-                        .map(PersonnelAuthorization::getRelations)
+                        .map(PersonnelAuthentication::getRelations)
                         .map(relations -> relations.findPos("leader"))
                         .orElse(null));
     }
@@ -79,8 +79,8 @@ public class TestController implements QueryController<UserEntity, String, Query
 
 
     @PutMapping("/test/testPersonnel")
-    public ResponseMessage<PersonnelAuthorization> testPersonnel() {
-        return ResponseMessage.ok(PersonnelAuthorization.current().orElseThrow(UnAuthorizedException::new));
+    public ResponseMessage<PersonnelAuthentication> testPersonnel() {
+        return ResponseMessage.ok(PersonnelAuthentication.current().orElseThrow(UnAuthorizedException::new));
     }
     @PostMapping("/test/testDict")
     public ResponseMessage<TestEntity> testPersonnel(@RequestBody TestEntity entity) {

+ 0 - 26
hsweb-examples/hsweb-examples-workflow/pom.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-examples</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-examples-workflow</artifactId>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

+ 0 - 2
hsweb-examples/pom.xml

@@ -32,8 +32,6 @@
         <module>hsweb-examples-simple</module>
         <module>hsweb-examples-oauth2</module>
         <module>hsweb-examples-custom-entity</module>
-        <module>hsweb-examples-workflow</module>
-        <module>hsweb-examples-cloud</module>
     </modules>
 
     <build>

+ 1 - 1
hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/HswebAutoConfiguration.java

@@ -175,7 +175,7 @@ public class HswebAutoConfiguration {
     @ConditionalOnMissingBean(EntityFactory.class)
     public MapperEntityFactory mapperEntityFactory() {
         MapperEntityFactory entityFactory = new MapperEntityFactory(entityProperties.createMappers());
-        FastBeanCopier.BEAN_FACTORY = entityFactory;
+        FastBeanCopier.setBeanFactory(entityFactory); ;
         return entityFactory;
     }
 

+ 15 - 11
hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/SystemVersion.java

@@ -89,23 +89,23 @@ public class SystemVersion extends Version {
         /**
          * @see SystemVersion#name
          */
-        String name            = "name";
+        String name = "name";
         /**
          * @see SystemVersion#comment
          */
-        String comment         = "comment";
+        String comment = "comment";
         /**
          * @see SystemVersion#website
          */
-        String website         = "website";
+        String website = "website";
         /**
          * @see SystemVersion#majorVersion
          */
-        String majorVersion    = "majorVersion";
+        String majorVersion = "majorVersion";
         /**
          * @see SystemVersion#minorVersion
          */
-        String minorVersion    = "minorVersion";
+        String minorVersion = "minorVersion";
         /**
          * @see SystemVersion#revisionVersion
          */
@@ -113,7 +113,7 @@ public class SystemVersion extends Version {
         /**
          * @see SystemVersion#snapshot
          */
-        String snapshot        = "snapshot";
+        String snapshot = "snapshot";
 
         /**
          * @see SystemVersion#frameworkVersion
@@ -186,10 +186,10 @@ class Version implements Comparable<Version> {
     protected String name;
     protected String comment;
     protected String website;
-    protected int     majorVersion    = 1;
-    protected int     minorVersion    = 0;
-    protected int     revisionVersion = 0;
-    protected boolean snapshot        = false;
+    protected int majorVersion = 1;
+    protected int minorVersion = 0;
+    protected int revisionVersion = 0;
+    protected boolean snapshot = false;
 
     public void setVersion(int major, int minor, int revision, boolean snapshot) {
         this.majorVersion = major;
@@ -203,7 +203,11 @@ class Version implements Comparable<Version> {
             return;
         }
         boolean snapshot = version.toLowerCase().contains("snapshot");
-        version = version.toLowerCase().replace(".snapshot", "").replace("-snapshot", "");
+        version = version.toLowerCase()
+                .replace(".snapshot", "")
+                .replace("-snapshot", "")
+                .replace("-rc", "")
+                .replace("-release", "");
         String[] ver = version.split("[.]");
         Integer[] numberVer = ListUtils.stringArr2intArr(ver);
         if (numberVer.length < 1 || Arrays.stream(numberVer).anyMatch(Objects::isNull)) {

+ 10 - 15
hsweb-system/README.md

@@ -4,22 +4,17 @@
 # 模块说明
 | 模块       | 说明          |   进度 |
 | ------------- |:-------------:| ----|
-|[hsweb-system-all](hsweb-system-all)|所有功能整合| 0%|
-|[hsweb-system-authorization](hsweb-system-authorization) |权限管理| 90%|
-|[hsweb-system-cli](hsweb-system-cli)|在线命令行功能,在线执行命令| 0%|
-|[hsweb-system-config](hsweb-system-config)|系统配置功能| 60%|
-|[hsweb-system-database-manager](hsweb-system-database-manager)|在线数据库维护| 0%|
-|[hsweb-system-datasource](hsweb-system-datasource)|动态数据源管理| 0%|
-|[hsweb-system-dictionary](hsweb-system-dictionary)| 数据字典功能|  80%|
+|[hsweb-system-authorization](hsweb-system-authorization) |权限管理| 100%|
+|[hsweb-system-config](hsweb-system-config)|系统配置功能| 90%|
+|[hsweb-system-database-manager](hsweb-system-database-manager)|在线数据库维护| 90%|
+|[hsweb-system-datasource](hsweb-system-datasource)|动态数据源管理| 90%|
+|[hsweb-system-dictionary](hsweb-system-dictionary)| 数据字典功能|  90%|
 |[hsweb-system-dynamic-form](hsweb-system-dynamic-form)|动态表单| 80%|
-|[hsweb-system-explorer](hsweb-system-menu)|**系统菜单**| 80%|
 |[hsweb-system-file](hsweb-system-file)|文件管理| 100%|
-|[hsweb-system-history](hsweb-system-history)|历史记录管理| 0%|
-|[hsweb-system-oauth2-client](hsweb-system-oauth2-client)|OAuth2 客户端| 60%|
-|[hsweb-system-oauth2-server](hsweb-system-oauth2-server)|OAuth2 服务端| 60%|
-|[hsweb-system-monitor](hsweb-system-monitor)|系统监控| 0%|
-|[hsweb-system-organizational](hsweb-system-organizational)|组织架构| 70%|
+|[hsweb-system-oauth2-client](hsweb-system-oauth2-client)|OAuth2 客户端| 90%|
+|[hsweb-system-oauth2-server](hsweb-system-oauth2-server)|OAuth2 服务端| 90%|
+|[hsweb-system-organizational](hsweb-system-organizational)|组织架构| 90%|
 |[hsweb-system-schedule](hsweb-system-schedule)|任务调度| 80%|
-|[hsweb-system-script](hsweb-system-script)|动态脚本| 0%|
-|[hsweb-system-template](hsweb-system-template)|模板管理| 60%|
+|[hsweb-system-script](hsweb-system-script)|动态脚本| 90%|
+|[hsweb-system-template](hsweb-system-template)|模板管理| 100%|
 |[hsweb-system-workflow](hsweb-system-workflow)|工作流| 40%|

+ 6 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorizationSettingMenuService.java

@@ -7,7 +7,10 @@ import org.hswebframework.web.id.IDGenerator;
 import org.hswebframework.web.service.AbstractTreeSortService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 
@@ -35,7 +38,9 @@ public class SimpleAuthorizationSettingMenuService extends AbstractTreeSortServi
 
     @Override
     public List<AuthorizationSettingMenuEntity> selectBySettingId(List<String> settingId) {
-        Objects.requireNonNull(settingId);
+        if(CollectionUtils.isEmpty(settingId)){
+            return new ArrayList<>();
+        }
         return createQuery().where().in(AuthorizationSettingMenuEntity.settingId, settingId).listNoPaging();
     }
 

+ 9 - 20
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleMenuService.java

@@ -57,36 +57,37 @@ public class SimpleMenuService
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public int updateByPk(MenuEntity entity) {
         return super.updateByPk(entity);
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public String saveOrUpdate(MenuEntity entity) {
         return super.saveOrUpdate(entity);
     }
+
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public int updateBatch(Collection<MenuEntity> data) {
         return super.updateBatch(data);
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public int updateByPk(String id, MenuEntity entity) {
         return super.updateByPk(id, entity);
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public int updateByPk(List<MenuEntity> data) {
         return super.updateByPk(data);
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public String insert(MenuEntity entity) {
         if (entity.getStatus() == null) {
             entity.setStatus((byte) 1);
@@ -95,26 +96,14 @@ public class SimpleMenuService
     }
 
     @Override
-    @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'ids:'+(#id==null?'0':#id.hashCode())")
+    @Cacheable(cacheNames = CacheConstants.MENU_CACHE_NAME, key = "'ids:'+(#id==null?'0':#id.hashCode())")
     public List<MenuEntity> selectByPk(List<String> id) {
         return super.selectByPk(id);
     }
 
     @Override
-    @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
+    @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
     public int deleteByPk(String id) {
         return super.deleteByPk(id);
     }
-
-    @Override
-    @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'permission-ids:'+(#permissionId==null?'0':#permissionId.hashCode())")
-    public List<MenuEntity> getByPermissionId(List<String> permissionId) {
-        return createQuery().noPaging().where().in("permissionId", permissionId).list();
-    }
-
-    @Override
-    @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'permission-id:'+#permissionId")
-    public MenuEntity getByPermissionId(String permissionId) {
-        return createQuery().noPaging().where().is("permissionId", permissionId).single();
-    }
 }

+ 18 - 16
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-local/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleUserService.java

@@ -176,36 +176,38 @@ public class SimpleUserService extends AbstractService<UserEntity, String>
         assertNotNull(oldUser);
         boolean roleModified = false;
         boolean passwordModified = false;
-        //判断用户是否存在
-        boolean userExists = createQuery().where()
-                .is(UserEntity.username, userEntity.getUsername())
-                .and().not(GenericEntity.id, userId)
-                .total() > 0;
-        tryValidateProperty(!userExists, GenericEntity.id, "{username_exists}");
-        List<String> updateProperties = new ArrayList<>(Collections.singletonList("name"));
+
+        //不修改的字段
+        List<String> excludeProperties = new ArrayList<>(Arrays.asList(
+                UserEntity.username
+                ,UserEntity.password
+                ,UserEntity.salt
+                ,UserEntity.status));
         //修改密码
         if (StringUtils.hasLength(userEntity.getPassword())) {
             //密码强度验证
             tryValidateProperty(passwordStrengthValidator, UserEntity.password, userEntity.getPassword());
             //密码MD5
             userEntity.setPassword(encodePassword(userEntity.getPassword(), oldUser.getSalt()));
-            updateProperties.add(UserEntity.password);
+            excludeProperties.remove(UserEntity.password);
             passwordModified = true;
         }
         //修改数据
         createUpdate(getDao(), userEntity)
-                .includes(updateProperties.toArray(new String[updateProperties.size()]))
+                .excludes(excludeProperties.toArray(new String[excludeProperties.size()]))
                 .where(GenericEntity.id, userEntity.getId())
                 .exec();
         if (userEntity instanceof BindRoleUserEntity) {
             BindRoleUserEntity bindRoleUserEntity = ((BindRoleUserEntity) userEntity);
-            //删除旧的数据
-            userRoleDao.deleteByUserId(bindRoleUserEntity.getId());
-            //同步角色信息
-            trySyncUserRole(userEntity.getId(), bindRoleUserEntity.getRoles());
-            roleModified = true;
+            if (bindRoleUserEntity.getRoles() != null) {
+                //删除旧的数据
+                userRoleDao.deleteByUserId(bindRoleUserEntity.getId());
+                //同步角色信息
+                trySyncUserRole(userEntity.getId(), bindRoleUserEntity.getRoles());
+                roleModified = true;
+            }
         }
-        if (updateProperties.contains(UserEntity.password)) {
+        if (excludeProperties.contains(UserEntity.password)) {
             publisher.publishEvent(new UserModifiedEvent(userEntity, passwordModified, roleModified));
         }
     }
@@ -232,7 +234,7 @@ public class SimpleUserService extends AbstractService<UserEntity, String>
         assertNotNull(userEntity);
         oldPassword = encodePassword(oldPassword, userEntity.getSalt());
         if (!userEntity.getPassword().equals(oldPassword)) {
-            throw new ValidationException("{old_password_error}", "password");
+            throw new ValidationException("密码错误", "password");
         }
         tryValidateProperty(passwordStrengthValidator, UserEntity.password, newPassword);
 

+ 3 - 3
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/pom.xml

@@ -61,11 +61,11 @@
             <version>${project.version}</version>
             <optional>true</optional>
         </dependency>
+
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.5</version>
-            <optional>true</optional>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>

+ 3 - 8
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/java/org/hswebframework/web/authorization/starter/UserTests.java

@@ -37,7 +37,6 @@ import org.springframework.context.annotation.Import;
 import java.sql.SQLException;
 
 /**
- *
  * @author zhouhao
  */
 @Configuration
@@ -134,7 +133,7 @@ public class UserTests extends SimpleWebApplicationTests {
             userService.updatePassword(id, "test", "test");
             Assert.assertTrue(false);
         } catch (ValidationException e) {
-            Assert.assertEquals(e.getResults().get(0).getMessage(), "{old_password_error}");
+            //密码错误
         }
         userService.updatePassword(id, "password_1234", "password_2345");
         entityInDb = userService.selectByUsername(userEntity.getUsername());
@@ -142,13 +141,9 @@ public class UserTests extends SimpleWebApplicationTests {
 
         entityInDb.setId(anotherId);
         entityInDb.setName("新名字");
-        try {
-            userService.update(anotherId, entityInDb);
-            Assert.assertTrue(false);
-        } catch (ValidationException e) {
-            Assert.assertEquals(e.getResults().get(0).getMessage(), "{username_exists}");
-        }
+        userService.update(anotherId, entityInDb);
         entityInDb.setId(id);
+
         userService.update(id, entityInDb);
         entityInDb = userService.selectByUsername(userEntity.getUsername());
         Assert.assertEquals("新名字", entityInDb.getName());

+ 3 - 3
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-web/pom.xml

@@ -15,10 +15,10 @@
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.5</version>
-            <optional>true</optional>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
         </dependency>
+
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-system-authorization-api</artifactId>

+ 0 - 86
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-web/src/main/java/org/hswebframework/web/authorization/controller/UserTokenInfoController.java

@@ -1,86 +0,0 @@
-package org.hswebframework.web.authorization.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.hswebframework.web.authorization.Permission;
-import org.hswebframework.web.authorization.annotation.Authorize;
-import org.hswebframework.web.authorization.token.TokenState;
-import org.hswebframework.web.authorization.token.UserToken;
-import org.hswebframework.web.authorization.token.UserTokenHolder;
-import org.hswebframework.web.authorization.token.UserTokenManager;
-import org.hswebframework.web.controller.message.ResponseMessage;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-//@RestController
-//@RequestMapping("${hsweb.web.mappings.user-token:user-token}")
-//@Api(value = "用户令牌", tags = "权限-用户令牌管理")
-//@Authorize(permission = "user-token", description = "用户令牌管理")
-@Deprecated
-public class UserTokenInfoController {
-
-    @Autowired
-    private UserTokenManager userTokenManager;
-
-    @GetMapping("/token/total")
-    @Authorize(merge = false)
-    @ApiOperation("获取已授权令牌的总数")
-    public ResponseMessage<Long> allLoginToken() {
-        return ResponseMessage.ok(userTokenManager.totalToken());
-    }
-
-    @GetMapping("/user/total")
-    @Authorize(merge = false)
-    @ApiOperation("获取已授权用户的总数")
-    public ResponseMessage<Long> allUserToken() {
-        return ResponseMessage.ok(userTokenManager.totalUser());
-    }
-
-    @GetMapping("/reset")
-    @Authorize(merge = false)
-    @ApiOperation("重置当前用户的令牌")
-    public ResponseMessage<Boolean> resetToken() {
-        UserToken token = UserTokenHolder.currentToken();
-        if (token != null) {
-            userTokenManager.signOutByToken(token.getToken());
-        }
-        return ResponseMessage.ok(true);
-    }
-
-    @PutMapping("/check")
-    @ApiOperation("检查所有已过期的token并移除")
-    @Authorize(action = Permission.ACTION_UPDATE)
-    public ResponseMessage<Void> checkExpiredToken() {
-        userTokenManager.checkExpiredToken();
-        return ResponseMessage.ok();
-    }
-
-    @GetMapping("/token/all")
-    @ApiOperation("获取所有令牌")
-    @Authorize(action = Permission.ACTION_GET)
-    public ResponseMessage<List<UserToken>> allTokenInfo() {
-        return ResponseMessage.ok(userTokenManager.allLoggedUser());
-    }
-
-    @PutMapping("/token/{token}/{state}")
-    @ApiOperation("修改令牌状态")
-    @Authorize(action = Permission.ACTION_UPDATE)
-    public ResponseMessage<Void> changeTokenState(@ApiParam("令牌") @PathVariable String token, @ApiParam("要修改的状态") @PathVariable TokenState state) {
-        userTokenManager.changeTokenState(token, state);
-
-        return ResponseMessage.ok();
-    }
-
-    @PutMapping("/user/{userId}/{state}")
-    @ApiOperation("修改用户状态")
-    @Authorize(action = Permission.ACTION_GET)
-    public ResponseMessage<Void> changeUserState(@ApiParam("用户ID") @PathVariable String userId, @ApiParam("要修改的状态") @PathVariable TokenState state) {
-        userTokenManager.changeUserState(userId, state);
-        return ResponseMessage.ok();
-    }
-
-
-}

+ 4 - 6
hsweb-system/hsweb-system-config/hsweb-system-config-entity/pom.xml

@@ -24,19 +24,17 @@
         <artifactId>hsweb-system-config</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-config-entity</artifactId>
+    <artifactId>hsweb-system-config-api</artifactId>
 
     <dependencies>
-        <dependency>
-            <groupId>org.hswebframework</groupId>
-            <artifactId>hsweb-easy-orm-rdb</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-entity</artifactId>
+            <artifactId>hsweb-commons-service-api</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

hsweb-system/hsweb-system-config/hsweb-system-config-entity/src/main/java/org/hswebframework/web/entity/config/ConfigContent.java → hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/ConfigContent.java


hsweb-system/hsweb-system-config/hsweb-system-config-entity/src/main/java/org/hswebframework/web/entity/config/ConfigEntity.java → hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/ConfigEntity.java


hsweb-system/hsweb-system-config/hsweb-system-config-entity/src/main/java/org/hswebframework/web/entity/config/SimpleConfigEntity.java → hsweb-system/hsweb-system-config/hsweb-system-config-api/src/main/java/org/hswebframework/web/entity/config/SimpleConfigEntity.java


+ 5 - 2
hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-api/src/main/java/org/hswebframework/web/service/config/ConfigService.java

@@ -22,10 +22,13 @@ import org.hswebframework.web.entity.config.ConfigEntity;
 import org.hswebframework.web.service.CrudService;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
 public interface ConfigService extends CrudService<ConfigEntity, String> {
+    Number getNumber(String configId, String key, Number defaultValue);
+
+    String getString(String configId, String key, String defaultValue);
+
+    boolean getBoolean(String configId, String key, boolean defaultValue);
 
 }

+ 0 - 45
hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-api/pom.xml

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  * Copyright 2016 http://www.hswebframework.org
-  ~  *
-  ~  * Licensed under the Apache License, Version 2.0 (the "License");
-  ~  * you may not use this file except in compliance with the License.
-  ~  * You may obtain a copy of the License at
-  ~  *
-  ~  *     http://www.apache.org/licenses/LICENSE-2.0
-  ~  *
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-config-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-config-dao-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 44
hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-mybatis/pom.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  * Copyright 2016 http://www.hswebframework.org
-  ~  *
-  ~  * Licensed under the Apache License, Version 2.0 (the "License");
-  ~  * you may not use this file except in compliance with the License.
-  ~  * You may obtain a copy of the License at
-  ~  *
-  ~  *     http://www.apache.org/licenses/LICENSE-2.0
-  ~  *
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-config-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-config-dao-mybatis</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 38
hsweb-system/hsweb-system-config/hsweb-system-config-dao/pom.xml

@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  * Copyright 2016 http://www.hswebframework.org
-  ~  *
-  ~  * Licensed under the Apache License, Version 2.0 (the "License");
-  ~  * you may not use this file except in compliance with the License.
-  ~  * You may obtain a copy of the License at
-  ~  *
-  ~  *     http://www.apache.org/licenses/LICENSE-2.0
-  ~  *
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-config</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-config-dao</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-config-dao-api</module>
-        <module>hsweb-system-config-dao-mybatis</module>
-    </modules>
-
-
-</project>

+ 7 - 6
hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-simple/pom.xml

@@ -21,30 +21,31 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>hsweb-system-config-service</artifactId>
+        <artifactId>hsweb-system-config</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-config-service-simple</artifactId>
-
+    <artifactId>hsweb-system-config-local</artifactId>
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-dao-api</artifactId>
+            <artifactId>hsweb-system-config-api</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-service-api</artifactId>
+            <artifactId>hsweb-commons-service-simple</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-service-simple</artifactId>
+            <artifactId>hsweb-commons-dao-mybatis</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
 
+
 </project>

hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-api/src/main/java/org/hswebframework/web/dao/config/ConfigDao.java → hsweb-system/hsweb-system-config/hsweb-system-config-local/src/main/java/org/hswebframework/web/dao/config/ConfigDao.java


+ 91 - 0
hsweb-system/hsweb-system-config/hsweb-system-config-local/src/main/java/org/hswebframework/web/service/config/simple/SimpleConfigService.java

@@ -0,0 +1,91 @@
+/*
+ *
+ *  * Copyright 2016 http://www.hswebframework.org
+ *  *
+ *  * Licensed under the Apache License, Version 2.0 (the "License");
+ *  * you may not use this file except in compliance with the License.
+ *  * You may obtain a copy of the License at
+ *  *
+ *  *     http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.
+ *
+ */
+
+package org.hswebframework.web.service.config.simple;
+
+import org.hswebframework.web.dao.config.ConfigDao;
+import org.hswebframework.web.entity.config.ConfigContent;
+import org.hswebframework.web.entity.config.ConfigEntity;
+import org.hswebframework.web.id.IDGenerator;
+import org.hswebframework.web.service.EnableCacheAllEvictGenericEntityService;
+import org.hswebframework.web.service.GenericEntityService;
+import org.hswebframework.web.service.config.ConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheConfig;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+import java.util.Optional;
+
+/**
+ * @author zhouhao
+ */
+@Service("configService")
+@CacheConfig(cacheNames = "hsweb-config")
+public class SimpleConfigService extends EnableCacheAllEvictGenericEntityService<ConfigEntity, String>
+        implements ConfigService {
+
+    @Autowired
+    private ConfigDao configDao;
+
+    @Override
+    protected IDGenerator<String> getIDGenerator() {
+        return IDGenerator.MD5;
+    }
+
+    @Override
+    public ConfigDao getDao() {
+        return configDao;
+    }
+
+    protected Optional<ConfigContent> getConfigContent(String configId, String key) {
+        ConfigEntity entity = selectByPk(configId);
+        if (entity == null) {
+            return Optional.empty();
+        }
+        return Optional.ofNullable(entity.get(key));
+
+    }
+
+    @Override
+    @Cacheable(key = "'id:'+#configId+'.'+#key+'-as-number'")
+    public Number getNumber(String configId, String key, Number defaultValue) {
+
+        return getConfigContent(configId, key)
+                .map(conf -> conf.getNumber(defaultValue))
+                .orElse(defaultValue);
+    }
+
+    @Override
+    @Cacheable(key = "'id:'+#configId+'.'+#key+'-as-string'")
+    public String getString(String configId, String key, String defaultValue) {
+        return getConfigContent(configId, key)
+                .map(conf -> conf.getValue(defaultValue))
+                .map(String::valueOf)
+                .orElse(defaultValue);
+    }
+
+    @Override
+    @Cacheable(key = "'id:'+#configId+'.'+#key+'-as-boolean'")
+    public boolean getBoolean(String configId, String key, boolean defaultValue) {
+        return getConfigContent(configId, key)
+                .map(conf -> conf.getValue(defaultValue))
+                .map(val -> Boolean.TRUE.equals(val) || Integer.valueOf(1).equals(val))
+                .orElse(defaultValue);
+    }
+}

+ 1 - 1
hsweb-system/hsweb-system-config/hsweb-system-config-dao/hsweb-system-config-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/config/ConfigMapper.xml

@@ -4,7 +4,7 @@
         "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
 
 <mapper namespace="org.hswebframework.web.dao.config.ConfigDao">
-    <resultMap id="ConfigResultMap" type="org.hswebframework.web.entity.config.SimpleConfigEntity">
+    <resultMap id="ConfigResultMap" type="org.hswebframework.web.entity.config.ConfigEntity">
         <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
         <result property="remark" column="remark" javaType="String" jdbcType="VARCHAR"/>
         <result property="content" column="content" javaType="java.util.List" jdbcType="CLOB"/>

+ 0 - 45
hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-api/pom.xml

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  * Copyright 2016 http://www.hswebframework.org
-  ~  *
-  ~  * Licensed under the Apache License, Version 2.0 (the "License");
-  ~  * you may not use this file except in compliance with the License.
-  ~  * You may obtain a copy of the License at
-  ~  *
-  ~  *     http://www.apache.org/licenses/LICENSE-2.0
-  ~  *
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-config-service</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-config-service-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-service-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 50
hsweb-system/hsweb-system-config/hsweb-system-config-service/hsweb-system-config-service-simple/src/main/java/org/hswebframework/web/service/config/simple/SimpleConfigService.java

@@ -1,50 +0,0 @@
-/*
- *
- *  * Copyright 2016 http://www.hswebframework.org
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
- *
- */
-
-package org.hswebframework.web.service.config.simple;
-
-import org.hswebframework.web.dao.config.ConfigDao;
-import org.hswebframework.web.entity.config.ConfigEntity;
-import org.hswebframework.web.id.IDGenerator;
-import org.hswebframework.web.service.GenericEntityService;
-import org.hswebframework.web.service.config.ConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * TODO 完成注释
- *
- * @author zhouhao
- */
-@Service("configService")
-public class SimpleConfigService extends GenericEntityService<ConfigEntity, String>
-        implements ConfigService {
-
-    @Autowired
-    private ConfigDao configDao;
-
-    @Override
-    protected IDGenerator<String> getIDGenerator() {
-        return IDGenerator.MD5;
-    }
-
-    @Override
-    public ConfigDao getDao() {
-        return configDao;
-    }
-}

+ 0 - 38
hsweb-system/hsweb-system-config/hsweb-system-config-service/pom.xml

@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ /*
-  ~  * Copyright 2016 http://www.hswebframework.org
-  ~  *
-  ~  * Licensed under the Apache License, Version 2.0 (the "License");
-  ~  * you may not use this file except in compliance with the License.
-  ~  * You may obtain a copy of the License at
-  ~  *
-  ~  *     http://www.apache.org/licenses/LICENSE-2.0
-  ~  *
-  ~  * Unless required by applicable law or agreed to in writing, software
-  ~  * distributed under the License is distributed on an "AS IS" BASIS,
-  ~  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  * See the License for the specific language governing permissions and
-  ~  * limitations under the License.
-  ~  */
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-config</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-config-service</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-config-service-api</module>
-        <module>hsweb-system-config-service-simple</module>
-    </modules>
-
-
-</project>

+ 3 - 7
hsweb-system/hsweb-system-config/hsweb-system-config-starter/pom.xml

@@ -6,6 +6,7 @@
         <artifactId>hsweb-system-config</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -21,20 +22,15 @@
     </build>
 
     <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-service-simple</artifactId>
-            <version>${project.version}</version>
-        </dependency>
 
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-dao-mybatis</artifactId>
+            <artifactId>hsweb-system-config-local</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-controller</artifactId>
+            <artifactId>hsweb-system-config-web</artifactId>
             <version>${project.version}</version>
         </dependency>
 

+ 3 - 2
hsweb-system/hsweb-system-config/hsweb-system-config-controller/pom.xml

@@ -24,16 +24,17 @@
         <artifactId>hsweb-system-config</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-config-controller</artifactId>
+    <artifactId>hsweb-system-config-web</artifactId>
 
 
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-config-service-api</artifactId>
+            <artifactId>hsweb-system-config-api</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

hsweb-system/hsweb-system-config/hsweb-system-config-controller/src/main/java/org/hswebframework/web/controller/config/ConfigController.java → hsweb-system/hsweb-system-config/hsweb-system-config-web/src/main/java/org/hswebframework/web/controller/config/ConfigController.java


+ 3 - 4
hsweb-system/hsweb-system-config/pom.xml

@@ -30,10 +30,9 @@
     <artifactId>hsweb-system-config</artifactId>
     <packaging>pom</packaging>
     <modules>
-        <module>hsweb-system-config-dao</module>
-        <module>hsweb-system-config-service</module>
-        <module>hsweb-system-config-controller</module>
-        <module>hsweb-system-config-entity</module>
+        <module>hsweb-system-config-web</module>
+        <module>hsweb-system-config-api</module>
+        <module>hsweb-system-config-local</module>
         <module>hsweb-system-config-starter</module>
     </modules>
 

+ 4 - 2
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/pom.xml

@@ -6,15 +6,17 @@
         <artifactId>hsweb-system-datasource</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-datasource-entity</artifactId>
+    <description>动态数据源配置api</description>
+    <artifactId>hsweb-system-datasource-api</artifactId>
 
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-entity</artifactId>
+            <artifactId>hsweb-commons-service-api</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/DataSourceConfigEntity.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/entity/datasource/DataSourceConfigEntity.java


hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/SimpleDataSourceConfigEntity.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/entity/datasource/SimpleDataSourceConfigEntity.java


hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/hsweb-system-datasource-service-api/src/main/java/org/hswebframework/web/service/datasource/DataSourceConfigService.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-api/src/main/java/org/hswebframework/web/service/datasource/DataSourceConfigService.java


+ 0 - 27
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-api/pom.xml

@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-datasource-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-datasource-dao-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-datasource-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 26
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-mybatis/pom.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-datasource-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-datasource-dao-mybatis</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-datasource-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 18
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/pom.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-datasource</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-datasource-dao</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-datasource-dao-api</module>
-        <module>hsweb-system-datasource-dao-mybatis</module>
-    </modules>
-</project>

+ 46 - 0
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/pom.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-datasource</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <description>动态数据源配置本地mybatis实现</description>
+
+    <artifactId>hsweb-system-datasource-local</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-dao-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-datasource-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-datasource-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-datasource-jta</artifactId>
+            <version>${project.version}</version>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>

hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-api/src/main/java/org/hswebframework/web/dao/datasource/DataSourceConfigDao.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/dao/datasource/DataSourceConfigDao.java


hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/hsweb-system-datasource-service-simple/src/main/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepository.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepository.java


hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/hsweb-system-datasource-service-simple/src/main/java/org/hswebframework/web/service/datasource/simple/SimpleDataSourceConfigService.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/main/java/org/hswebframework/web/service/datasource/simple/SimpleDataSourceConfigService.java


+ 2 - 2
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-dao/hsweb-system-datasource-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/datasource/DataSourceConfigMapper.xml

@@ -3,7 +3,7 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.hswebframework.web.dao.datasource.DataSourceConfigDao">
-    <resultMap id="DataSourceConfigResultMap" type="org.hswebframework.web.entity.datasource.SimpleDataSourceConfigEntity">
+    <resultMap id="DataSourceConfigResultMap" type="org.hswebframework.web.entity.datasource.DataSourceConfigEntity">
               <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
             <result property="name" column="name" javaType="String" jdbcType="VARCHAR"/>
             <result property="enabled" column="enabled" javaType="Long" jdbcType="DECIMAL"/>
@@ -18,7 +18,7 @@
         <bind name="tableName" value="'s_datasource_conf'"/>
     </sql>
   
-    <insert id="insert" parameterType="org.hswebframework.web.entity.datasource.SimpleDataSourceConfigEntity" >
+    <insert id="insert" parameterType="org.hswebframework.web.entity.datasource.DataSourceConfigEntity" >
         <include refid="config"/>
         <include refid="BasicMapper.buildInsertSql"/>
     </insert>

hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/hsweb-system-datasource-service-simple/src/test/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepositoryTests.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-local/src/test/java/org/hswebframework/web/service/datasource/simple/InServiceJtaDataSourceRepositoryTests.java


+ 0 - 18
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-service/pom.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-datasource</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-datasource-service</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-datasource-service-api</module>
-        <module>hsweb-system-datasource-service-simple</module>
-    </modules>
-</project>

+ 5 - 9
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/pom.xml

@@ -6,11 +6,13 @@
         <artifactId>hsweb-system-datasource</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-datasource-starter</artifactId>
+    <description>动态数据源配置整合,集成springMvc,和local实现</description>
 
+    <artifactId>hsweb-system-datasource-starter</artifactId>
 
     <build>
         <resources>
@@ -24,22 +26,16 @@
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-datasource-service-simple</artifactId>
+            <artifactId>hsweb-system-datasource-local</artifactId>
             <version>${project.version}</version>
         </dependency>
       
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-datasource-dao-mybatis</artifactId>
+            <artifactId>hsweb-system-datasource-web</artifactId>
             <version>${project.version}</version>
         </dependency>
       
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-datasource-controller</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>

+ 35 - 0
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-web/pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-datasource</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <description>动态数据源配置web管理模块</description>
+
+    <artifactId>hsweb-system-datasource-web</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-datasource-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-controller</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

hsweb-system/hsweb-system-datasource/hsweb-system-datasource-controller/src/main/java/org/hswebframework/web/controller/datasource/DataSourceConfigController.java → hsweb-system/hsweb-system-datasource/hsweb-system-datasource-web/src/main/java/org/hswebframework/web/controller/datasource/DataSourceConfigController.java


+ 7 - 4
hsweb-system/hsweb-system-datasource/pom.xml

@@ -6,17 +6,20 @@
         <artifactId>hsweb-system</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
+
+    <description>动态数据源配置父模块</description>
+
     <modelVersion>4.0.0</modelVersion>
     <packaging>pom</packaging>
     <artifactId>hsweb-system-datasource</artifactId>
 
     <modules>
-        <module>hsweb-system-datasource-controller</module>
-        <module>hsweb-system-datasource-dao</module>
-        <module>hsweb-system-datasource-entity</module>
-        <module>hsweb-system-datasource-service</module>
         <module>hsweb-system-datasource-starter</module>
+        <module>hsweb-system-datasource-api</module>
+        <module>hsweb-system-datasource-local</module>
+        <module>hsweb-system-datasource-web</module>
 
     </modules>
 

+ 5 - 3
hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/pom.xml

@@ -6,17 +6,19 @@
         <artifactId>hsweb-system-dynamic-form</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-dynamic-form-entity</artifactId>
+    <artifactId>hsweb-system-dynamic-form-api</artifactId>
+
+    <description>动态表单api</description>
 
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-entity</artifactId>
+            <artifactId>hsweb-commons-service-api</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-
 </project>

hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/DictConfig.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DictConfig.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnBindEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnBindEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormColumnEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/DynamicFormDeployLogEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormDeployLogEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/DynamicFormEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/DynamicFormEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormColumnEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormColumnEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormDeployLogEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormDeployLogEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-entity/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormEntity.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormEntity.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/DatabaseRepository.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DatabaseRepository.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/DynamicFormColumnService.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormColumnService.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/DynamicFormDeployLogService.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormDeployLogService.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/DynamicFormOperationService.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormOperationService.java


hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/DynamicFormService.java → hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/service/form/DynamicFormService.java


+ 0 - 0
hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-service/hsweb-system-dynamic-form-service-api/src/main/java/org/hswebframework/web/service/form/OptionalConvertBuilder.java


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff