<commit_before># consul4spring
A spring-boot extension aimed at using Consul as a micro service registration

# Overview
This library is some glue-code that I needed to write my first micro service. I wanted my micro service to use 
spring-boot and to register itself in a [Consul](https://consul.io/) cluster. This library allows a spring-boot 
application to:

- Automatically register itself as a service in Consul
- Register default properties in the Consul key value store
- Mark custom Consul checks as passed/failed
- Use the Consul distributed lock
- Easily store values in the Consul key value store
- Resolve a DNS SRV record

# Using the library features

## Setup

### Setup your gradle project

```
    
    repositories {
        maven {
            url  "http://dl.bintray.com/amirk/maven" 
        }
    }
    
    dependencies {
        compile "ajk.plum:plum:0.0.3"
    }
```

### Define the Consul properties

In your application.yml, or in any other way supported by spring-boot, define the following properties

```
    consul:<commit_msg>updated docs<commit_after># consul4spring
A spring-boot extension aimed at using Consul as a micro service registration

[ ![Download](https://api.bintray.com/packages/amirk/maven/consul4spring/images/download.svg) ](https://bintray.com/amirk/maven/consul4spring/_latestVersion)

# Overview

This library is some glue-code that I needed to write my first micro service. I wanted my micro service to use 
spring-boot and to register itself in a [Consul](https://consul.io/) cluster. This library allows a spring-boot 
application to:

- Automatically register itself as a service in Consul
- Register default properties in the Consul key value store
- Mark custom Consul checks as passed/failed
- Use the Consul distributed lock
- Easily store values in the Consul key value store
- Resolve a DNS SRV record

# Acknowledgement

This library uses [Orbitz Consul Client](https://github.com/OrbitzWorldwide/consul-client) to communicate with Consul
and [dnsjava](http://www.dnsjava.org/) for DNS resolution.

# Using the library features

## Setup

### Setup your gradle project

```
    
    repositories {
        maven {
            url  "http://dl.bintray.com/amirk/maven" 
        }
    }
    
    dependencies {
        compile "ajk.plum:plum:0.0.4"
    }
```

### Define the Consul properties

In your application.yml, or in any other way supported by spring-boot, define the following properties

```
    consul:
{'fraction_non_alphanumeric': 0.07996768982229402, 'fraction_numerical': 0.004038772213247173, 'mean_word_length': 3.3609154929577465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1282604', 'n_tokens_mistral': 729, 'n_tokens_neox': 698, 'n_words': 278}