Spring Session Cassandra

Spring session implementation with Cassandra as backend

License

License

MIT License
Categories

Categories

Cassandra Data Databases
GroupId

GroupId

com.github.honorem
ArtifactId

ArtifactId

spring-session-cassandra
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Session Cassandra
Spring session implementation with Cassandra as backend
Project URL

Project URL

https://github.com/honorem/spring-session-cassandra
Source Code Management

Source Code Management

https://github.com/honorem/spring-session-cassandra.git

Download spring-session-cassandra

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.honorem/spring-session-cassandra/ -->
<dependency>
    <groupId>com.github.honorem</groupId>
    <artifactId>spring-session-cassandra</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.honorem/spring-session-cassandra/
implementation 'com.github.honorem:spring-session-cassandra:0.2'
// https://jarcasting.com/artifacts/com.github.honorem/spring-session-cassandra/
implementation ("com.github.honorem:spring-session-cassandra:0.2")
'com.github.honorem:spring-session-cassandra:jar:0.2'
<dependency org="com.github.honorem" name="spring-session-cassandra" rev="0.2">
  <artifact name="spring-session-cassandra" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.honorem', module='spring-session-cassandra', version='0.2')
)
libraryDependencies += "com.github.honorem" % "spring-session-cassandra" % "0.2"
[com.github.honorem/spring-session-cassandra "0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
org.springframework.session : spring-session jar 1.2.1.RELEASE

provided (1)

Group / Artifact Type Version
org.springframework.data : spring-data-cassandra jar 1.5.0.M1

Project Modules

There are no modules declared in this project.

spring-session-cassandra

Spring session implementation with Cassandra as backend

inspired by cambierr/spring-session-couchbase

Spring Session Project Site

Everything you need about Spring (documentation, issue management, support, samples) is at http://spring.io/spring-session/

Configuration

In order to work properly, you must create a table named "cassandra_sessions" (see below to change this name) in your working keyspace as defined in you AbstractCassandraConfiguration implementation. Here is the table definition :

CREATE TABLE cassandra_sessions (
    id text PRIMARY KEY,
    accessed bigint,
    created bigint,
    data map<text, text>,
    interval int
);

To enable the cassandra session use the annotation @EnableCassandraHttpSession in your main Spring Application class. By default, spring-cassandra-session use the table casssandra_sessions but you can edit this name by using @EnableCassandraHttpSession(cassandraTableName = "your_table_name"). Don't forget to update your cassandra table accordingly.

Maven

If your are using maven, use the following dependency :

<dependency>
    <groupId>com.github.honorem</groupId>
    <artifactId>spring-session-cassandra</artifactId>
    <version>0.2</version>
</dependency>

Versions

Version
0.2
0.1