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: about 1 year 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T19:57:19.000Z (over 3 years ago)
- Last Synced: 2025-03-28T17:02:08.276Z (about 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
[](https://github.com/raonigabriel/spring-boot-embedded-zookeeper/actions)
[](https://codecov.io/gh/raonigabriel/spring-boot-embedded-zookeeper)
[](https://libraries.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:
```xml
io.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)