-
-
Save MiraLak/14d835992cf2980ceebe to your computer and use it in GitHub Desktop.
Accelerometer to Cassandra REST Api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@PropertySource(value = { "classpath:cassandra.properties" }) | |
public class CassandraConfiguration extends AbstractCassandraConfiguration { | |
@Autowired | |
private Environment environment; | |
@Bean | |
public CassandraClusterFactoryBean cluster() { | |
CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean(); | |
cluster.setContactPoints(environment.getProperty("cassandra.contactpoints")); | |
cluster.setPort(Integer.parseInt(environment.getProperty("cassandra.port"))); | |
return cluster; | |
} | |
@Override | |
protected String getKeyspaceName() { | |
return environment.getProperty("cassandra.keyspace"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment