Skip to content

Make RedisHttpSessionConfiguration more XML friendly #105

Closed

Description

@rwinch

We should be able to use RedisHttpSessionConfiguration with XML and <context:annotation-config/>, but it doesn't work well

  • maxInactiveIntervalInSeconds is not defaulted
  • there is no setter for maxInactiveIntervalInSeconds

A workaround is to use <context:annotation-config/> with your own Java Configuration:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">


    <bean class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"/>

    <context:annotation-config/>
    <bean class="sample.RedisHttpSessionConfig"/>
package sample;

import org.springframework.session.data.redis.config.annotation.web.http.*;

@EnableRedisHttpSession // <1>
public class RedisHttpSessionConfig {}

Relates #101

Activity

  1. added this to the 1.0.1 milestone on Jan 14, 2015
  2. added
    type: enhancement
    on Jan 14, 2015
  3. self-assigned this
    on Apr 10, 2015
  4. added a commit that references this issue on Aug 13, 2021
    1c7d5e5
  5. added a commit that references this issue on Jan 20, 2025
    eddb10d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions