com.github.maojx0630:snow-flake-zk-spring-boot-starter

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.maojx0630
ArtifactId

ArtifactId

snow-flake-zk-spring-boot-starter
Last Version

Last Version

0.4
Release Date

Release Date

Type

Type

jar
Description

Description

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

https://github.com/maojx0630/snow-flake-zk-spring-boot-starter

Download snow-flake-zk-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.maojx0630/snow-flake-zk-spring-boot-starter/ -->
<dependency>
    <groupId>com.github.maojx0630</groupId>
    <artifactId>snow-flake-zk-spring-boot-starter</artifactId>
    <version>0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.maojx0630/snow-flake-zk-spring-boot-starter/
implementation 'com.github.maojx0630:snow-flake-zk-spring-boot-starter:0.4'
// https://jarcasting.com/artifacts/com.github.maojx0630/snow-flake-zk-spring-boot-starter/
implementation ("com.github.maojx0630:snow-flake-zk-spring-boot-starter:0.4")
'com.github.maojx0630:snow-flake-zk-spring-boot-starter:jar:0.4'
<dependency org="com.github.maojx0630" name="snow-flake-zk-spring-boot-starter" rev="0.4">
  <artifact name="snow-flake-zk-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.maojx0630', module='snow-flake-zk-spring-boot-starter', version='0.4')
)
libraryDependencies += "com.github.maojx0630" % "snow-flake-zk-spring-boot-starter" % "0.4"
[com.github.maojx0630/snow-flake-zk-spring-boot-starter "0.4"]

Dependencies

compile (4)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter jar
org.springframework.boot : spring-boot-autoconfigure jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
org.apache.curator : curator-framework jar 2.13.0

Project Modules

There are no modules declared in this project.

snow-flake-zk-spring-boot-starter

使用方法

<dependency>
   <groupId>com.github.maojx0630</groupId>
   <artifactId>snow-flake-zk-spring-boot-starter</artifactId>
   <version>0.4</version>
</dependency>

配置zk地址

zk:
  connect: 127.0.0.1:2181

调用IdUtils的next或nextStr即可 ##注意

  • zk请使用3.4.x,在较高spring cloud版本下 需要使用3.5.x zookeeper,请查看curator-framework依赖版本选择zk版本
  • 若启动时zk不可用,且开启探测则会使用默认workerId
  • 所有配置信息

Versions

Version
0.4
0.2
0.1