专栏首页InvQ的专栏spring redis java.lang.IllegalStateException: Cannot load configuration class: redis.RedisTemplet报错

spring redis java.lang.IllegalStateException: Cannot load configuration class: redis.RedisTemplet报错

报错日志

java.lang.IllegalStateException: Cannot load configuration class: redis.RedisTemplet
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:128) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at Controller.Application.main(Application.java:31) [classes/:na]
Caused by: java.lang.IllegalStateException: Unable to load cache item
    at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:79) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:337) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:138) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    ... 12 common frames omitted

将pom中的依赖

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

改为

  <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 堆排序(HeapSort)之java实现

    堆是一种重要的数据结构,为一棵完全二叉树, 底层如果用数组存储数据的话,假设某个元素为序号为i(Java数组从0开始,i为0到n-1), 如果它有左子树,那么...

    MickyInvQ
  • arraylist linkedlist vector

    List,就如图名字所示一样,是元素的有序列表。当我们讨论List时,将其与Set作对比是一个很好的办法,Set集合中的元素是无序且唯一的。 下图是Co...

    MickyInvQ
  • @postconstruct VS @eventListener 以及 dubbo服务暴露(1)

    看标题,你可能并太可能知道我想要说什么,但是肯定和这3个关键字有关系。 这一切都要从线上一个服务的报错开始:

    MickyInvQ
  • springboot+jpa 错误信息org.springframework.beans.factory.BeanCreationException报错信息实体类报错原因

    用户5899361
  • 有限元 | 梁单元有限元程序算例

    之前发过一个梁单元有限元分析程序。在好友测试时发现一个问题,就是程序中的real型变量默认为kind=4,我们姑且称为单精度型。这样限制了程序的使用,在一些问题...

    fem178
  • 找寻gvcf失败的原因(java啊java,配置啊配置)

    因为我只想保留recal后的bam和,call出来的gvcf文件,但是发现有些样本根本就走不通这个流程,就需要debug了。

    生信技能树
  • 【RL-TCPnet网络教程】第28章 RL-TCPnet之DNS应用

    本章节为大家讲解RL-TCPnet的DNS应用,学习本章节前,务必要优先学习第27章的DNS基础知识。有了这些基础知识之后,再搞本章节会有事半功倍的效果。

    armfly
  • [main] INFO com.course.Application - Started Application in 11.272 seconds (JVM running for 13.498)

    2020-01-10 11:27:12.918 [main] INFO com.course.Application - Started Application...

    yuanyuan
  • JVM 基础知识

    JVM 是可运行 Java 中假想的计算机,就是在真实的计算机上模拟计算机功能,包括一套字节指令,一套寄存器,一个栈,一个垃圾回收,堆,一个存储区域,JVM 是...

    王小明_HIT
  • 二维数组中的查找代码

    desperate633

扫码关注云+社区

领取腾讯云代金券