Example usage for org.springframework.data.cassandra.config CassandraClusterFactoryBean setContactPoints

List of usage examples for org.springframework.data.cassandra.config CassandraClusterFactoryBean setContactPoints

Introduction

In this page you can find the example usage for org.springframework.data.cassandra.config CassandraClusterFactoryBean setContactPoints.

Prototype

public void setContactPoints(String contactPoints) 

Source Link

Document

Set a comma-delimited string of the contact points (hosts) to connect to.

Usage

From source file:com.poc.cassandra.CassandraConfig.java

@Bean
public CassandraClusterFactoryBean cluster() {

    CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean();
    cluster.setContactPoints(env.getProperty("cassandra.contactpoints"));
    cluster.setPort(Integer.parseInt(env.getProperty("cassandra.port")));

    return cluster;
}