Logo
License 在 DBPlusEngine-Driver 中的使用

License 在 DBPlusEngine-Driver 中的使用 #

背景信息 #

License 功能说明
限制时长限制 DBPlusEngine 的使用时长
限制资源限制 DBPlusEngine 集群创建存储节点的数量
限制实例限制单个集群中【DBPlusEngine-Proxy】+【DBPlusEngine-Driver】创建实例的数量
限制版本限制单机或集群中 DBPlusEngine 实例的版本

配置方式 #

JAVA API #

引入 Maven 依赖 #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

配置示例 #

类名称:com.sphereex.dbplusengine.license.config.LicenseRuleConfiguration

可配置属性:

名称数据类型说明
licenseStringlicense注册码

YAML #

引入 Maven 依赖 #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

配置示例 #

databaseName:

mode:

dataSources:

rules:

license: xxx

SpringBoot #

引入 Maven 依赖 #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

配置示例 #

spring.dbplusengine.rules.license: xxx

Spring 命名空间 #

引入 Maven 依赖 #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

配置示例 #

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:license="https://www.sphere-ex.com/schema/dbplusengine/license"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           https://www.sphere-ex.com/schema/dbplusengine/license
                           https://www.sphere-ex.com/schema/dbplusengine/license/license.xsd
                           ">
    <license:license id="license" license="xxx"/>
</beans>

后续处理 #

如果出现如下错误请获取最新版 license 并更新 license 至最新状态。

  • 无 license 提示
FATAL:  License not registered
  • license 不完整提示
FATAL:  Incomplete license
  • license 过期提示
FATAL:  License is expired
  • 非法 license 提示
ERROR:  The xxx exceeds the limit of the license