{"id":19439154,"url":"https://github.com/fartherp/shiro-redisson","last_synced_at":"2025-04-24T22:32:26.399Z","repository":{"id":43382817,"uuid":"163499832","full_name":"fartherp/shiro-redisson","owner":"fartherp","description":"shiro集成redisson","archived":false,"fork":false,"pushed_at":"2023-07-24T12:46:37.000Z","size":168,"stargazers_count":6,"open_issues_count":6,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-03T12:22:34.340Z","etag":null,"topics":["redisson","shiro"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fartherp.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-29T09:55:22.000Z","updated_at":"2024-12-28T09:05:19.000Z","dependencies_parsed_at":"2022-07-30T15:38:49.766Z","dependency_job_id":null,"html_url":"https://github.com/fartherp/shiro-redisson","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fartherp%2Fshiro-redisson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fartherp%2Fshiro-redisson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fartherp%2Fshiro-redisson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fartherp%2Fshiro-redisson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fartherp","download_url":"https://codeload.github.com/fartherp/shiro-redisson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250719791,"owners_count":21476136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redisson","shiro"],"created_at":"2024-11-10T15:21:35.796Z","updated_at":"2025-04-24T22:32:26.154Z","avatar_url":"https://github.com/fartherp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shiro-redisson\n[![Build Status](https://travis-ci.org/fartherp/shiro-redisson.svg?branch=master)](https://travis-ci.org/fartherp/shiro-redisson)\n[![Coverage Status](https://coveralls.io/repos/github/fartherp/shiro-redisson/badge.svg?branch=master)](https://coveralls.io/github/fartherp/shiro-redisson?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.fartherp/shiro-redisson/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.fartherp/shiro-redisson/)\n[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.github.fartherp/shiro-redisson.svg)](https://oss.sonatype.org/content/repositories/snapshots/com/github/fartherp/shiro-redisson/)\n[![GitHub release](https://img.shields.io/github/release/fartherp/shiro-redisson.svg)](https://github.com/fartherp/shiro-redisson/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Project Stats](https://www.openhub.net/p/shiro-redisson/widgets/project_thin_badge.gif)](https://www.openhub.net/p/shiro-redisson)  \n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=fartherp_javacode)](https://sonarcloud.io/dashboard?id=fartherp_javacode)\n\n功能简介\n\n```\n1.使用redisson包解决redis缓存\n2.解决shiro-redis使用*查询时，导致redis长时间卡死\n3.解决使用spring-boot-devtools，出现ClassCastException异常\n4.支持redisson提供的编码类型，https://github.com/redisson/redisson/wiki/4.-data-serialization\n```\n## JDK\n\u003e 1.8/11/12/13\n\n## java使用\n``` java\n\n    @Bean\n    public MyShiroRealm myShiroRealm() {\n        return new MyShiroRealm();\n    }\n    \n    @Bean\n    public SessionManager sessionManager(SessionDAO redisSessionDAO, ObjectProvider\u003cSessionListener\u003e sessionListenersProvider) {\n        List\u003cSessionListener\u003e sessionListeners = sessionListenersProvider.stream().collect(Collectors.toList());\n        DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();\n        sessionManager.setSessionDAO(redisSessionDAO);\n        sessionManager.setSessionListeners(sessionListeners);\n        return mySessionManager;\n    }\n\n    /**\n    * 内置session监听器，保证删除session/cache冗余的数据信息\n    */\n    @Bean\n    public SessionListener sessionListener(SessionDAO redisSessionDAO, MyShiroRealm myShiroRealm) {\n        return new RedisSessionListener(redisSessionDAO, myShiroRealm);\n    }\n\n    @Bean\n    public RedisCacheManager cacheManager(RedissonClient redissonClient) {\n        return new RedisCacheManager(redissonClient);\n    }\n\n    @Bean\n    public RedisSessionDAO redisSessionDAO(RedisCacheManager cacheManager) {\n        return new RedisSessionDAO(cacheManager);\n    }\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffartherp%2Fshiro-redisson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffartherp%2Fshiro-redisson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffartherp%2Fshiro-redisson/lists"}