Top Related Projects
An powerful enhanced toolkit of MyBatis for simplify development
🔥「企业级低代码平台」前后端分离架构SpringBoot 2.x/3.x,SpringCloud,Ant Design&Vue3,Mybatis,Shiro,JWT。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领新的开发模式OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
:seedling::rocket:一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
🔥 官方推荐 🔥 RuoYi-Vue 全新 Pro 版本,优化重构所有功能。基于 Spring Boot + MyBatis Plus + Vue & Element 实现的后台管理系统 + 微信小程序,支持 RBAC 动态权限、数据权限、SaaS 多租户、Flowable 工作流、三方登录、支付、短信、商城、CRM、ERP、AI 大模型等功能。你的 ⭐️ Star ⭐️,是作者生发的动力!
🚀一个用来深入学习并实战 Spring Boot 的项目。
Quick Overview
hsweb-framework is an open-source Java framework for building enterprise-grade web applications. It provides a comprehensive set of tools and modules for rapid development, including a powerful permission system, dynamic form engine, and workflow management capabilities.
Pros
- Modular architecture allowing for flexible customization and extension
- Robust permission and authentication system out of the box
- Built-in support for dynamic forms and workflow management
- Active development and community support
Cons
- Steeper learning curve compared to some simpler frameworks
- Documentation primarily in Chinese, which may be challenging for non-Chinese speakers
- Some modules may be overly complex for simpler applications
- Limited third-party integrations compared to more popular frameworks
Code Examples
- Creating a RESTful API endpoint:
@RestController
@RequestMapping("/api/user")
public class UserController {
@GetMapping("/{id}")
public ResponseEntity<User> getUser(@PathVariable String id) {
// Logic to fetch user by id
return ResponseEntity.ok(user);
}
}
- Implementing dynamic form handling:
@Autowired
private DynamicFormService dynamicFormService;
@PostMapping("/save-form")
public ResponseEntity<String> saveForm(@RequestBody DynamicFormEntity form) {
dynamicFormService.saveOrUpdate(form);
return ResponseEntity.ok("Form saved successfully");
}
- Using the permission system:
@RequiresPermissions("user:view")
@GetMapping("/users")
public List<User> listUsers() {
// Logic to list users
return userList;
}
Getting Started
To start using hsweb-framework, add the following dependency to your Maven pom.xml
:
<dependency>
<groupId>org.hswebframework.web</groupId>
<artifactId>hsweb-starter</artifactId>
<version>4.0.15-SNAPSHOT</version>
</dependency>
Then, create a Spring Boot application class:
@SpringBootApplication
@EnableHswebFramework
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}
Configure your application properties and start building your modules using hsweb-framework's components and services.
Competitor Comparisons
An powerful enhanced toolkit of MyBatis for simplify development
Pros of mybatis-plus
- Simpler and more lightweight, focusing specifically on MyBatis enhancement
- Extensive code generation capabilities for rapid development
- Strong community support and frequent updates
Cons of mybatis-plus
- Less comprehensive than hsweb-framework, which offers a full-stack solution
- May require additional libraries for features like security and authorization
- Limited built-in support for complex business logic implementations
Code Comparison
mybatis-plus:
@TableName("user")
public class User {
@TableId(type = IdType.AUTO)
private Long id;
private String name;
private Integer age;
}
hsweb-framework:
@Table(name = "s_user")
public class User extends GenericEntity<String> {
@Column(length = 128)
private String name;
@Column
private Integer age;
}
Both frameworks simplify entity definitions, but mybatis-plus uses annotations specific to its ecosystem, while hsweb-framework leverages more standard JPA annotations. mybatis-plus focuses on database-related features, whereas hsweb-framework provides a broader set of annotations and utilities for building enterprise applications.
🔥「企业级低代码平台」前后端分离架构SpringBoot 2.x/3.x,SpringCloud,Ant Design&Vue3,Mybatis,Shiro,JWT。强大的代码生成 器让前后端代码一键生成,无需写任何代码! 引领新的开发模式OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
Pros of JeecgBoot
- More comprehensive out-of-the-box features, including a code generator and low-code development platform
- Stronger focus on rapid application development and prototyping
- Larger community and more frequent updates
Cons of JeecgBoot
- Steeper learning curve due to its extensive feature set
- Potentially more complex codebase, which may impact customization and maintenance
- Heavier framework with more dependencies
Code Comparison
JeecgBoot example (controller):
@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {
@GetMapping(value = "/hello")
public Result<String> hello() {
Result<String> result = new Result<String>();
result.setResult("Hello World!");
return result;
}
}
hsweb-framework example (controller):
@RestController
@RequestMapping("/test")
public class TestController {
@GetMapping("/hello")
public ResponseEntity<String> hello() {
return ResponseEntity.ok("Hello World!");
}
}
Both frameworks provide similar basic functionality, but JeecgBoot includes additional features like built-in Result wrapper and logging annotations. hsweb-framework's approach is more lightweight and closer to standard Spring Boot conventions.
eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式 , 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
Pros of eladmin
- More focused on admin panel functionality, providing a comprehensive solution for backend management systems
- Offers a modern and user-friendly UI with Vue.js frontend
- Includes built-in user management, role-based access control, and data dictionary features
Cons of eladmin
- Less flexible and customizable compared to hsweb-framework's modular architecture
- Smaller community and fewer contributors, potentially leading to slower development and issue resolution
- More opinionated in its approach, which may not suit all project requirements
Code Comparison
eladmin (Java):
@Data
@Entity
@Table(name="sys_user")
public class User extends BaseEntity implements Serializable {
@Column(unique = true)
private String username;
private String password;
private String email;
private String phone;
}
hsweb-framework (Java):
@Table(name = "s_user")
public interface UserEntity extends Entity {
@Property(column = "username")
String getUsername();
void setUsername(String username);
@Property(column = "password")
String getPassword();
void setPassword(String password);
}
Both frameworks use annotations for entity mapping, but hsweb-framework employs interfaces for entities, potentially offering more flexibility in implementation.
:seedling::rocket:一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API 项目~
Pros of spring-boot-api-project-seed
- Lightweight and focused on providing a basic structure for RESTful API projects
- Includes Swagger for API documentation out of the box
- Simpler learning curve for developers new to Spring Boot
Cons of spring-boot-api-project-seed
- Less comprehensive feature set compared to hsweb-framework
- Limited built-in security features
- Fewer advanced components for complex enterprise applications
Code Comparison
hsweb-framework:
@RestController
@RequestMapping("/user")
public class UserController implements SimpleGenericEntityController<User, String> {
@Autowired
private UserService userService;
@Override
public CrudService<User, String> getService() {
return userService;
}
}
spring-boot-api-project-seed:
@RestController
@RequestMapping("/users")
public class UserController {
@Autowired
private UserService userService;
@PostMapping
public Result add(@RequestBody User user) {
userService.save(user);
return ResultGenerator.genSuccessResult();
}
}
The code comparison shows that hsweb-framework uses a more generic approach with interfaces, while spring-boot-api-project-seed opts for a simpler, more straightforward implementation. hsweb-framework's approach allows for more reusable and extensible code, but may have a steeper learning curve. spring-boot-api-project-seed's approach is more intuitive for beginners but may require more boilerplate code for complex scenarios.
🔥 官方推荐 🔥 RuoYi-Vue 全新 Pro 版本,优化重构所有功能。基于 Spring Boot + MyBatis Plus + Vue & Element 实现的后台管理 系统 + 微信小程序,支持 RBAC 动态权限、数据权限、SaaS 多租户、Flowable 工作流、三方登录、支付、短信、商城、CRM、ERP、AI 大模型等功能。你的 ⭐️ Star ⭐️,是作者生发的动力!
Pros of ruoyi-vue-pro
- More comprehensive documentation and guides for developers
- Includes a Vue.js-based frontend, offering a complete full-stack solution
- Active community with frequent updates and contributions
Cons of ruoyi-vue-pro
- Steeper learning curve due to its extensive feature set
- Potentially heavier resource consumption for smaller projects
- Less flexibility for customization compared to hsweb-framework
Code Comparison
ruoyi-vue-pro:
@PreAuthorize("@ss.hasPermission('system:user:list')")
@GetMapping("/list")
public TableDataInfo list(SysUser user) {
startPage();
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
hsweb-framework:
@GetMapping
@Authorize(action = Permission.ACTION_QUERY)
public Mono<PagerResult<UserEntity>> list(QueryParamEntity query) {
return userService.queryPager(query);
}
The code snippets demonstrate different approaches to user list retrieval and authorization. ruoyi-vue-pro uses Spring Security's @PreAuthorize
annotation, while hsweb-framework employs its custom @Authorize
annotation. ruoyi-vue-pro's implementation includes pagination, whereas hsweb-framework uses reactive programming with Mono.
Both frameworks offer robust solutions for enterprise applications, with ruoyi-vue-pro providing a more opinionated, full-stack approach and hsweb-framework offering greater flexibility for customization.
🚀一个用来深入学习并实战 Spring Boot 的项目。
Pros of spring-boot-demo
- More comprehensive and diverse set of examples covering various Spring Boot features
- Better organized structure with separate modules for different functionalities
- More active development and frequent updates
Cons of spring-boot-demo
- Lacks a cohesive framework approach, focusing more on individual examples
- May be overwhelming for beginners due to the large number of modules
- Less focus on enterprise-level features compared to hsweb-framework
Code Comparison
spring-boot-demo:
@SpringBootApplication
@EnableCaching
public class SpringBootDemoCacheRedisApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootDemoCacheRedisApplication.class, args);
}
}
hsweb-framework:
@Configuration
@ComponentScan(basePackages = "org.hswebframework.web")
@MapperScan(basePackages = "org.hswebframework.web.dao")
@EnableAspectJAutoProxy
@EnableTransactionManagement
public class DefaultSystemConfiguration {
// Configuration details
}
The code comparison shows that spring-boot-demo focuses on simplicity and ease of use, while hsweb-framework provides a more comprehensive configuration setup for enterprise applications. spring-boot-demo's approach is more suitable for learning and quick prototyping, whereas hsweb-framework is geared towards building robust, scalable systems.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
hsweb4 åºäºspring-boot2,å ¨ååºå¼çåå°ç®¡çæ¡æ¶
åè½,ç¹æ§
- åºäºr2dbc ,easy-orm çéç¨ååºå¼CRUD
- H2,Mysql,SqlServer,PostgreSQL
- ååºå¼r2dbcäºå¡æ§å¶
- ååºå¼æéæ§å¶,以åæéä¿¡æ¯è·å
- RBACæéæ§å¶
- æ°æ®æéæ§å¶
- åå åéªè¯
- å¤ç»´åº¦æé管çåè½
- ååºå¼ç¼å
- éååºå¼æ¯æ(mvc,jdbc)
- å
ç½®ä¸å¡åè½
- æé管ç
- ç¨æ·ç®¡ç
- æé设置
- æéåé
- æ件ä¸ä¼
- éææ件ä¸ä¼
- æ件ç§ä¼
- æ°æ®åå ¸
- æé管ç
示ä¾
https://github.com/zhou-hao/hsweb4-examples
åºç¨åºæ¯
- å®å ¨å¼æºçåå°ç®¡çç³»ç».
- 模ååçåå°ç®¡çç³»ç».
- åè½å¯æå±çåå°ç®¡çç³»ç».
- éæåç§å¸¸ç¨åè½çåå°ç®¡çç³»ç».
- ååå离çåå°ç®¡çç³»ç».
注æ:
项ç®ä¸»è¦åºäºspring-boot
,spring-webflux
. å¨ä½¿ç¨hsweb
ä¹å,ä½ åºè¯¥å¯¹ project-reactor ,
spring-boot æä¸å®çäºè§£.
项ç®æ¨¡å太å¤?ä¸è¦è¢«åå°.æ们ä¸æ¨èå°æ¬é¡¹ç®ç´æ¥clone
åä¿®æ¹,è¿è¡.èæ¯ä½¿ç¨mavenä¾èµçæ¹å¼ä½¿ç¨hsweb
. éæ©èªå·±éè¦ç模åè¿è¡ä¾èµ,æ£å¼çåå¸å,ææ模åé½å°åå¸å°mavenä¸å¤®ä»åº.
ææ¡£
å个模åç使ç¨æ¹å¼æ¥ç对åºæ¨¡åä¸ç README.md
,å¨ä½¿ç¨ä¹å, ä½ å¯ä»¥å
ç²ç¥æµè§ä¸ä¸å个模å,对æ¯ä¸ªæ¨¡åçä½ç¨æ大è´çäºè§£.
æ ¸å¿ææ¯éå
- Java 8
- Maven3
- Spring Boot 2.x
- Project Reactor ååºå¼ç¼ç¨æ¡æ¶
- hsweb easy orm 对r2dbcçormå°è£
模åç®ä»
模å | 说æ |
---|---|
hsweb-authorization | æéæ§å¶ |
hsweb-commons | åºç¡éç¨åè½ |
hsweb-concurrent | 并åå ,ç¼å,ç |
hsweb-core | æ¡æ¶æ ¸å¿,åºç¡å·¥å ·ç±» |
hsweb-datasource | æ°æ®æº |
hsweb-logging | æ¥å¿ |
hsweb-starter | 模åå¯å¨å¨ |
hsweb-system | ç³»ç»å¸¸ç¨åè½ |
æ ¸å¿ç¹æ§
- ååºå¼,é¦ä¸ªåºäºspring-webflux,r2dbc,ä»å¤´å°ä½çååºå¼.
- DSLé£æ ¼,å¯æå±çéç¨curd,æ¯æå端ç´æ¥ä¼ åæ°,æ éæ å¿ä»»ä½sqlæ³¨å ¥.
//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();
- ç±»JPAå¢å æ¹
@Table(name = "s_entity")
public class MyEntity {
@Id
private String id;
@Column
private String name;
@Column
private Long createTime;
}
ç´æ¥æ³¨å ¥å³å¯å®ç°å¢å æ¹æ¥
@Autowire
private ReactiveRepository<MyEntity, String> repository;
- çµæ´»çæéæ§å¶
@PostMapping("/account")
@SaveAction
public Mono<String> addAccount(@RequestBody Mono<Account> account){
return accountService.doSave(account);
}
License
Top Related Projects
An powerful enhanced toolkit of MyBatis for simplify development
🔥「企业级低代码平台」前后端分离架构SpringBoot 2.x/3.x,SpringCloud,Ant Design&Vue3,Mybatis,Shiro,JWT。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领新的开发模式OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
:seedling::rocket:一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
🔥 官方推荐 🔥 RuoYi-Vue 全新 Pro 版本,优化重构所有功能。基于 Spring Boot + MyBatis Plus + Vue & Element 实现的后台管理系统 + 微信小程序,支持 RBAC 动态权限、数据权限、SaaS 多租户、Flowable 工作流、三方登录、支付、短信、商城、CRM、ERP、AI 大模型等功能。你的 ⭐️ Star ⭐️,是作者生发的动力!
🚀一个用来深入学习并实战 Spring Boot 的项目。
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot