我在Spring应用程序中启用了缓存,并使用Redis来实现此目的.但是,每当发生连接失败时,应用程序就会停止工作,而我认为最好跳过缓存并继续执行正常的执行流程.
那么,有没有人知道如何在Spring中优雅地做到这一点?
这是我得到的例外.
Caused by: org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
Run Code Online (Sandbox Code Playgroud)