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 😃