shiro-redisson


License

License

Categories

Categories

Redis Data Databases Redisson
GroupId

GroupId

com.github.fartherp
ArtifactId

ArtifactId

shiro-redisson
Last Version

Last Version

1.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

shiro-redisson
shiro-redisson
Project URL

Project URL

https://github.com/fartherp/shiro-redisson
Project Organization

Project Organization

CK
Source Code Management

Source Code Management

https://github.com/fartherp/shiro-redisson

Download shiro-redisson

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.fartherp/shiro-redisson/ -->
<dependency>
    <groupId>com.github.fartherp</groupId>
    <artifactId>shiro-redisson</artifactId>
    <version>1.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fartherp/shiro-redisson/
implementation 'com.github.fartherp:shiro-redisson:1.1.4'
// https://jarcasting.com/artifacts/com.github.fartherp/shiro-redisson/
implementation ("com.github.fartherp:shiro-redisson:1.1.4")
'com.github.fartherp:shiro-redisson:jar:1.1.4'
<dependency org="com.github.fartherp" name="shiro-redisson" rev="1.1.4">
  <artifact name="shiro-redisson" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fartherp', module='shiro-redisson', version='1.1.4')
)
libraryDependencies += "com.github.fartherp" % "shiro-redisson" % "1.1.4"
[com.github.fartherp/shiro-redisson "1.1.4"]

Dependencies

compile (3)

Group / Artifact Type Version
org.redisson : redisson jar 3.11.0
org.apache.shiro : shiro-core jar 1.3.2
com.googlecode.concurrentlinkedhashmap : concurrentlinkedhashmap-lru jar 1.4.2

provided (9)

Group / Artifact Type Version
com.fasterxml.jackson.dataformat : jackson-dataformat-avro Optional jar 2.9.9
com.fasterxml.jackson.dataformat : jackson-dataformat-smile Optional jar 2.9.9
com.fasterxml.jackson.dataformat : jackson-dataformat-cbor Optional jar 2.9.9
com.fasterxml.jackson.dataformat : jackson-dataformat-ion Optional jar 2.9.9
com.esotericsoftware : kryo Optional jar 4.0.2
org.msgpack : jackson-dataformat-msgpack Optional jar 0.8.16
net.jpountz.lz4 : lz4 Optional jar 1.3.0
ch.qos.logback : logback-core Optional jar 1.2.3
ch.qos.logback : logback-classic Optional jar 1.2.3

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.14.3

Project Modules

There are no modules declared in this project.

shiro-redisson

Build Status Coverage Status Maven Central Sonatype Nexus (Snapshots) GitHub release License Project Stats
Quality gate

功能简介

1.使用redisson包解决redis缓存
2.解决shiro-redis使用*查询时,导致redis长时间卡死
3.解决使用spring-boot-devtools,出现ClassCastException异常
4.支持redisson提供的编码类型,https://github.com/redisson/redisson/wiki/4.-data-serialization

JDK

1.8/11/12/13

java使用

    @Bean
    public MyShiroRealm myShiroRealm() {
        return new MyShiroRealm();
    }
    
    @Bean
    public SessionManager sessionManager(SessionDAO redisSessionDAO, ObjectProvider<SessionListener> sessionListenersProvider) {
        List<SessionListener> sessionListeners = sessionListenersProvider.stream().collect(Collectors.toList());
        DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
        sessionManager.setSessionDAO(redisSessionDAO);
        sessionManager.setSessionListeners(sessionListeners);
        return mySessionManager;
    }

    /**
    * 内置session监听器,保证删除session/cache冗余的数据信息
    */
    @Bean
    public SessionListener sessionListener(SessionDAO redisSessionDAO, MyShiroRealm myShiroRealm) {
        return new RedisSessionListener(redisSessionDAO, myShiroRealm);
    }

    @Bean
    public RedisCacheManager cacheManager(RedissonClient redissonClient) {
        return new RedisCacheManager(redissonClient);
    }

    @Bean
    public RedisSessionDAO redisSessionDAO(RedisCacheManager cacheManager) {
        return new RedisSessionDAO(cacheManager);
    }

Versions

Version
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0