Skip to content

A small utility library that easily enables an embedded ZooKeeper server on SpringBoot apps.

License

Notifications You must be signed in to change notification settings

raonigabriel/spring-boot-embedded-zookeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Codecov Libraries Maven Central

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:

<dependency>
    <groupId>io.github.raonigabriel</groupId>
    <artifactId>spring-boot-embedded-zookeeper</artifactId>
    <version>2.0.7</version>
</dependency>

Usage

Just add @EnableEmbeddedZooKeeper to any @Configuration or @SpringBootApplication class as follows:

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:

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

About

A small utility library that easily enables an embedded ZooKeeper server on SpringBoot apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages