# light-hybrid **Repository Path**: lightgrp/light-hybrid ## Basic Information - **Project Name**: light-hybrid - **Description**: light-hybrid-4j - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-06-21 - **Last Updated**: 2025-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # light-hybrid #### 介绍 light-hybrid-4j #### 软件架构 gserver为服务入口,gservice为子服务示例。 #### 快速上手 1. mvn clean eclipse:clean eclipse:eclipse,导入项目到eclipse 2. mvn package; sh start.sh dist,生成的dist.tgz可用于部署 3. sh start.sh start,启动gserver 4. mvn dependency:copy-dependencies -DoutputDirectory=target -f service/datetime/pom.xml,将hutool-core复制到dist目录一起打包 #### 特性支持 1. 支持单体部署,也支持分布式部署(使用consul) 2. 支持自动加载或更新子服务(更新service/目录下对应的jar即可) 3. 支持多种请求方式:参数、表单提交、文件上传、json正文(使用HybridUtils获取参数和处理响应) ``` curl http://localhost:8083/hybrid/gservice/datetime curl http://localhost:8083/hybrid?service=gservice\&action=datetime curl http://localhost:8083/hybrid -d "service=gservice&action=datetime" curl http://localhost:8083/hybrid -H "Content-Type:application/json" -d '{"service":"gservice","action":"datetime"}' curl http://localhost:8083/hybrid -H "X-Handler-Path: gservice/datetime" curl http://localhost:8083/hybrid/gservice?action=echo -F "file=@README.md" ```