zhouhao 8 лет назад
Родитель
Сommit
04fe29c9f1
30 измененных файлов с 1123 добавлено и 16 удалено
  1. 3 3
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-controller/src/main/java/org/hswebframework/web/controller/authorization/UserController.java
  2. 4 0
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorization.java
  3. 15 0
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/pom.xml
  4. 1 1
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/java/org/hswebframework/web/starter/authorization/UserTests.java
  5. 4 1
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/resources/application.yml
  6. 8 5
      hsweb-system/hsweb-system-config/hsweb-system-config-controller/src/main/java/org/hswebframework/web/controller/config/ConfigController.java
  7. 1 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
  8. 1 1
      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
  9. 7 3
      hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/test/java/org/hswebframework/web/starter/config/ConfigTests.java
  10. 15 0
      hsweb-system/hsweb-system-crawler/pom.xml
  11. 2 0
      hsweb-system/hsweb-system-explorer/README.md
  12. 44 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-api/pom.xml
  13. 30 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-api/src/main/java/org/hswebframework/web/dao/explorer/MenuDao.java
  14. 43 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-mybatis/pom.xml
  15. 74 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/explorer/MenuMapper.xml
  16. 37 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/pom.xml
  17. 49 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/pom.xml
  18. 80 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/src/main/java/org/hswebframework/web/entity/explorer/MenuEntity.java
  19. 195 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/src/main/java/org/hswebframework/web/entity/explorer/SimpleMenuEntity.java
  20. 43 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-api/pom.xml
  21. 37 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-api/src/main/java/org/hswebframework/web/service/explorer/simple/MenuService.java
  22. 49 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-simple/pom.xml
  23. 67 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-simple/src/main/java/org/hswebframework/web/service/explorer/simple/SimpleMenuService.java
  24. 37 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/pom.xml
  25. 83 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/pom.xml
  26. 68 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/main/resources/hsweb-starter.js
  27. 72 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/test/java/org/hswebframework/web/starter/explorer/MenuTests.java
  28. 13 0
      hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/test/resources/application.yml
  29. 39 0
      hsweb-system/hsweb-system-explorer/pom.xml
  30. 2 0
      hsweb-system/pom.xml

+ 3 - 3
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-controller/src/main/java/org/hswebframework/web/controller/authorization/UserController.java

@@ -17,13 +17,13 @@
 
 package org.hswebframework.web.controller.authorization;
 
-import org.hswebframework.web.annotation.AuthInfo;
-import org.hswebframework.web.authorization.Authorize;
+import org.hswebframework.web.authorization.annotation.AuthInfo;
+import org.hswebframework.web.authorization.Authorization;
+import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.commons.entity.param.QueryParamEntity;
 import org.hswebframework.web.controller.CreateController;
 import org.hswebframework.web.controller.QueryController;
 import org.hswebframework.web.controller.message.ResponseMessage;
-import org.hswebframework.web.entity.authorization.Authorization;
 import org.hswebframework.web.entity.authorization.UserEntity;
 import org.hswebframework.web.logging.AccessLogger;
 import org.hswebframework.web.service.authorization.UserService;

+ 4 - 0
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthorization.java

@@ -114,6 +114,9 @@ public class SimpleAuthorization implements Authorization {
         this.attributes = attributes;
     }
 
