Code Monkey home page Code Monkey logo

spring-session-orientdb's Introduction

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)

spring-session-orientdb's People

Contributors

maseev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spring-session-orientdb's Issues

does this support remote

I have a db.properties of:

session.db.url="jdbc:orient:remote:192.168.1.133/testdb"
session.db.username="user"
session.db.password="resu"
session.timeout=600

I can connect via a separate jdbc test, but not through the application

with exception:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'springSessionRepositoryFilter' defined in org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration: Unsatisfied dependency expressed through method 'springSessionRepositoryFilter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repository' defined in io.github.maseev.spring.session.orientdb.OrientSessionConfiguration: Unsatisfied dependency expressed through method 'repository' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'db' defined in io.github.maseev.spring.session.orientdb.OrientSessionConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.orientechnologies.orient.core.db.OPartitionedDatabasePool]: Factory method 'db' threw exception; nested exception is com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database '"jdbc:orient:remote:192.168.1.133/testdb"'

Just a guess but it seems like it's not passing the credentials...

exception trying to authenticate

I'm new to spring-session assume I'm missing something, but I get an exception:
com.orientechnologies.orient.core.exception.OSerializationException: Linked type [class org.springframework.security.web.savedrequest.DefaultSavedRequest:DefaultSavedRequest[http://localhost:9090/login]] cannot be serialized because is not part of registered entities. To fix this error register this class
DB name="testdb"

...also I found a suggestion via google search that suggests :

'you should use the "ODatabaseDocumentTx" to open db if you want create/use
a Document database.

replace OObjectDatabaseTx with ODatabaseDocumentTx
(example ODatabaseDocumentTx db = new ODatabaseDocumentTx'

Tho I'm not quite sure that is what I'm up against.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.