zoukankan      html  css  js  c++  java
  • 警告: Exception encountered during context initialization

    今天写Spring遇到了一个坑爹的问题,那么因为啥原因呢?
    错误提示我错误的加载了Bean

    警告: Exception encountered during context initialization - cancelling refresh attempt:
     org.springframework.beans.factory.BeanCreationException: 
    

    我去看了一下我的切面类:
    在这里插入图片描述

    advice后面应该是ref而不是value,需要的是一个引用而不是String,难怪后面会报错:
    Cannot convert value of type ‘java.lang.String’ to required type ‘org.aopalliance.aop.Advice’ for property ‘advice’: no matching editors or conversion strategy found
    真是大意。。
    遇到这种错不是注解写少了就是写错了,亦或是applicationContext.xml中名字写错了要么就是value写成了ref,或者ref写成了value。

  • 相关阅读:
    多态
    java8的十大新特性
    Floyd最短路径算法
    ES6(六)函数扩展
    ES6(五)数组扩展
    ES6(四)数值扩展
    ES6(一)解构赋值
    store封装
    ipad方案
    pyinstaller编译打包为pyd
  • 原文地址:https://www.cnblogs.com/taobean/p/12364252.html
Copyright © 2011-2022 走看看