ldcsaa / hp-soa

A fully functional, easy-to-use, and highly scalable microservice framework
https://github.com/ldcsaa/hp-soa
Apache License 2.0
81 stars 8 forks source link
configuration-center distributed-systems dubbo easy-to-use high-scalability java logging metrics microservice microservice-framework microservices microservices-framework nacos prometheus-metrics solutions-architect spring-boot spring-cloud springboot springcloud tracing

HP-SOA


HP-SOA

功能完备,简单易用,高度可扩展的Java微服务框架。

快速开始

技术架构

技术架构

技术集成

模块说明

应用接入(参考:hp-demo

  1. pom.xml 中添加 HP-SOA 依赖
<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>
  1. 修改应用配置(参考 Demo hp-demo-bff-basic本地配置文件 ,配置中心的远程配置文件),主要配置项:

    • hp.soa.web
    • spring.cloud (Spring Cloud 项目)
    • dubbo (Dubbo项目)
    • server
    • spring
    • management
    • springdoc
  2. 修改全局配置(可选)

    • 系统配置文件,用于设置系统属性,默认配置文件:/opt/hp-soa/config/system-config.properties参考:system-config.properties
    • 扩展配置文件,用于配置注册中心地址、配置中心地址等公共属性,默认配置文件:/opt/hp-soa/config/extended-config.properties参考:extended-config.properties
  3. 实现 HTTP 鉴权接口(可选)

    • 如果是Gateway/BFF应用,并且应用属性hp.soa.web.access-verification.enabled = true,则需要实现AccessVerificationService接口,用于HTTP请求鉴权。
  4. 启动应用


[用户指南]

技术交流