zoukankan      html  css  js  c++  java
  • Redis——解决“org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisReferenceResolver': Unsatisfied dependency expressed through constructor parameter 0”

    错误栈:

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisReferenceResolver': Unsatisfied dependency expressed through constructor parameter 0: Could not convert argument value of type [xxx] to required type [org.springframework.data.redis.core.RedisOperations]: Failed to convert value of type 'com.youdao.outfox.intergame.store.cache.RedisTemplate' to required type 'org.springframework.data.redis.core.RedisOperations'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'xxx.store.cache.RedisTemplate' to required type 'org.springframework.data.redis.core.RedisOperations': no matching editors or conversion strategy found...

    解决方法:

    第一种:配置文件中禁用

    application.yml中添加

    spring:
      data:
        redis:
          repositories:
            enabled: false

    第二种:启动类中使用注解禁用

    xxApplication.java中添加

    @SpringBootApplication(exclude = {
            RedisAutoConfiguration.class,
            RedisRepositoriesAutoConfiguration.class
    })

     ~

  • 相关阅读:
    FFmpeg编程(二)FFmpeg中级开发
    Oracle锁表与解锁 对象锁与解锁
    index_combine and index_john
    oracle hint
    SAR
    组播IP地址
    Linux下使用tc(Traffic Control) 流量控制命令模拟网络延迟和丢包
    Linux服务器丢包故障的解决
    linux man page sections
    微服务架构统一安全认证设计与实践
  • 原文地址:https://www.cnblogs.com/gaoquanquan/p/11351154.html
Copyright © 2011-2022 走看看