forgeboot/forgeboot-webmvc
gewuyou 307908b923 refactor(spec): 重构规范模块以提高可维护性和扩展性- 重新组织代码结构,将通用逻辑移至 spec-core 模块
- 新增 QueryComponentExtensions、SortableExtensions 等扩展函数
- 重构 JpaCrudServiceSpec 接口,使其继承自通用的 CrudServiceSpec
-优化 JpaCrudServiceImplSpec 抽象类,增加软删除相关方法
- 新增 SimpleJpaCrudServiceImplSpec 类,提供不支持软删除的简单实现
2025-07-25 14:29:31 +08:00
..
2025-07-24 08:11:34 +00:00

forgeboot-webmvc-spring-boot-starter

Web MVC 通用组件集合

简介

forgeboot-webmvc-spring-boot-starter 提供常用 Web 层组件如版本管理、统一日志、全局异常处理、DTO 封装、参数校验、接口规范等。

核心模块

  • forgeboot-webmvc-version-spring-boot-starterAPI 版本控制
  • forgeboot-webmvc-logger-spring-boot-starter:请求/响应日志 AOP
  • forgeboot-webmvc-exception-spring-boot-starter:全局异常处理
  • forgeboot-webmvc-exception-i18n-spring-boot-starter:异常国际化
  • forgeboot-webmvc-dto:统一返回结构与分页工具
  • forgeboot-webmvc-validation:请求校验封装
  • forgeboot-webmvc-spec:自动生成接口规范文档

引入依赖

Maven

<dependency>
  <groupId>io.github.gewuyou</groupId>
  <artifactId>forgeboot-webmvc-spring-boot-starter</artifactId>
  <version>${version}</version>
</dependency>

使用 Gradle

implementation "io.github.gewuyou:forgeboot-webmvc-spring-boot-starter:${version}"

快速开始

  • application.yml 中配置各模块开关和策略。
  • 使用 BaseResult<T>PageResult<T> 封装返回值。
  • Controller 中使用 @ApiVersion, @Validated 等注解。

构建

./gradlew :forgeboot-webmvc:build

许可

Apache-2.0