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

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

Introduction

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

Prototype

public void setPort(int port) 

Source Link

Document

Set the port for the contact points.

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;
}