Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raonigabriel/spring-boot-embedded-zookeeper
A small utility library that easily enables an embedded ZooKeeper server on SpringBoot apps.
https://github.com/raonigabriel/spring-boot-embedded-zookeeper
embedded enablement spring spring-boot zookeeper
Last synced: 13 days ago
JSON representation
A small utility library that easily enables an embedded ZooKeeper server on SpringBoot apps.
- Host: GitHub
- URL: https://github.com/raonigabriel/spring-boot-embedded-zookeeper
- Owner: raonigabriel
- License: apache-2.0
- Created: 2020-05-20T21:02:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T19:57:19.000Z (almost 2 years ago)
- Last Synced: 2023-07-27T07:15:44.800Z (over 1 year ago)
- Topics: embedded, enablement, spring, spring-boot, zookeeper
- Language: Java
- Size: 66.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/raonigabriel/spring-boot-embedded-zookeeper/workflows/Maven%20Build/badge.svg?branch=master)](https://github.com/raonigabriel/spring-boot-embedded-zookeeper/actions)
[![Codecov](https://codecov.io/gh/raonigabriel/spring-boot-embedded-zookeeper/branch/master/graph/badge.svg)](https://codecov.io/gh/raonigabriel/spring-boot-embedded-zookeeper)
[![Libraries](https://img.shields.io/librariesio/github/raonigabriel/spring-boot-embedded-zookeeper)](https://libraries.io/github/raonigabriel/spring-boot-embedded-zookeeper)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.raonigabriel/spring-boot-embedded-zookeeper)](https://search.maven.org/artifact/io.github.raonigabriel/spring-boot-embedded-zookeeper)Spring Boot Embedded Zookeeper
-------------------
A small utility library that easily enables an embedded ZooKeeper server on SpringBoot apps.### This library is published to Maven Central, hence:
Add the following dependency to your pom.xml:
```xmlio.github.raonigabriel
spring-boot-embedded-zookeeper
2.0.7```
## Usage
Just add **@EnableEmbeddedZooKeeper** to any **@Configuration** or **@SpringBootApplication** class as follows:
```java
package com.myco.myapp;@EnableEmbeddedZooKeeper
@SpringBootApplication
public class MyApp {public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}```
Then you can inject the ZooKeeperServer bean on any Spring component, as following:
```java
package com.myco.myapp;@Component
public class MyComponent {@Autowired
ZooKeeperServer zookeeperServer;
public void doSomething() {
// Use the injected zookeeperServer
}}
```
To get the code:
-------------------
Clone the repository:
```
$ git clone https://github.com/raonigabriel/spring-boot-embedded-zookeeper.git
```
If this is your first time using Github, review http://help.github.com to learn the basics.## License
Released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html)