zoukankan      html  css  js  c++  java
  • springboot 2.12版本 项目不能注入RedisTemplate Bean问题

     在springboot项目中,需要使用RedisTemplate类时,提示不能够自动注入,

    项目中在引入RedisTemplate类时,引入的jar包依赖为:

    1      <dependency>
    2             <groupId>org.springframework.data</groupId>
    3             <artifactId>spring-data-redis</artifactId>
    4 <!--            <version>2.1.4.RELEASE</version>-->
    5         </dependency>

    将依赖更改为:

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

    RedisTemplate类成功注入!

  • 相关阅读:
    TSQL语句
    约束
    数据库创建
    递归
    函数
    结构体
    集合
    jquery中的select
    正则表达式
    多表单提交
  • 原文地址:https://www.cnblogs.com/linsky/p/12712872.html
Copyright © 2011-2022 走看看