Skip to content

Commit 43d3b90

Browse files
committed
优化说明
1 parent 4de4861 commit 43d3b90

File tree

1 file changed

+105
-5
lines changed

1 file changed

+105
-5
lines changed

README.md

Lines changed: 105 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# hsweb4 基于spring-boot2,全响应式的后台管理框架
2+
23
[![Codecov](https://codecov.io/gh/hs-web/hsweb-framework/branch/4.0.x/graph/badge.svg)](https://codecov.io/gh/hs-web/hsweb-framework/branch/master)
34
[![Build Status](https://api.travis-ci.com/hs-web/hsweb-framework.svg?branch=4.0.x)](https://travis-ci.com/hs-web/hsweb-framework)
45
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)
56

67
# 功能,特性
8+
79
- [x] 基于[r2dbc](https://github.com/r2dbc) ,[easy-orm](https://github.com/hs-web/hsweb-easy-orm/tree/4.0.x) 的通用响应式CRUD
810
- [x] H2,Mysql,SqlServer,PostgreSQL
911
- [x] 响应式r2dbc事务控制
@@ -12,7 +14,7 @@
1214
- [x] 数据权限控制
1315
- [ ] 双因子验证
1416
- [x] 多维度权限管理功能
15-
- [x] 响应式缓存
17+
- [x] 响应式缓存
1618
- [ ] 非响应式支持(mvc,jdbc)
1719
- [ ] 内置业务功能
1820
- [x] 权限管理
@@ -24,10 +26,108 @@
2426
- [ ] 文件秒传
2527
- [x] 数据字典
2628

27-
# 文档
29+
# 示例
30+
31+
https://github.com/zhou-hao/hsweb4-examples
32+
33+
## 应用场景
34+
35+
1. 完全开源的后台管理系统.
36+
2. 模块化的后台管理系统.
37+
3. 功能可拓展的后台管理系统.
38+
4. 集成各种常用功能的后台管理系统.
39+
5. 前后分离的后台管理系统.
40+
41+
注意:
42+
项目主要基于`spring-boot`,`spring-webflux`. 在使用`hsweb`之前,你应该对 [project-reactor](https://projectreactor.io/) ,
43+
[spring-boot](https://github.com/spring-projects/spring-boot) 有一定的了解.
44+
45+
项目模块太多?不要被吓到.我们不推荐将本项目直接`clone`后修改,运行.而是使用maven依赖的方式使用`hsweb`. 选择自己需要的模块进行依赖,正式版发布后,所有模块都将发布到maven中央仓库.
46+
47+
## 文档
48+
49+
各个模块的使用方式查看对应模块下的 `README.md`,在使用之前, 你可以先粗略浏览一下各个模块,对每个模块的作用有大致的了解.
50+
51+
## 核心技术选型
52+
53+
1. Java 8
54+
2. Maven3
55+
3. Spring Boot 2.x
56+
4. Project Reactor 响应式编程框架
57+
5. hsweb easy orm 对r2dbc的orm封装
58+
59+
## 模块简介
60+
61+
| 模块 | 说明 |
62+
| ------------- |:----------:|
63+
|[hsweb-authorization](hsweb-authorization)| 权限控制 |
64+
|[hsweb-commons](hsweb-commons) | 基础通用功能 |
65+
|[hsweb-concurrent](hsweb-concurrent)| 并发包,缓存,等 |
66+
|[hsweb-core](hsweb-core)| 框架核心,基础工具类 |
67+
|[hsweb-datasource](hsweb-datasource)| 数据源 |
68+
|[hsweb-logging](hsweb-logging)| 日志 |
69+
|[hsweb-starter](hsweb-starter)| 模块启动器 |
70+
|[hsweb-system](hsweb-system)| **系统常用功能** |
71+
72+
## 核心特性
73+
74+
1. 响应式,首个基于spring-webflux,r2dbc,从头到位的响应式.
75+
2. DSL风格,可拓展的通用curd,支持前端直接传参数,无需担心任何sql注入.
76+
77+
```java
78+
//where name = #{name}
79+
createQuery()
80+
.where("name",name)
81+
.fetch();
82+
83+
//update s_user set name = #{user.name} where id = #{user.id}
84+
createUpdate()
85+
.set(user::getName)
86+
.where(user::getId)
87+
.execute();
88+
89+
```
90+
91+
3. 类JPA增删改
92+
93+
```java
94+
95+
@Table(name = "s_entity")
96+
public class MyEntity {
97+
98+
@Id
99+
private String id;
100+
101+
@Column
102+
private String name;
103+
104+
@Column
105+
private Long createTime;
106+
}
107+
108+
```
109+
110+
直接注入即可实现增删改查
111+
112+
```java
113+
114+
@Autowire
115+
private ReactiveRepository<MyEntity, String> repository;
116+
117+
```
118+
119+
2. 灵活的权限控制
120+
121+
```java
122+
123+
@PostMapping("/account")
124+
@SaveAction
125+
public Mono<String> addAccount(@RequestBody Mono<Account> account){
126+
return accountService.doSave(account);
127+
}
28128

29-
直接看代码: https://github.com/zhou-hao/hsweb4-examples
129+
```
30130

31-
# 实践
131+
## License
32132

33-
[JetLinks开源物联网平台](https://github.com/jetlinks)
133+
[Apache 2.0](https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)

0 commit comments

Comments
 (0)