+    public Map<String, Serializable> getAttributes() {
+        return attributes;
+    }
 
     public static class ReadOnlyPermission implements Permission {
         private String       id;
@@ -139,6 +142,7 @@ public class SimpleAuthorization implements Authorization {
 
         @Override
         public List<String> getActions() {
+            if (actions == null) actions = Collections.emptyList();
             return new ArrayList<>(actions);
         }
 

+ 15 - 0
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/pom.xml

@@ -67,17 +67,32 @@
             <scope>test</scope>
         </dependency>
 
+        <!--<dependency>-->
+            <!--<groupId>org.hswebframework.web</groupId>-->
+            <!--<artifactId>hsweb-authorization-shiro</artifactId>-->
+            <!--<version>${project.version}</version>-->
+            <!--<scope>test</scope>-->
+        <!--</dependency>-->
+
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-spring-boot-starter</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
+
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-tests</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

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

@@ -17,7 +17,7 @@
 
 package org.hswebframework.web.starter.authorization;
 
-import org.hswebframework.web.entity.authorization.Authorization;
+import org.hswebframework.web.authorization.Authorization;
 import org.hswebframework.web.entity.authorization.UserEntity;
 import org.hswebframework.web.service.authorization.PasswordStrengthValidator;
 import org.hswebframework.web.service.authorization.UserService;

+ 4 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/resources/application.yml

@@ -10,4 +10,7 @@ spring:
 hsweb:
     app:
       name: 权限管理测试
-      version: 3.0.0
+      version: 3.0.0
+    web:
+      authorize:
+          rsa: true

+ 8 - 5
hsweb-system/hsweb-system-config/hsweb-system-config-controller/src/main/java/org/hswebframework/web/controller/config/ConfigController.java

@@ -18,10 +18,10 @@
 
 package org.hswebframework.web.controller.config;
 
-import org.hswebframework.web.authorization.Authorize;
+import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.commons.entity.param.QueryParamEntity;
 import org.hswebframework.web.controller.GenericEntityController;
-import org.hswebframework.web.entity.config.SimpleConfigEntity;
+import org.hswebframework.web.entity.config.ConfigEntity;
 import org.hswebframework.web.logging.AccessLogger;
 import org.hswebframework.web.service.config.ConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,13 +37,16 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("${hsweb.web.mappings.config:config}")
 @Authorize(module = "config")
 @AccessLogger("配置管理")
-public class ConfigController implements GenericEntityController<SimpleConfigEntity, String> {
+public class ConfigController implements GenericEntityController<ConfigEntity, String, QueryParamEntity> {
+
+    private ConfigService configService;
 
     @Autowired
-    private ConfigService<QueryParamEntity> configService;
+    public void setConfigService(ConfigService configService) {
+        this.configService = configService;
+    }
 
     @Override
-    @SuppressWarnings("unchecked")
     public ConfigService getService() {
         return configService;
     }

+ 1 - 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

@@ -18,7 +18,6 @@
 
 package org.hswebframework.web.service.config;
 
-import org.hswebframework.web.commons.entity.Entity;
 import org.hswebframework.web.entity.config.ConfigEntity;
 import org.hswebframework.web.service.CrudService;
 
@@ -27,6 +26,6 @@ import org.hswebframework.web.service.CrudService;
  *
  * @author zhouhao
  */
-public interface ConfigService<Q extends Entity> extends CrudService<ConfigEntity, String, Q> {
+public interface ConfigService extends CrudService<ConfigEntity, String> {
 
 }

+ 1 - 1
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

@@ -33,7 +33,7 @@ import org.springframework.stereotype.Service;
  */
 @Service("configService")
 public class SimpleConfigService extends GenericEntityService<ConfigEntity, String>
-        implements ConfigService<QueryParamEntity> {
+        implements ConfigService {
 
     @Autowired
     private ConfigDao configDao;

+ 7 - 3
hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/test/java/org/hswebframework/web/starter/config/ConfigTests.java

@@ -29,7 +29,7 @@ public class ConfigTests extends SimpleWebApplicationTests {
     private SqlExecutor executor;
 
     @Autowired
-    private ConfigService<QueryParamEntity> configService;
+    private ConfigService configService;
 
     @After
     public void clear() throws SQLException {
@@ -50,7 +50,8 @@ public class ConfigTests extends SimpleWebApplicationTests {
         JSONObject jsonObject = testPost("/config")
                 .setUp(builder -> builder.accept(MediaType.APPLICATION_JSON)
                         .contentType(MediaType.APPLICATION_JSON)
-                        .content(jsonStr))
+                        .content(jsonStr)
+                )
                 .exec().resultAsJson();
         //{data:id,code:200}
         Assert.assertEquals(jsonObject.getString("data"), configBean.getId());
@@ -61,7 +62,10 @@ public class ConfigTests extends SimpleWebApplicationTests {
                 .get("test")
                 .getNumber(0).intValue(), 1);
 
-        getRes = testGet("/config").exec().resultAsJson();
+        getRes = testGet("/config").setUp(builder ->
+                builder.param("terms[0].column", "id")
+                        .param("terms[0].value", configBean.getId())
+        ).exec().resultAsJson();
         Assert.assertEquals(getRes.getJSONObject("data").getJSONArray("data")
                 .getObject(0, SimpleConfigEntity.class)
                 .get("test")

+ 15 - 0
hsweb-system/hsweb-system-crawler/pom.xml

@@ -0,0 +1,15 @@
+<?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</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-crawler</artifactId>
+
+
+</project>

+ 2 - 0
hsweb-system/hsweb-system-explorer/README.md

@@ -0,0 +1,2 @@
+## 系统资源管理器
+用于管理系统 菜单,按钮等功能

+ 44 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-api/pom.xml

@@ -0,0 +1,44 @@
+<?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-explorer-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-dao-api</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-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>

+ 30 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-api/src/main/java/org/hswebframework/web/dao/explorer/MenuDao.java

@@ -0,0 +1,30 @@
+/*
+ * 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.dao.explorer;
+
+import org.hswebframework.web.dao.CrudDao;
+import org.hswebframework.web.entity.authorization.ActionEntity;
+import org.hswebframework.web.entity.explorer.MenuEntity;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface MenuDao extends CrudDao<MenuEntity<MenuEntity, ActionEntity>, String> {
+}

+ 43 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-mybatis/pom.xml

@@ -0,0 +1,43 @@
+<?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-explorer-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-dao-mybatis</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-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>

+ 74 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/hsweb-system-explorer-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/explorer/MenuMapper.xml

@@ -0,0 +1,74 @@
+<?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.
+  ~
+  -->
+
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="org.hswebframework.web.dao.explorer.MenuDao">
+    <resultMap id="MenuResultMap" type="org.hswebframework.web.entity.explorer.SimpleMenuEntity">
+        <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
+        <result property="describe" column="describe" javaType="String" jdbcType="VARCHAR"/>
+        <result property="parentId" column="parent_id" javaType="String" jdbcType="VARCHAR"/>
+        <result property="name" column="name" javaType="String" jdbcType="VARCHAR"/>
+        <result property="treeCode" column="tree_code" javaType="String" jdbcType="VARCHAR"/>
+        <result property="permissionId" column="permission_id" javaType="String" jdbcType="VARCHAR"/>
+        <result property="onInit" column="on_init" javaType="String" jdbcType="CLOB"/>
+        <result property="enabled" column="enabled" javaType="boolean" jdbcType="NUMERIC"/>
+        <result property="sortIndex" column="sort_index" javaType="long" jdbcType="NUMERIC"/>
+        <result property="icon" column="icon" javaType="String" jdbcType="VARCHAR"/>
+        <result property="authentication" column="authentication" javaType="boolean" jdbcType="VARCHAR"/>
+        <result property="authenticationConfig" column="authentication_config" javaType="java.util.Map" jdbcType="CLOB"/>
+        <result property="actions" column="actions" javaType="java.util.List" jdbcType="CLOB"/>
+    </resultMap>
+
+    <!--用于动态生成sql所需的配置-->
+    <sql id="config">
+        <bind name="resultMapId" value="'MenuResultMap'"/>
+        <bind name="tableName" value="'s_menu'"/>
+    </sql>
+
+    <insert id="insert" parameterType="org.hswebframework.web.entity.explorer.MenuEntity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildInsertSql"/>
+    </insert>
+
+    <delete id="deleteByPk" parameterType="String">
+        delete from s_config where u_id =#{id}
+    </delete>
+
+    <delete id="delete" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildDeleteSql"/>
+    </delete>
+
+    <update id="update" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildUpdateSql"/>
+    </update>
+
+    <select id="query" parameterType="org.hswebframework.web.commons.entity.Entity" resultMap="MenuResultMap">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildSelectSql"/>
+    </select>
+
+    <select id="count" parameterType="org.hswebframework.web.commons.entity.Entity" resultType="int">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildTotalSql"/>
+    </select>
+</mapper>

+ 37 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-dao/pom.xml

@@ -0,0 +1,37 @@
+<?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-explorer</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-dao</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-explorer-dao-api</module>
+        <module>hsweb-system-explorer-dao-mybatis</module>
+    </modules>
+
+
+</project>

+ 49 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/pom.xml

@@ -0,0 +1,49 @@
+<?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-explorer</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-entity</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-authorization-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 80 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/src/main/java/org/hswebframework/web/entity/explorer/MenuEntity.java

@@ -0,0 +1,80 @@
+/*
+ * 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.entity.explorer;
+
+import org.hswebframework.web.commons.entity.*;
+import org.hswebframework.web.entity.authorization.ActionEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface MenuEntity<C extends MenuEntity, A extends ActionEntity>
+        extends TreeSortSupportEntity<String> {
+    String getName();
+
+    void setName(String name);
+
+    String getDescribe();
+
+    void setDescribe(String describe);
+
+    String getPermissionId();
+
+    void setPermissionId(String permissionId);
+
+    String getUrl();
+
+    void setUrl(String url);
+
+    String getIcon();
+
+    void setIcon(String icon);
+
+    String getAuthentication();
+
+    void setAuthentication(String authentication);
+
+    Map<String, Object> getAuthenticationConfig();
+
+    void setAuthenticationConfig(Map<String, Object> authenticationConfig);
+
+    String getOnInit();
+
+    void setOnInit(String onInit);
+
+    boolean isEnabled();
+
+    void setEnabled(boolean enabled);
+
+    List<A> getActions();
+
+    void setActions(List<A> actions);
+
+    void setChildren(List<C> children);
+
+    @Override
+    @SuppressWarnings("unchecked")
+    List<C> getChildren();
+
+    MenuEntity<C, A> clone();
+}

+ 195 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-entity/src/main/java/org/hswebframework/web/entity/explorer/SimpleMenuEntity.java

@@ -0,0 +1,195 @@
+/*
+ * 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.entity.explorer;
+
+import org.hswebframework.web.commons.entity.CloneableEntity;
+import org.hswebframework.web.commons.entity.SimpleTreeSortSupportEntity;
+import org.hswebframework.web.entity.authorization.SimpleActionEntity;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public class SimpleMenuEntity extends SimpleTreeSortSupportEntity<String>
+        implements MenuEntity<SimpleMenuEntity, SimpleActionEntity> {
+
+    //菜单名称
+    private String name;
+
+    //备注
+    private String describe;
+
+    //权限ID
+    private String permissionId;
+
+    //菜单对应的url
+    private String url;
+
+    //图标
+    private String icon;
+
+    //授权方式
+    private String authentication;
+
+    //授权配置
+    private Map<String, Object> authenticationConfig;
+
+    //菜单初始化时,执行脚本
+    private String onInit;
+
+    //是否启用
+    private boolean enabled = true;
+
+    //子菜单
+    private List<SimpleMenuEntity> children;
+
+    //可选操作(按钮)
+    private List<SimpleActionEntity> actions;
+
+    public List<SimpleActionEntity> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<SimpleActionEntity> actions) {
+        this.actions = actions;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<SimpleMenuEntity> getChildren() {
+        return children;
+    }
+
+    @Override
+    public void setChildren(List<SimpleMenuEntity> children) {
+        this.children = children;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescribe() {
+        return describe;
+    }
+
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
+
+    public String getPermissionId() {
+        return permissionId;
+    }
+
+    public void setPermissionId(String permissionId) {
+        this.permissionId = permissionId;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getAuthentication() {
+        return authentication;
+    }
+
+    public void setAuthentication(String authentication) {
+        this.authentication = authentication;
+    }
+
+    public Map<String, Object> getAuthenticationConfig() {
+        return authenticationConfig;
+    }
+
+    public void setAuthenticationConfig(Map<String, Object> authenticationConfig) {
+        this.authenticationConfig = authenticationConfig;
+    }
+
+    public String getOnInit() {
+        return onInit;
+    }
+
+    public void setOnInit(String onInit) {
+        this.onInit = onInit;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    @Override
+    public SimpleMenuEntity clone() {
+        SimpleMenuEntity target = new SimpleMenuEntity();
+        target.setId(getId());
+        target.setName(getName());
+        target.setDescribe(getDescribe());
+        target.setEnabled(isEnabled());
+        target.setPermissionId(getPermissionId());
+        target.setOnInit(getOnInit());
+        target.setAuthentication(getAuthentication());
+        target.setUrl(getUrl());
+        target.setIcon(getIcon());
+        target.setProperties(cloneProperties());
+        target.setParentId(getParentId());
+        target.setTreeCode(getTreeCode());
+        target.setSortIndex(getSortIndex());
+        if (null != getAuthenticationConfig()) {
+            target.setAuthenticationConfig(getAuthenticationConfig()
+                    .entrySet().stream().collect(Collectors.toMap(
+                            Map.Entry::getKey,
+                            e -> {
+                                if (e.getValue() instanceof CloneableEntity) {
+                                    return ((CloneableEntity) e.getValue()).clone();
+                                }
+                                return e.getValue();
+                            })));
+        }
+        if (null != getActions()) {
+            target.setActions(getActions().stream().map(SimpleActionEntity::clone).collect(Collectors.toList()));
+        }
+        if (null != getChildren()) {
+            target.setChildren(getChildren().stream().map(SimpleMenuEntity::clone).collect(Collectors.toList()));
+        }
+        return target;
+    }
+}

+ 43 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-api/pom.xml

@@ -0,0 +1,43 @@
+<?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-explorer-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-service-api</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-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>

+ 37 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-api/src/main/java/org/hswebframework/web/service/explorer/simple/MenuService.java

@@ -0,0 +1,37 @@
+/*
+ * 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.explorer.simple;
+
+import org.hswebframework.web.entity.authorization.ActionEntity;
+import org.hswebframework.web.entity.explorer.MenuEntity;
+import org.hswebframework.web.service.CrudService;
+
+import java.util.List;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface MenuService
+        extends CrudService<MenuEntity<MenuEntity, ActionEntity>, String> {
+    MenuEntity<MenuEntity, ActionEntity> getByPermissionId(String permissionId);
+
+    List<MenuEntity<MenuEntity, ActionEntity>> getByPermissionId(List<String> permissionId);
+
+}

+ 49 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-simple/pom.xml

@@ -0,0 +1,49 @@
+<?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-explorer-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-service-simple</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-dao-api</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-explorer-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 67 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/hsweb-system-explorer-service-simple/src/main/java/org/hswebframework/web/service/explorer/simple/SimpleMenuService.java

@@ -0,0 +1,67 @@
+/*
+ * 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.explorer.simple;
+
+import org.hswebframework.web.dao.explorer.MenuDao;
+import org.hswebframework.web.entity.authorization.ActionEntity;
+import org.hswebframework.web.entity.explorer.MenuEntity;
+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 java.util.List;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+@Service("menuService")
+public class SimpleMenuService
+        extends AbstractTreeSortService<MenuEntity<MenuEntity, ActionEntity>, String>
+        implements MenuService {
+
+    //dao api
+    private MenuDao menuDao;
+
+    @Override
+    protected IDGenerator<String> getIDGenerator() {
+        return IDGenerator.MD5;
+    }
+
+    @Autowired
+    public void setMenuDao(MenuDao menuDao) {
+        this.menuDao = menuDao;
+    }
+
+    @Override
+    public MenuDao getDao() {
+        return menuDao;
+    }
+
+    @Override
+    public List<MenuEntity<MenuEntity, ActionEntity>> getByPermissionId(List<String> permissionId) {
+        return createQuery().noPaging().where().in("permissionId", permissionId).list();
+    }
+
+    @Override
+    public MenuEntity<MenuEntity, ActionEntity> getByPermissionId(String permissionId) {
+        return createQuery().noPaging().where().is("permissionId", permissionId).single();
+    }
+}

+ 37 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-service/pom.xml

@@ -0,0 +1,37 @@
+<?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-explorer</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-service</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-explorer-service-api</module>
+        <module>hsweb-system-explorer-service-simple</module>
+    </modules>
+
+
+</project>

+ 83 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/pom.xml

@@ -0,0 +1,83 @@
+<?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-explorer</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer-starter</artifactId>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-explorer-dao-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>org.hswebframework.web</groupId>-->
+        <!--<artifactId>hsweb-system-explorer-controller</artifactId>-->
+        <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
+
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.0.26</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-spring-boot-starter</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-tests</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>

+ 68 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/main/resources/hsweb-starter.js

@@ -0,0 +1,68 @@
+/*
+ * 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.
+ *
+ */
+//组件信息
+var info = {
+    groupId: "${project.groupId}",
+    artifactId: "${project.artifactId}",
+    version: "${project.version}",
+    website: "http://github.com/hs-web/hsweb-framework",
+    author: "zh.sqy@qq.com",
+    comment: "资源管理器"
+};
+
+//版本更新信息
+var versions = [
+    // {
+    //     version: "3.0.0",
+    //     upgrade: function (context) {
+    //     }
+    // }
+];
+var JDBCType = java.sql.JDBCType;
+function install(context) {
+    var database = context.database;
+    database.createOrAlter("s_menu")
+        .addColumn().name("u_id").varchar(32).notNull().primaryKey().comment("uid").commit()
+        .addColumn().name("name").varchar(64).notNull().comment("名称").commit()
+        .addColumn().name("parent_id").varchar(32).comment("父级ID").commit()
+        .addColumn().name("permission_id").varchar(32).comment("权限ID").commit()
+        .addColumn().name("tree_code").varchar(2048).notNull().comment("树编码").commit()
+        .addColumn().name("sort_index").number(32).notNull().comment("树编码").commit()
+        .addColumn().name("describe").varchar(128).comment("备注").commit()
+        .addColumn().name("url").varchar(2000).comment("URL").commit()
+        .addColumn().name("icon").varchar(512).comment("图标").commit()
+        .addColumn().name("authentication").varchar(128).comment("认证方式").commit()
+        .addColumn().name("authentication_config").clob().comment("认证配置").commit()
+        .addColumn().name("on_init").clob().comment("加载后执行脚本").commit()
+        .addColumn().name("enabled").varchar(32).comment("是否有效").commit()
+        .addColumn().name("actions").clob().comment("可选操作集合").commit()
+        .comment("系统菜单表").commit()
+}
+
+//设置依赖
+dependency.setup(info)
+    .onInstall(install)
+    .onUpgrade(function (context) { //更新时执行
+        var upgrader = context.upgrader;
+        upgrader.filter(versions)
+            .upgrade(function (newVer) {
+                newVer.upgrade(context);
+            });
+    })
+    .onUninstall(function (context) { //卸载时执行
+
+    });

+ 72 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/test/java/org/hswebframework/web/starter/explorer/MenuTests.java

@@ -0,0 +1,72 @@
+/*
+ * 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.starter.explorer;
+
+import com.alibaba.fastjson.JSON;
+import org.hswebframework.web.entity.authorization.ActionEntity;
+import org.hswebframework.web.entity.authorization.SimpleActionEntity;
+import org.hswebframework.web.entity.explorer.MenuEntity;
+import org.hswebframework.web.service.explorer.simple.MenuService;
+import org.hswebframework.web.tests.SimpleWebApplicationTests;
+import org.junit.After;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.sql.SQLException;
+import java.util.Arrays;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+
+public class MenuTests extends SimpleWebApplicationTests {
+
+    @Autowired
+    MenuService menuService;
+
+    @After
+    public void clear() throws SQLException {
+        sqlExecutor.delete("delete from s_menu");
+    }
+
+    public MenuEntity<MenuEntity, ActionEntity> createMenu(String name, String... actions) {
+        MenuEntity<MenuEntity, ActionEntity> menuEntity = menuService.createEntity();
+        menuEntity.setName(name);
+        menuEntity.setActions(SimpleActionEntity.create(actions));
+        return menuEntity;
+    }
+
+    @Test
+    public void testCrud() throws Exception {
+        MenuEntity<MenuEntity, ActionEntity> menuEntity = createMenu("测试1", "C", "R");
+        menuEntity.setSortIndex(1);
+        MenuEntity<MenuEntity, ActionEntity> child1 = createMenu("测试2", "C", "R");
+        MenuEntity<MenuEntity, ActionEntity> child3 = createMenu("测试2", "C", "R");
+        menuEntity.setChildren(Arrays.asList(child1, child3));
+
+        String id = menuService.insert(menuEntity);
+
+        System.out.println(JSON.toJSONString(menuService.select()));
+        assertNotNull(id);
+
+    }
+}

+ 13 - 0
hsweb-system/hsweb-system-explorer/hsweb-system-explorer-starter/src/test/resources/application.yml

@@ -0,0 +1,13 @@
+spring:
+    aop:
+        auto: true
+    datasource:
+       url : jdbc:h2:mem:explorer_test_mem
+       username : sa
+       password :
+       type: com.alibaba.druid.pool.DruidDataSource
+       driver-class-name : org.h2.Driver
+hsweb:
+    app:
+      name: 资源管理器测试
+      version: 3.0.0

+ 39 - 0
hsweb-system/hsweb-system-explorer/pom.xml

@@ -0,0 +1,39 @@
+<?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</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-explorer</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-explorer-entity</module>
+        <module>hsweb-system-explorer-dao</module>
+        <module>hsweb-system-explorer-service</module>
+        <module>hsweb-system-explorer-starter</module>
+    </modules>
+
+
+</project>

+ 2 - 0
hsweb-system/pom.xml

@@ -29,6 +29,8 @@
         <module>hsweb-system-history</module>
         <module>hsweb-system-dictionary</module>
         <module>hsweb-system-document</module>
+        <module>hsweb-system-explorer</module>
+        <module>hsweb-system-crawler</module>
     </modules>
     <artifactId>hsweb-system</artifactId>