Skip to content

Commit 166d6a5

Browse files
authored
Merge pull request hs-web#6 from hs-web/2.1-SNAPSHOT
2.1 snapshot
2 parents 45e625b + af76d0c commit 166d6a5

File tree

125 files changed

+1807
-3128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1807
-3128
lines changed

README.md

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,31 @@
33
[![Build Status](https://travis-ci.org/hs-web/hsweb-framework.svg?branch=master)](https://travis-ci.org/hs-web/hsweb-framework)
44
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)
55

6-
### 主要功能
6+
### 业务功能
7+
现在:
8+
9+
1. 权限管理: 权限资源-角色-用户.
10+
2. 配置管理: kv结构,自定义配置.可通过此功能配置数据字典.
11+
3. 脚本管理: 动态脚本,支持javascript,groovy,java动态编译执行.
12+
4. 表单管理: 动态表单,可视化设计表单,自动生成数据库以及系统权限.无需重启直接生效.
13+
5. 模块设置: 配合动态表达没实现表格页,查询条件自定义.
14+
6. 数据库维护: 在线维护数据库,修改表结构,执行sql.
15+
7. 数据源管理: 配置多数据源.
16+
8. 代码生成器: 在线生成代码,打包下载.可自定义模板.
17+
9. 定时任务: 配置定时任务,使用动态脚本编写任务内容.
18+
10. 系统监控: 监控系统资源使用情况.
19+
11. 缓存监控: 监控缓存情况.
20+
12. 访问日志: 记录用户每次操作情况
21+
22+
未来
23+
24+
1. 组织架构管理: 地区-机构-部门-职务-人员.
25+
2. 工作流管理: activiti工作流,在线配置流程,配合动态表单实现自定义流程.
26+
3. 邮件代收: 代收指定邮箱的邮件
27+
28+
29+
### 框架功能
30+
0. 全局restful+json,前后分离.
731
1. 通用dao,service,controller类,增删改查直接继承即可.
832
2. 通用mybatis配置文件,支持多种条件查询自动生成,支持自动生成insert,update,delete语句,支持和查询相同的各种条件.
933
3. 实现用户,权限管理;基于aop,注解,精确到按钮的权限控制.
@@ -14,30 +38,38 @@
1438
8. websocket支持.
1539
9. 定时调度支持,可在页面配置定时任务,编写任务脚本执行。
1640

17-
### 其他组件
18-
1. [hsweb-easy-orm](https://github.com/hs-web/hsweb-easy-orm) :为动态表单设计的orm框架
19-
2. [hsweb-expands-compress](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-compress) :文件压缩,解压操作
20-
3. [hsweb-expands-office](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-office) :office文档操作( excel读写,模板导出,word模板导出)
21-
4. [hsweb-expands-request](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-request): 请求模拟(http,ftp)
22-
5. [hsweb-expands-script](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-script):动态脚本,动态编译执行java,groovy,javascript,spel,ognl....
23-
6. [hsweb-expands-shell](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-shell):shell执行
24-
7. [hsweb-expands-template](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-template):各种模板引擎
41+
### 演示
42+
1. 示例:[demo.hsweb.me](http://demo.hsweb.me)
43+
2. 测试用户:test (test2,test3,test4....) 密码:123456
44+
3. 演示项目源码:[hsweb-platform](https://github.com/hs-web/hsweb-platform)
2545

26-
# 安装
27-
```bash
28-
$ git clone https://github.com/hs-web/hsweb-framework.git
29-
$ cd hsweb-framework
30-
$ mvn install -DskiptTests
31-
```
46+
### 文档
47+
1. [安装使用](doc/1.安装使用.md)
48+
2. [API](doc/2.API.md)
3249

33-
# 此版本待完善功能
50+
### 此版本待完善功能
3451
1. 单元测试编写
3552
2. 项目文档编写
36-
3. 增加定时调度,支持集群,任务采用脚本方式编写.
53+
3. ~~增加定时调度,支持集群,任务采用脚本方式编写.~~
3754
4. 完善数据库持续集成,版本更新时自动更新数据库结构.
3855
5. 完善动态表单发布,表单发生变化后,自动重新发布(解决集群下,表单配置不一致).
3956

40-
# 演示
41-
1. 示例:[demo.hsweb.me](http://demo.hsweb.me)
42-
2. 测试用户:test (test2,test3,test4....) 密码:123456
43-
3. 演示项目源码:[hsweb-platform](https://github.com/hs-web/hsweb-platform)
57+
### 技术选型
58+
第三方:
59+
60+
1. MVC:[spring-boot](https://github.com/spring-projects/spring-boot). 开箱即用,学习成本低,部署方便(main方法运行).
61+
2. ORM:[mybatis](https://github.com/mybatis/mybatis-3). 配置灵活,简单方便.
62+
3. JTA:[atomikos](https://www.atomikos.com/). 分布式事务,多数据源事务全靠他.
63+
4. Cache:[spring-cache](https://github.com/spring-projects/spring-framework/tree/master/spring-context/src/main/java/org/springframework/cache). 统一接口,注解使用,simple,redis... 自动切换.
64+
5. Scheduler:[quartz](https://github.com/quartz-scheduler/quartz). 开源稳定,支持集群.
65+
66+
自家:
67+
68+
0. [hsweb-commons](https://github.com/hs-web/hsweb-commons) :通用工具类
69+
1. [hsweb-easy-orm](https://github.com/hs-web/hsweb-easy-orm) :为动态表单设计的orm框架
70+
2. [hsweb-expands-compress](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-compress) :文件压缩,解压操作
71+
3. [hsweb-expands-office](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-office) :office文档操作( excel读写,模板导出,word模板导出)
72+
4. [hsweb-expands-request](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-request): 请求模拟(http,ftp)
73+
5. [hsweb-expands-script](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-script):动态脚本,动态编译执行java,groovy,javascript,spel,ognl....
74+
6. [hsweb-expands-shell](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-shell):shell执行
75+
7. [hsweb-expands-template](https://github.com/hs-web/hsweb-expands/tree/master/hsweb-expands-template):各种模板引擎

doc/1.安装使用.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# 使用hsweb
2+
项目java8开发,使用maven进行管理.
3+
4+
## 使用
5+
配置pom.xml
6+
```xml
7+
<!--统一依赖管理-->
8+
<dependencyManagement>
9+
<dependencies>
10+
<dependency>
11+
<groupId>org.hsweb</groupId>
12+
<artifactId>hsweb-framework</artifactId>
13+
<version>${hsweb.version}</version>
14+
<type>pom</type>
15+
<scope>import</scope>
16+
</dependency>
17+
</dependencies>
18+
</dependencyManagement>
19+
<!--引入私服-->
20+
<repositories>
21+
<repository>
22+
<id>hsweb-nexus</id>
23+
<name>Nexus Release Repository</name>
24+
<url>http://nexus.hsweb.me/content/groups/public/</url>
25+
<snapshots>
26+
<enabled>true</enabled>
27+
</snapshots>
28+
</repository>
29+
</repositories>
30+
```
31+
32+
引入依赖
33+
```xml
34+
<!--设置了dependencyManagement,可以不指定版本号-->
35+
<dependency>
36+
<groupId>org.hsweb</groupId>
37+
<artifactId>hsweb-web-controller</artifactId>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.hsweb</groupId>
42+
<artifactId>hsweb-web-service-simple</artifactId>
43+
</dependency>
44+
45+
<dependency>
46+
<groupId>org.hsweb</groupId>
47+
<artifactId>hsweb-web-dao-mybatis</artifactId>
48+
</dependency>
49+
```

hsweb-web-bean/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## 实体类模块,通用bean,po,和自定义验证器
2+
3+
### 目录结构
4+
5+
```bash
6+
--------src/main/java
7+
---------------------org.hsweb.web.bean
8+
----------------------------common # 通用bean,如增删改查通用参数
9+
------------------------------po # 各个功能的po实体
10+
----------------------------validator # 自定义hibernate-validator
11+
-----------------resources/system
12+
---------------------------------install.sql #首次启动时执行的sql
13+
```
14+
15+
### 说明
16+
po对象都应该继承[GenericPo](src/main/java/org/hsweb/web/bean/po/GenericPo.java)
17+
GenericPo 的泛型为主键的类型,hsweb建议使用String类型,通过createUID()方法手动生成id

hsweb-web-bean/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-bean</artifactId>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2015-2016 http://hsweb.me
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.hsweb.web.bean.po.system;
18+
19+
public class SystemVersion implements Comparable<SystemVersion> {
20+
public String name;
21+
public String comment;
22+
public String website;
23+
public int majorVersion = 1;
24+
public int minorVersion = 0;
25+
public int revisionVersion = 0;
26+
public boolean snapshot;
27+
28+
public String getName() {
29+
return name;
30+
}
31+
32+
public void setName(String name) {
33+
this.name = name;
34+
}
35+
36+
public String getComment() {
37+
return comment;
38+
}
39+
40+
public void setComment(String comment) {
41+
this.comment = comment;
42+
}
43+
44+
public String getWebsite() {
45+
return website;
46+
}
47+
48+
public void setWebsite(String website) {
49+
this.website = website;
50+
}
51+
52+
public int getMajorVersion() {
53+
return majorVersion;
54+
}
55+
56+
public void setMajorVersion(int majorVersion) {
57+
this.majorVersion = majorVersion;
58+
}
59+
60+
public int getMinorVersion() {
61+
return minorVersion;
62+
}
63+
64+
public void setMinorVersion(int minorVersion) {
65+
this.minorVersion = minorVersion;
66+
}
67+
68+
public int getRevisionVersion() {
69+
return revisionVersion;
70+
}
71+
72+
public void setRevisionVersion(int revisionVersion) {
73+
this.revisionVersion = revisionVersion;
74+
}
75+
76+
public boolean isSnapshot() {
77+
return snapshot;
78+
}
79+
80+
public void setSnapshot(boolean snapshot) {
81+
this.snapshot = snapshot;
82+
}
83+
84+
@Override
85+
public int compareTo(SystemVersion o) {
86+
if (null == o) return -1;
87+
if (o.getMajorVersion() > this.getMajorVersion()) return -1;
88+
if (o.getMajorVersion() == this.getMajorVersion()) {
89+
if (o.getMinorVersion() > this.getMinorVersion()) return -1;
90+
if (o.getMinorVersion() == this.getMinorVersion()) {
91+
if (o.getRevisionVersion() > this.getRevisionVersion()) return -1;
92+
if (o.getRevisionVersion() == this.getRevisionVersion()) return 0;
93+
return 1;
94+
} else {
95+
return 1;
96+
}
97+
} else {
98+
return 1;
99+
}
100+
}
101+
102+
public static void main(String[] args) {
103+
SystemVersion systemVersion = new SystemVersion();
104+
systemVersion.setMajorVersion(2);
105+
systemVersion.setMinorVersion(2);
106+
systemVersion.setRevisionVersion(1);
107+
108+
SystemVersion systemVersion2 = new SystemVersion();
109+
systemVersion2.setMajorVersion(3);
110+
systemVersion2.setMinorVersion(2);
111+
systemVersion2.setRevisionVersion(1);
112+
113+
System.out.println(systemVersion.compareTo(systemVersion2));
114+
}
115+
}

hsweb-web-bean/src/main/java/org/hsweb/web/bean/po/template/Template.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
import java.util.List;
66

7-
/**
8-
* Created by zhouhao on 16-5-19.
9-
*/
107
public class Template extends GenericPo<String> {
118

129
private String name;

hsweb-web-concurrent/hsweb-web-concurrent-cache/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-web-concurrent</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-concurrent-cache</artifactId>

hsweb-web-concurrent/hsweb-web-concurrent-lock/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-web-concurrent</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-concurrent-lock</artifactId>

hsweb-web-concurrent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<packaging>pom</packaging>

hsweb-web-controller/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-controller</artifactId>

hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAccessLoggerResolverAutoConfiguration.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
import javax.annotation.PostConstruct;
2222
import java.util.List;
2323

24-
/**
25-
* Created by zhouhao on 16-4-28.
26-
*/
2724
@Configuration
28-
@ConditionalOnProperty(name = "logger.access", havingValue = "true")
29-
public class AopAccessLoggerResolverAutoConfiguration{
25+
@ConditionalOnProperty(name = "hsweb.access-logger", havingValue = "true")
26+
public class AopAccessLoggerResolverAutoConfiguration {
3027
@Bean
3128
public AopAccessLoggerResolverConfiguration aopAccessLoggerResolverConfiguration() {
3229
return new AopAccessLoggerResolverConfiguration();

hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAuthorizeValidatorAutoConfiguration.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
import org.springframework.context.annotation.Configuration;
1212
import org.springframework.core.annotation.Order;
1313

14-
/**
15-
* Created by zhouhao on 16-4-28.
16-
*/
1714
@Configuration
18-
@ConditionalOnProperty(name = "login.enable", havingValue = "true")
1915
public class AopAuthorizeValidatorAutoConfiguration {
2016

2117
@Bean
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"groups": [
3+
{
4+
"name": "hsweb.access-logger",
5+
"type": "java.lang.String",
6+
"sourceType": "java.lang.String"
7+
}
8+
],
9+
"properties": [
10+
{
11+
"name": "hsweb.access-logger",
12+
"type": "java.lang.String",
13+
"sourceType": "java.lang.String"
14+
}
15+
],
16+
"hints": [
17+
{
18+
"name": "hsweb.access-logger",
19+
"values": [
20+
{
21+
"value": "on",
22+
"description": "enable access logger."
23+
},
24+
{
25+
"value": "off",
26+
"description": "enable access logger."
27+
}
28+
]
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)