HP-SOA - 功能完备,简单易用,高度可扩展的Java微服务框架。
! d3 g9 _7 f) T5 N* Z! {现已支持spring cloud和dubbo微服务架构,劳烦大家加星支持~2 `9 E% @8 V3 R. B3 F
另外还有大量DEMO以供开发者参考
3 i+ w' p; o9 p2 g@全体成员 - O% M- x; s9 w$ k6 L7 Z' Q
HP-SOA - 功能完备,简单易用,高度可扩展的Java微服务框架。现已支持spring cloud和dubbo微服务架构,劳烦大家加星支持~
! d8 r0 M. `# S2 p" fhttps://github.com/ldcsaa/hp-soa
) c$ x+ Y) m4 n. p8 [
$ d. a5 X! i% b: k
https://gitee.com/ldcsaa/hp-soa! `! R. G) |; n0 W+ w K' q
" \8 P* M6 g1 z4 y技术架构
( l# h5 G; f O( w! Y
% C0 d0 \3 G m% ?! c3 D8 [+ B
8 u& ~7 l8 G; t5 h0 z' l( {技术集成Web 服务框架:spring-boot 3.x微服务框架:spring-cloud 4.x微服务框架:Dubbo 3.x服务注册中心:Nacos配置中心:Nacos服务治理中心:Dubbo Admin流量控制中心:Sentinel Dashboard + Nacos数据库:MySQL、Druid、mybatis-plus(支持多数据源)缓存:Redis + Redisson(支持多实例)NoSQL 数据库:MongoDB搜索引擎:Elasticsearch消息总线:RabbitMQ(支持多实例,支持可靠消息)消息队列:Kafka(支持可靠消息)MQTT 发布订阅:Eclipse PAHO mqttv5分布式 Job:xxl-job轻量级 Job:Redisson + Spring Scheduled分布式事务:Seata全局 ID:Leaf(支持 Snowflake ID 和 Segment ID)统一日志:Log4j + Kafka + ELK调用链跟踪:Skywalking监控告警:Prometheus + Grafana + Alert Manager
& ^! V# b/ l, |1 e模块说明应用接入(参考:hp-demo)
1 x9 B, }& k% @* z- A7 J: O[XML] 纯文本查看 复制代码 <dependencyManagement>
<dependencies>
<!-- 添加 hp-soa 依赖管理 -->
<dependency>
<groupId>io.github.hpsocket</groupId>
<artifactId>hp-soa-dependencies</artifactId>
<version>${hp-soa.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- 普通项目引用 hp-soa-starter-web -->
<dependency>
<groupId>io.github.hpsocket</groupId>
<artifactId>hp-soa-starter-web</artifactId>
</dependency>
<!-- Spring Cloud 项目引用 hp-soa-starter-web-cloud -->
<!--
<dependency>
<groupId>io.github.hpsocket</groupId>
<artifactId>hp-soa-starter-web-cloud</artifactId>
</dependency>
-->
<!-- Dubbo项目引用 hp-soa-starter-web-dubbo -->
<!--
<dependency>
<groupId>io.github.hpsocket</groupId>
<artifactId>hp-soa-starter-web-dubbo</artifactId>
</dependency>
-->
<!-- 根据项目需要,引用其它 hp-soa starter -->
<dependency>
<groupId>io.github.hpsocket</groupId>
<artifactId>hp-soa-starter-xxx</artifactId>
</dependency>
</dependencies>
5 H! R4 s) v! {; ^. a( ?
- 修改应用配置(参考 Demo hp-demo-bff-basic 的本地配置文件 ,配置中心的远程配置文件),主要配置项:2 [# J. B) H9 p- s, I9 F1 N0 B
- hp.soa.web
- spring.cloud (Spring Cloud 项目)
- dubbo (Dubbo 项目)
- server
- spring
- management
- springdoc
7 y/ g( _3 F. B9 J9 u& \$ }
- 修改全局配置(可选)5 P% v$ K7 `, B" X2 V) [1 `3 f
- 实现 HTTP 鉴权接口(可选)* ?0 e3 s" m! l) N/ U
- 如果是 Gateway/BFF 应用,并且应用属性 hp.soa.web.access-verification.enabled = true,则需要实现 AccessVerificationService 接口,用于 HTTP 请求鉴权。
+ y/ ]8 M: L M0 M# t: w
- 启动应用; t8 _- B! ?2 f6 b' x% V6 S
|