alexxiyang/shiro-redis

可以把连接redis客户端改为lettuce吗

hwz453843794 opened this issue · 2 comments

可以把连接redis客户端改为lettuce吗

我自己克隆了一个分支,shiro-redis,增加加了lettuce的支持
使用方法:

@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;
}

pom.xml:

<dependency>
  <groupId>com.github.yiyingcanfeng</groupId>
  <artifactId>shiro-redis</artifactId>
  <version>3.4</version>
</dependency>

maven**仓库的账号已经申请了,还在审核,再过一段时间就能上传到**仓库了
我自己另搞了个nexus私服,想先用上的话可以在settings.xml里的mirror下面加上这段配置

<mirror>
  <id>myhwnexus</id>
  <mirrorOf>central</mirrorOf>
  <name>my_nexus</name>
  <url>http://119.3.224.57:8081/repository/maven-public</url>
</mirror>
<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>阿里云公共仓库</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>

已上传至maven**仓库
pom.xml:

<dependency>
    <groupId>com.github.yiyingcanfeng</groupId>
    <artifactId>shiro-redis</artifactId>
    <version>3.5</version>
</dependency>