Created
April 15, 2018 17:26
-
-
Save lankydan/45dab6ed3159b62878c7c2c61f2b3834 to your computer and use it in GitHub Desktop.
Datastax driver - session creation
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
@Bean | |
public Session session(Cluster cluster, @Value("${cassandra.keyspace}") String keyspace) throws IOException { | |
final Session session = cluster.connect(keyspace); | |
// any other setup | |
return session; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment