gitmyhub

hsweb-framework

Java ★ 8.4k updated 3d ago

hsweb (haʊs wɛb) 是一个基于spring-boot 2.x开发 ,首个使用全响应式编程的企业级后台管理系统基础项目。

A Java backend framework built on Spring Boot for enterprise management systems, with fully reactive non-blocking database access, role-based permission control, and modular Maven dependencies.

JavaSpring BootSpring WebFluxr2dbcMavenMySQLPostgreSQLsetup: hardcomplexity 4/5

hsweb is a Java-based backend management framework built on Spring Boot 2.x. It is described as one of the first enterprise backend management systems to use fully reactive programming throughout, meaning the server handles many requests at once without blocking threads while waiting for databases or other services to respond. The README and documentation are primarily in Chinese.

The framework is built on Spring WebFlux and a reactive database access library called r2dbc. This combination allows the application to work with databases like MySQL, PostgreSQL, SQL Server, and H2 in a non-blocking way. It also includes a custom ORM layer called hsweb-easy-orm, which provides a query-builder style API for reading and writing data, with built-in protection against SQL injection.

The permission system is a significant part of the framework. It supports role-based access control (RBAC), data-level permission control (restricting what rows or fields a user can see), and multi-dimensional permission management. Permissions can be applied to API endpoints using annotations on controller methods.

The project is divided into several modules: a core module, authorization, commons, concurrency and caching helpers, a datasource module, logging, and a system module containing common built-in features like user management and data dictionaries. Developers are expected to add individual modules as Maven dependencies rather than cloning and modifying the whole project.

The recommended way to start using hsweb is to look at the example project linked in the README and add only the modules you need. A working knowledge of Project Reactor and Spring Boot is expected before getting started. The project is licensed under Apache 2.0.

Where it fits