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
})

 

 ~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 報錯Error creating bean with name 'orderController': Unsatisfied dependency expressed through field 'orderService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexServiceImpl': Unsatisfied dependency expressed through field 'indexDao'; nested exception is org.s 關於本次【Unsatisfied dependency expressed through field 'iClientFeignEmployeeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.oppo】 【實戰問題】【14】org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxMapper' Springboot異常:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController' org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statisticalMapper' defined in file 【spring boot】使用注解@ConfigurationProperties讀取配置文件時候 報錯 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc mybatis Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'homeControll org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.southwind.mmall002.service.Impl.ProductCategoryServiceImplTest': Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'advertiseRestControll
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM