Skip to content

yiyingcanfeng/shiro-redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shiro-redis

Introduction

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!

Documentation

Official documentation is located here.

This is a fork of alexxiyang/shiro-redis to fix bugs and add some new features.

Update

  • 3.5.0 Add FstSerialize support.
    Usage:

    @Bean
    public RedisSessionDAO redisSessionDAO() {
        RedisSessionDAO redisSessionDAO = new RedisSessionDAO();
        redisSessionDAO.setRedisManager(redisManager());
        // custom session key prefix
        redisSessionDAO.setKeyPrefix(SESSION_KEY_PREFIX);
        // custom session value serializer, default is jdk serializer.
        redisSessionDAO.setValueSerializer(new FstSerializer());
        return redisSessionDAO;
    }
  • 3.4.0 Add Lettuce redis client support.
    Usage:

    @Bean
    public IRedisManager redisManager() {
        LettuceRedisManager manager = new LettuceRedisManager("127.0.0.1", 6379);
        manager.setDatabase(Integer.parseInt(database));
        // or: LettuceRedisManager manager = LettuceRedisManager.builder().host("127.0.0.1").port(6379).build();
        return manager;
    }

About

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%