febs-identify-spring-cloud-starter

SpringCloudStarter of febs-identify.

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки
Группа

Группа

cn.brainpoint
Идентификатор

Идентификатор

febs-identify-spring-cloud-starter
Последняя версия

Последняя версия

0.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

febs-identify-spring-cloud-starter
SpringCloudStarter of febs-identify.
Ссылка на сайт

Ссылка на сайт

https://github.com/brainpoint/febs-identify-spring-cloud-starter.git
Система контроля версий

Система контроля версий

https://github.com/brainpoint/febs-identify-spring-cloud-starter.git

Скачать febs-identify-spring-cloud-starter

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/cn.brainpoint/febs-identify-spring-cloud-starter/ -->
<dependency>
    <groupId>cn.brainpoint</groupId>
    <artifactId>febs-identify-spring-cloud-starter</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/cn.brainpoint/febs-identify-spring-cloud-starter/
implementation 'cn.brainpoint:febs-identify-spring-cloud-starter:0.0.5'
// https://jarcasting.com/artifacts/cn.brainpoint/febs-identify-spring-cloud-starter/
implementation ("cn.brainpoint:febs-identify-spring-cloud-starter:0.0.5")
'cn.brainpoint:febs-identify-spring-cloud-starter:jar:0.0.5'
<dependency org="cn.brainpoint" name="febs-identify-spring-cloud-starter" rev="0.0.5">
  <artifact name="febs-identify-spring-cloud-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='cn.brainpoint', module='febs-identify-spring-cloud-starter', version='0.0.5')
)
libraryDependencies += "cn.brainpoint" % "febs-identify-spring-cloud-starter" % "0.0.5"
[cn.brainpoint/febs-identify-spring-cloud-starter "0.0.5"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-configuration-processor jar 2.2.7.RELEASE
org.springframework.cloud : spring-cloud-starter jar 2.2.3.RELEASE
org.springframework.cloud : spring-cloud-bus jar 2.2.0.RELEASE
cn.brainpoint : febs-identify jar 0.0.5

provided (2)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.12
org.slf4j : slf4j-api jar 1.7.30

Модули Проекта

Данный проект не имеет модулей.

febs-identify-spring-cloud-starter

Maven Central License

Distributed Unique Identify.

  • like objectId, a process can generator id 2^24-1 per second.
  • Container 20 chars in id
  • Use database to assign unique machineId.

How to use

maven config.

<dependency>
    <groupId>cn.brainpoint</groupId>
    <artifactId>febs-identify-spring-cloud-starter</artifactId>
    <version>0.0.5</version>
</dependency>

config

bootstrap.properties

febs.identify.db.type = mysql
febs.identify.db.url = localhost:3306/xx
febs.identify.db.username = username
febs.identify.db.password = password
febs.identify.db.tablename = machine_id # db table use to store meachine id.
febs.identify.db.retryCount = 1
febs.identify.db.connectTimeout = 5000  # connectTimeout connect timeout in milliseconds.

febs.identify.createMachineIdSelf = false # create a machine id in this instance.

usage:

If configured have createMachineIdSelf=true, then can do the following:

import cn.brainpoint.febs.identify.Identify;

// create next id.
Identify.nextId();

// validate id.
assert Identify.isValid(id);

Following to make a new machine id:

import cn.brainpoint.febs.identify.Identify;

// Generate a new machine id.
Identify.generateNewMachineId()

Версии библиотеки

Версия
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1