@Import(value=BroadleafMultiSessionCsrConfig.class) public class BroadleafJdbcHttpSessionConfiguration extends org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration implements org.springframework.context.annotation.ImportAware
SpringHttpSessionConfiguration that is adapted from
Spring's JdbcHttpSessionConfiguration.
This implementation uses Broadleaf's "blTransactionManager" and an injected datasource (e.g. "webDS").
In addition, the same properties for session configuration available to JdbcHttpSessionConfiguration
are available here as well.
This was added because you cannot use EnableJdbcHttpSession to autoconfigure spring session. EnableJdbcHttpSession
results in extra unneeded configuration. It also causes hibernate sandbox filter errors when it tries to make data
modifications.| Modifier and Type | Field and Description |
|---|---|
protected DataSource |
dataSource |
protected Integer |
maxInactiveIntervalInSeconds |
protected String |
tableName |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
| Constructor and Description |
|---|
BroadleafJdbcHttpSessionConfiguration(DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.jdbc.core.JdbcTemplate |
createJdbcTemplate(DataSource dataSource) |
DataSource |
getDataSource() |
Integer |
getMaxInactiveIntervalInSeconds() |
String |
getTableName() |
org.springframework.session.jdbc.JdbcOperationsSessionRepository |
sessionRepository() |
void |
setDataSource(DataSource dataSource) |
void |
setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) |
void |
setMaxInactiveIntervalInSeconds(Integer maxInactiveIntervalInSeconds) |
void |
setTableName(String tableName) |
init, sessionEventHttpSessionListenerAdapter, setApplicationContext, setCookieSerializer, setHttpSessionIdResolver, setHttpSessionListeners, setServletContext, springSessionRepositoryFilter@Value(value="${spring.session.jdbc.tableName:BLC_SPRING_SESSION}")
protected String tableName
@Value(value="${spring.session.jdbc.maxInactiveIntervalInSeconds:1800}")
protected Integer maxInactiveIntervalInSeconds
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected DataSource dataSource
public BroadleafJdbcHttpSessionConfiguration(DataSource dataSource)
@Bean public org.springframework.session.jdbc.JdbcOperationsSessionRepository sessionRepository()
protected org.springframework.jdbc.core.JdbcTemplate createJdbcTemplate(DataSource dataSource)
public void setDataSource(DataSource dataSource)
public DataSource getDataSource()
public void setMaxInactiveIntervalInSeconds(Integer maxInactiveIntervalInSeconds)
public Integer getMaxInactiveIntervalInSeconds()
public void setTableName(String tableName)
public String getTableName()
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
setImportMetadata in interface org.springframework.context.annotation.ImportAwareCopyright © 2019. All rights reserved.