Spring Session Extension
Spring Session OrientDB is a Spring Session extension which uses OrientDB as a session storage.
- Clone this repository
- Run
./gradlew clean install
in the project folder to build the project and install it to the local Maven repository
<dependency>
<groupId>io.github.maseev</groupId>
<artifactId>spring-session-orientdb</artifactId>
<version>1.0</version>
</dependency>
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
)