@Conditional(value=BaseConfiguration.ClusterEnabledCondition.class) @Configuration @EnableScheduling public class SessionRedisConfiguration extends org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration implements org.springframework.context.EmbeddedValueResolverAware, org.springframework.context.annotation.ImportAware, BaseConfiguration
Warning
|
The class has been copied from the RedisHttpSessionConfiguration as it defines its own PropertySourcesPlaceholderConfigurer ,
which clashes with ours. See https://github.com/spring-projects/spring-session/issues/867 for more infos or a fix for this issue.
|
Please always check the changes in the RedisHttpSessionConfiguration
class if you update the Spring Session dependency.
The changes to the original class have been wrapped into CHANGE START
and CHANGE END
comment blocks.
BaseConfiguration.ClusterDisabledCondition, BaseConfiguration.ClusterEnabledCondition, BaseConfiguration.PROPERTY_SOURCE_LOCATIONS
ADDONS_CONFIGURATION_COMPONENT_SCAN_PACKAGE, CLUSTER_ENABLE_PROPERTY_NAME, CONFIGURATION_ORDER_DELTA, CUSTOM_CONFIGURATION_COMPONENT_SCAN_PACKAGE, DEFAULT_WEB_APPLICATION_INITIALIZER_ORDER, ONE_CONFIGURATION_ORDER, PROPERTY_SOURCES_CUSTOM_APPLICATION_CONTEXT_INITIALIZER_ORDER, SECURITY_CONFIGURATION_ORDER, SECURITY_WEB_APPLICATION_INITIALIZER_ORDER, SESSION_WEB_APPLICATION_INITIALIZER_ORDER, VIS_CONFIGURATION_ORDER
Constructor and Description |
---|
SessionRedisConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.beans.factory.InitializingBean |
enableRedisKeyspaceNotificationsInitializer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) |
org.springframework.data.redis.connection.RedisConnectionFactory |
redisConnectionFactory(String redisHostName,
int redisPort,
String redisPassword) |
org.springframework.data.redis.listener.RedisMessageListenerContainer |
redisMessageListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
org.springframework.session.data.redis.RedisOperationsSessionRepository messageListener) |
org.springframework.data.redis.core.RedisTemplate<Object,Object> |
sessionRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) |
org.springframework.session.data.redis.RedisOperationsSessionRepository |
sessionRepository(org.springframework.data.redis.core.RedisOperations<Object,Object> sessionRedisTemplate,
org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setConfigureRedisAction(org.springframework.session.data.redis.config.ConfigureRedisAction configureRedisAction)
Sets the action to perform for configuring Redis.
|
void |
setDefaultRedisSerializer(org.springframework.data.redis.serializer.RedisSerializer<Object> defaultRedisSerializer) |
void |
setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver) |
void |
setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) |
void |
setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds) |
void |
setRedisFlushMode(org.springframework.session.data.redis.RedisFlushMode redisFlushMode) |
void |
setRedisNamespace(String namespace) |
void |
setRedisSubscriptionExecutor(Executor redisSubscriptionExecutor) |
void |
setRedisTaskExecutor(Executor redisTaskExecutor) |
init, sessionEventHttpSessionListenerAdapter, setApplicationContext, setCookieSerializer, setHttpSessionListeners, setHttpSessionStrategy, setServletContext, springSessionRepositoryFilter
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyConfigurationCustomisations, getObjectOrDefault
@Bean public org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory(@Value(value="${cluster.redis.hostname:localhost}") String redisHostName, @Value(value="${cluster.redis.port:6379}") int redisPort, @Value(value="${cluster.redis.password:}") String redisPassword)
@Bean public org.springframework.data.redis.listener.RedisMessageListenerContainer redisMessageListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, org.springframework.session.data.redis.RedisOperationsSessionRepository messageListener)
@Bean public org.springframework.data.redis.core.RedisTemplate<Object,Object> sessionRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
@Bean public org.springframework.session.data.redis.RedisOperationsSessionRepository sessionRepository(@Qualifier(value="sessionRedisTemplate") org.springframework.data.redis.core.RedisOperations<Object,Object> sessionRedisTemplate, org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
public void setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds)
public void setRedisNamespace(String namespace)
public void setRedisFlushMode(org.springframework.session.data.redis.RedisFlushMode redisFlushMode)
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
setImportMetadata
in interface org.springframework.context.annotation.ImportAware
@Bean public org.springframework.beans.factory.InitializingBean enableRedisKeyspaceNotificationsInitializer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
@Autowired(required=false) public void setConfigureRedisAction(org.springframework.session.data.redis.config.ConfigureRedisAction configureRedisAction)
Sets the action to perform for configuring Redis.
configureRedisAction
- the configureRedis to set. The default is
ConfigureNotifyKeyspaceEventsAction
.@Autowired(required=false) @Qualifier(value="springSessionDefaultRedisSerializer") public void setDefaultRedisSerializer(org.springframework.data.redis.serializer.RedisSerializer<Object> defaultRedisSerializer)
@Autowired(required=false) @Qualifier(value="springSessionRedisTaskExecutor") public void setRedisTaskExecutor(Executor redisTaskExecutor)
@Autowired(required=false) @Qualifier(value="springSessionRedisSubscriptionExecutor") public void setRedisSubscriptionExecutor(Executor redisSubscriptionExecutor)
public void setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
setEmbeddedValueResolver
in interface org.springframework.context.EmbeddedValueResolverAware
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.