Class JdbcHttpSessionConfiguration

java.lang.Object
org.springframework.session.jdbc.config.annotation.web.http.JdbcHttpSessionConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.annotation.ImportAware, org.springframework.context.ApplicationContextAware, org.springframework.context.EmbeddedValueResolverAware

@Configuration(proxyBeanMethods=false) @Import(SpringHttpSessionConfiguration.class) public class JdbcHttpSessionConfiguration extends Object implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.EmbeddedValueResolverAware, org.springframework.context.annotation.ImportAware, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Spring @Configuration class used to configure and initialize a JDBC based HttpSession provider implementation in Spring Session.

Exposes the SessionRepositoryFilter as a bean named springSessionRepositoryFilter. In order to use this a single DataSource must be exposed as a Bean.

Since:
1.2.0
See Also:
  • Constructor Details

    • JdbcHttpSessionConfiguration

      public JdbcHttpSessionConfiguration()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • sessionRepository

      @Bean public JdbcIndexedSessionRepository sessionRepository()
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(Duration maxInactiveInterval)
    • setMaxInactiveIntervalInSeconds

      @Deprecated public void setMaxInactiveIntervalInSeconds(Integer maxInactiveIntervalInSeconds)
      Deprecated.
    • setTableName

      public void setTableName(String tableName)
    • setCleanupCron

      public void setCleanupCron(String cleanupCron)
    • setFlushMode

      public void setFlushMode(FlushMode flushMode)
    • setSaveMode

      public void setSaveMode(SaveMode saveMode)
    • setDataSource

      @Autowired public void setDataSource(@SpringSessionDataSource org.springframework.beans.factory.ObjectProvider<DataSource> springSessionDataSource, org.springframework.beans.factory.ObjectProvider<DataSource> dataSource)
    • setTransactionManager

      @Autowired(required=false) @SpringSessionTransactionManager public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
    • setTransactionOperations

      @Autowired(required=false) @Qualifier("springSessionTransactionOperations") public void setTransactionOperations(org.springframework.transaction.support.TransactionOperations transactionOperations)
    • setIndexResolver

      @Autowired(required=false) public void setIndexResolver(IndexResolver<Session> indexResolver)
    • setLobHandler

      @Autowired(required=false) @Qualifier("springSessionLobHandler") public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
    • setSpringSessionConversionService

      @Autowired(required=false) @Qualifier("springSessionConversionService") public void setSpringSessionConversionService(org.springframework.core.convert.ConversionService conversionService)
    • setConversionService

      @Autowired(required=false) @Qualifier("conversionService") public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
    • setSessionRepositoryCustomizer

      @Autowired(required=false) public void setSessionRepositoryCustomizer(org.springframework.beans.factory.ObjectProvider<SessionRepositoryCustomizer<JdbcIndexedSessionRepository>> sessionRepositoryCustomizers)
    • setSessionIdGenerator

      @Autowired(required=false) public void setSessionIdGenerator(SessionIdGenerator sessionIdGenerator)
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • setEmbeddedValueResolver

      public void setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
      Specified by:
      setEmbeddedValueResolver in interface org.springframework.context.EmbeddedValueResolverAware
    • setImportMetadata

      public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
      Specified by:
      setImportMetadata in interface org.springframework.context.annotation.ImportAware
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException