IBM/greeting-cloudant-spring

Name: greeting-cloudant-spring

Owner: International Business Machines

Description: Spring + Cloudant = :heart:

Created: 2017-12-01 15:18:18.0

Updated: 2018-01-22 18:50:37.0

Pushed: 2017-12-06 15:35:46.0

Homepage:

Size: 154

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Greetings with Spring and Cloudant

The Cloudant Java SDK has new support for Spring Framework and Spring Boot.

This repository contains a few projects to walk you through what this new support provides when working with Spring and Cloudant.

Project contents
  1. greeting-springboot: The “Before” case. This Spring Boot application connects to a Cloudant database using only the Cloudant Java library com.cloudant:cloudant-client
  2. greeting-spring-framework: This Spring Framework application uses the new @EnableCloudant annotation from the com.cloudant:cloudant-spring-framework library to connect to a Cloudant database
  3. greeting-springboot-auto: This Spring Boot application uses the new com.cloudant:cloudant-spring-boot-starter library to automatically configure and connectto a Cloudant database
  4. greeting-springboot-liberty: This Spring Boot application uses the autoconfiguration support for Cloudant, but also uses OpenLiberty in place of Tomcat.
Evolution of the Cloudant support for Spring

The official Cloudant Java Client provides libraries for Java applications to connect to, and interact with Cloudant databases. The new Cloudant Spring Library builds on top of the Cloudant Java Client to enable autoconfiguration for Spring Boot applications and exposes an @EnableCloudant annotation for Spring Framework applications.

Overview of evolution

Before the creation of the Cloudant Spring Library developers had to include configuration for Spring beans that connected to Cloudant in their application code. Now the beans are provided by the library.

alt text

Before:

After:

Detailed evolution

The new Cloudant Spring client provides both the beans used for connecting to Cloudant and the configuration properties file for specifying credential information. The library is pulled in as a dependency from Maven Central.

alt text

Before:

After:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.