Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hiwepy/curator-spring-boot-starter
基于 [Apache Curator ](http://curator.apache.org/) 整合的 Starter
https://github.com/hiwepy/curator-spring-boot-starter
Last synced: 23 days ago
JSON representation
基于 [Apache Curator ](http://curator.apache.org/) 整合的 Starter
- Host: GitHub
- URL: https://github.com/hiwepy/curator-spring-boot-starter
- Owner: hiwepy
- License: apache-2.0
- Created: 2020-11-25T05:05:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-12T16:56:22.000Z (over 2 years ago)
- Last Synced: 2023-05-25T23:12:04.703Z (over 1 year ago)
- Language: Java
- Size: 43 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# curator-spring-boot-starter
#### 组件简介
> 基于 [Apache Curator ](http://curator.apache.org/) 整合的 Starter
#### 使用说明
##### 1、Spring Boot 项目添加 Maven 依赖
``` xml
com.github.hiwepy
curator-spring-boot-starter
${project.version}```
##### 2、在`application.yml`文件中增加如下配置
```yaml
#################################################################################################
### Apache Curator 配置:
#################################################################################################
curator:
connect-string: 192.168.1.1:2100,192.168.1.1:2101,192.168.1.:2102
connection-timeout-ms: 3000
session-timeout-ms: 30000
max-close-wait-ms: 2000
with-ensemble-tracker: true
```##### 3、使用示例
```javaimport javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
public class CuratorApplication_Test {
@Autowired
private CuratorZookeeperTemplate template;
@PostConstruct
public void testText() {
}
@PostConstruct
public void testImage() {
}
public static void main(String[] args) throws Exception {
SpringApplication.run(CuratorApplication_Test.class, args);
}}
```
## Jeebiz 技术社区
Jeebiz 技术社区 **微信公共号**、**小程序**,欢迎关注反馈意见和一起交流,关注公众号回复「Jeebiz」拉你入群。
|公共号|小程序|
|---|---|
| ![](https://raw.githubusercontent.com/hiwepy/static/main/images/qrcode_for_gh_1d965ea2dfd1_344.jpg)| ![](https://raw.githubusercontent.com/hiwepy/static/main/images/gh_09d7d00da63e_344.jpg)|