Code Monkey home page Code Monkey logo

spring-boot-cassandra's Introduction

Spring Boot with Aiven for Apache Cassandra®

This repo is largely inspired from the the official spring-guides GH org, you can find the original here

Setup

Cassandra

Create a Cassandra service on Aiven, you can either use the console, the CLI or Terraform.

Once the service is running, use the Quick Connect button and connect to your service using csqlsh.

Once connected create the keyspace :

CREATE KEYSPACE aiven_keyspace
        WITH REPLICATION = { 
          'class' : 'SimpleStrategy', 
          'replication_factor' : 2 
      };

Create Truststore

You need to create a Java Trustore based on the CA. Download the CA file from the Aiven console and then run :

keytool -import  \               
  -file ca.pem   \
  -alias CA      \
  -keystore client.truststore.jks

You will be prompted to enter a password, choose whatever you want and remember it because you will need it in the application.properties. Copy client.truststore.jks in src/main/resources.

Update application.properties

Open src/main/resources/application.properties and replace all the placeholders delimited with <>.

Run the app

You're ready to run the app : mvn spring-boot:run

spring-boot-cassandra's People

Contributors

sebastienblanc avatar

Watchers

 avatar Tibs (Tony Ibbs) avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.