: Connection refused: no further information(缓存-@Cacheable异常)

时间:2025-02-17 17:34:48

在配置springboot缓存时,出现如下错误信息

: Connection refused: no further information
	at (Native Method) ~[na:1.8.0_161]
	at (:717) ~[na:1.8.0_161]
	at (:330) ~[netty-transport-4.1.:4.1.]
	at $(:334) ~[netty-transport-4.1.:4.1.]
	at (:702) ~[netty-transport-4.1.:4.1.]
	at (:650) ~[netty-transport-4.1.:4.1.]
	at (:576) ~[netty-transport-4.1.:4.1.]
	at (:493) ~[netty-transport-4.1.:4.1.]
	at $(:989) ~[netty-common-4.1.:4.1.]
	at $(:74) ~[netty-common-4.1.:4.1.]
	at (:30) ~[netty-common-4.1.:4.1.]
	at (:748) [na:1.8.0_161]

解决方法:将中自动添加的redis依赖注释或者删掉即可

        <dependency>
            <groupId></groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>