Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis.client:jedis包依赖冲突 #1588

Closed
mornslit opened this issue May 28, 2020 · 2 comments
Closed

redis.client:jedis包依赖冲突 #1588

mornslit opened this issue May 28, 2020 · 2 comments

Comments

@mornslit
Copy link

mornslit commented May 28, 2020

简要描述

WxJava需要用redis.client:jedis的低版本(<3.0.x),但spring-boot2.2.x以上要用redis.client:jedis的高版本(>3.0.x)。

模块版本情况

  • WxJava 模块名: weixin-java-common
  • WxJava 版本号: 3.8.0

详细描述

JedisDistributedLock.java里用到redis.clients.util.Pool这个类,只有在redis.clients:jedis的2.9.x版本里才有,但是2.9.x版本在spring-boot2.2.2以上又找不到redis.clients.jedis.util.SafeEncoder这个类,必须用3.0.x以上版本才可以。所以用高版本spring的时候冲突无解了。
3.0.x以上版本,redis.clients.util.Pool已经变成redis.clients.jedis.util.Pool。

建议分布式锁用redisson来实现,jedis-lock已经很久没有更新了。

@binarywang
Copy link
Owner

jedis的实现仅供参考,如果需要与spring版本搭配,请自行实现,或者提供兼容的更好的实现,然后提交PR供其他朋友参考

@binarywang
Copy link
Owner

类似问题:#1647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants