From a4a78af613dab8f348ac57300a4ae740e7f5e510 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 26 Apr 2017 00:46:28 +0100 Subject: [PATCH] Update README.md --- README.md | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 3f7ab9e..eac506b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,28 @@ # Cloudant/CouchDB Auto-Configuration for Spring Boot [![Build Status](https://travis-ci.org/icha024/cloudant-spring-boot-starter.svg?branch=master)](https://travis-ci.org/icha024/cloudant-spring-boot-starter) [![Coverage Status](https://coveralls.io/repos/github/icha024/cloudant-spring-boot-starter/badge.svg?branch=master)](https://coveralls.io/github/icha024/cloudant-spring-boot-starter?branch=master) +[![Maven Central](https://img.shields.io/maven-central/v/com.clianz/cloudant-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Ccloudant-spring-boot-starter) A convienient way to use the [official Cloudant client](https://github.com/cloudant/java-cloudant) with Spring Boot. +## Installing +**_Maven_** +```xml + + com.clianz + cloudant-spring-boot-starter + 0.9.5 + +``` +**_Gradle_** +``` +repositories { + mavenCentral() +} +``` +``` +compile('com.clianz:cloudant-spring-boot-starter:0.9.5') +``` + ## Usage Inject a database: ```java @@ -26,34 +46,10 @@ Alternatively, you may inject the client for fine-grain controls: @Autowired CloudantClient cloudant ``` -Then do some client API function, eg. Create a database: ```java Database db = cloudant.database("mydb", true); ``` -## Installing -Latest published version on Maven Central: [![Maven Central](https://img.shields.io/maven-central/v/com.clianz/cloudant-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Ccloudant-spring-boot-starter) - -### via Maven -```xml - - com.clianz - cloudant-spring-boot-starter - 0.9.5 - -``` - -### via Gradle -``` -repositories { - mavenCentral() -} -``` -and -``` -compile('com.clianz:cloudant-spring-boot-starter:0.9.5') -``` - ## Configuration ### Spring Boot Configuration Configurations can be placed in the application.properties (or yml) as usual. @@ -87,7 +83,7 @@ To connect to CouchDB on localhost for example, just set the url: cloudant.url=http://localhost:5984 ``` -### Demo +### Example Example app is available at https://github.com/icha024/cloudant-spring-boot-starter-example ## Requirements