• 实体注册客户端


    一、简介

    1.1 概述

    实体注册客户端提供了自动扫描获取当前服务下所有的实体并自动注册到平台服务的能力。

    1.2 组件坐标

    <dependency>
        <groupId>org.hzero.boot</groupId>
        <artifactId>hzero-boot-platform</artifactId>
        <version>${hzero.boot.version}</version>
    </dependency>
    

    1.3 组件配置

    在依赖hzero-boot-platform插件之后在配置文件中新建如下配置开启实体注册功能,默认是关闭的。

      platform:
        regist-entity:
          enable: true
    

    二、使用说明

    依赖hzero-boot-platform插件,通过EntityRedisService的静态方法getEntityTableFromRedis可通过服务名+表名获取对应的实体信息对象。

    org.hzero.boot.platform.entity.redis.EntityRedisService#getEntityTableFromRedis()
    

    参数具体意思如下:

    参数名称 参数描述
    serverName 服务名称
    tableName 表名
    redisHelper redisHelper对象