zoukankan      html  css  js  c++  java
  • 异常解决:Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

    一、异常如下

    控制台日志:

    严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:IDEAIDEAProjectSSSPcrudoutartifactsSSSPcrud_war_explodedWEB-INFclassescomIveyssspcontrollerEmployeeController.class]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

    ……

    Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

    二、解决方案

    能够很明显看出,翻译一下是不兼容的类转换引起的异常,是 jar 包冲突

    原先,没有显式引入 spring-aop 依赖,只是引入了 spring-aspects 4.0.0版本的依赖,但是在引入 spring-data-jpa 后,就自动将 spring-aop 4.0.0 的版本改为 spring-aop 3.1.4,然后就出现了这个异常。

    解决很简单,显式引入 spring-aop,将它的版本控制为和其它 spring 组件版本一致就可以了。

  • 相关阅读:
    装java开发环境 报client/jvm.dll找不到
    json expected name at 1 1
    svn右键菜单不显
    win10 随记
    eclipse配置打开选中文件存储的目录快捷配置
    mybatis 常见面试题
    java 求取昨天日期
    字符串反转记录总结
    @RequestMapping 无法加载
    expected at least 1 bean which qualifies as autowire candidate for this depe (spring无法注入)
  • 原文地址:https://www.cnblogs.com/lveyHang/p/11843264.html
Copyright © 2011-2022 走看看