https://github.com/zhou-hao/hsweb4-examples
Note: The project is mainly based on spring-boot
and spring-webflux
. Before using hsweb
, you should have a certain understanding of project-reactor and spring-boot.
Too many project modules? Don’t be scared. We do not recommend directly clone
this project, modifying it, and running it. Instead, use hsweb
as a maven dependency. Select the modules you need to depend on. After the official version is released, all modules will be Publish to maven central repository.
For how to use each module, please check README.md
under the corresponding module. Before using it, you can take a rough look at each module to have a general understanding of the role of each module.
module | illustrate |
---|---|
hsweb-authorization | Permission control |
hsweb-commons | Basic common functions |
hsweb-concurrent | Concurrent packages, caching, etc. |
hsweb-core | Framework core, basic tool class |
hsweb-datasource | data source |
hsweb-logging | log |
hsweb-starter | module launcher |
hsweb-system | Commonly used functions of the system |
//where name = #{name}
createQuery ()
. where ( "name" , name )
. fetch ();
//update s_user set name = #{user.name} where id = #{user.id}
createUpdate ()
. set ( user :: getName )
. where ( user :: getId )
. execute ();
@ Table ( name = "s_entity" )
public class MyEntity {
@ Id
private String id ;
@ Column
private String name ;
@ Column
private Long createTime ;
}
Add, delete, modify and check by directly injecting
@ Autowire
private ReactiveRepository < MyEntity , String > repository ;
@ PostMapping ( "/account" )
@ SaveAction
public Mono < String > addAccount ( @ RequestBody Mono < Account > account ){
return accountService . doSave ( account );
}
Apache 2.0