# spring-gin **Repository Path**: go-spring2/spring-gin ## Basic Information - **Project Name**: spring-gin - **Description**: spring-gin - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-03 - **Last Updated**: 2025-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spring-gin [仅发布] 该项目仅为最终发布,开发请关注 [go-spring](https://gitee.com/go-spring2/go-spring) 项目。 封装 github.com/gin-gonic/gin 实现的 Web 框架。 - [创建 Web 容器](#创建-web-容器) - [NewContainer](#newcontainer) - [适配 gin 框架](#适配-gin-框架) - [Handler](#handler) - [Filter](#filter) - [GinContext](#gincontext) - [WebContext](#webcontext) ### 创建 Web 容器 #### NewContainer 创建 gin 实现的 WebContainer。 func NewContainer(config SpringWeb.ContainerConfig) *Container {} ### 适配 gin 框架 #### Handler 适配 gin 形式的处理函数。 func Handler(fn gin.HandlerFunc) SpringWeb.Handler {} #### Filter 适配 gin 形式的中间件函数。 func Filter(fn gin.HandlerFunc) SpringWeb.Filter {} #### GinContext 将 SpringWeb.WebContext 转换为 *gin.Context。 func GinContext(webCtx SpringWeb.WebContext) *gin.Context {} #### WebContext 将 *gin.Context 转换为 SpringWeb.WebContext。 func WebContext(ginCtx *gin.Context) SpringWeb.WebContext {}