当前位置:   article > 正文

springboot整合redis:RedisConnectionException: Unable to connect to localhost:6379

unable to connect to localhost:6379

背景描述

在整合springboot整合redis过程中,已完成的前序工作有:

  1. 本机idea的工程内增加pom依赖
   <!-- 引入redis依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
  • 1
  • 2
  • 3
  • 4
  • 5

2.完成测试controller的编写

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core
  • 1
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/791162?site
推荐阅读
相关标签
  

闽ICP备14008679号