maseev / spring-session-orientdb

Spring Session Extension for OrientDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Session OrientDB

Build Status Coverage Status

Spring Session Extension

Spring Session OrientDB is a Spring Session extension which uses OrientDB as a session storage.

How to build

  • Clone this repository
  • Run ./gradlew clean install in the project folder to build the project and install it to the local Maven repository

How to use

Maven
<dependency>
    <groupId>io.github.maseev</groupId>
    <artifactId>spring-session-orientdb</artifactId>
    <version>1.0</version>
</dependency>
Gradle
compile group: 'io.github.maseev', name: 'spring-session-orientdb', version: '1.0'

Add @EnableOrientHttpSession annotation to your Spring Boot application class:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import io.github.maseev.spring.session.orientdb.EnableOrientHttpSession;

@EnableOrientHttpSession
@SpringBootApplication
public class Application {

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }
}

Don't forget to specify the following properties:

  • session.db.url - JDBC URL to the OrientDB database (e.g. session.db.url=remote:localhost:2424/test)
  • session.db.username - username (e.g. session.db.username=root)
  • session.db.password - password (e.g. session.db.password=root)
  • session.timeout - the maximum inactive interval in seconds between requests before a session will be invalidated. A negative time indicates that the session will never timeout. (e.g. session.timeout=60)

About

Spring Session Extension for OrientDB

License:MIT License


Languages

Language:Java 100.0%