This problem confused me. Even more exprienced coders in my team couldn’t say why. Here is the problem description:
I pulled the code into my machine and didn’t change anything and I couldn’t run it locally, however, my co-workers could. So I tracked down the problem found the RedisConfig class threw Exeption:

When debugging, this method threw an Exeption.

So, the TL thought there was something wrong with Redisson dns which could not be accessed.
Therefore, I turned off the windows firewall, used all the way to make it right(I thought), but still not working.
After tons of trouble shooting, finally, I have found the reason: jar package conflict. Here is the tip page, thanks to the guy who posted it:
https://www.freesion.com/article/2273642720/
Solution:
Comment out these dependencies

And introduce new dependencies
<!--netty Jar包冲突,保证redisson依赖在jpush maven加载顺序之上,否则jpush会覆盖redisson的netty jar,导致jar冲突-->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.2.17</version>
</dependency>
Click “run application”, it went nicely 😃
本文描述了一位开发者在本地运行代码时遇到的Redisson配置类抛出异常的问题,经过排查发现是由于Redisson与JPush的jar包冲突导致。通过调整依赖引入顺序,将Redisson的netty依赖置于JPush之前,成功解决了冲突。
997

被折叠的 条评论
为什么被折叠?



