警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [ApplicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.withContainingClass(Ljava/lang/Class;)Lorg/springframework/core/MethodParameter;
Caused by: java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.withContainingClass(Ljava/lang/Class;)Lorg/springframework/core/MethodParameter;
![在这里插入图片描述](https://img-blog.csdnimg.cn/2fedf9cd9da74b5eae51cdd4b9f8e3c3.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5Lmd5Y2D6YeM5LqR5ZKM5pyI,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)
解决方案:j将 spring-test 和 spring-context version 改为相同版本