一、背景
最近項目中使用了redisson的哨兵模式來作為redis操作的客戶端,然后一個意外出現了,啟動報:Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'create' threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0。具體錯誤如下:

二、出現原因以及解決方式
經過不懈的努力,最終定位到出現這個問題是因為配置redisson客戶端的時候把redis的master的名稱配錯了,就出現了這個問題,把redis.master.name修改正確以后就完美解決這個問題了。因為我在網上沒有搜索到解決辦法,最后自己解決了就記錄一下,希望可以幫到你!
