请大侠帮我看看这到底是什么错误,我的包都导入了,找了半天没找到错误的根 源,求解?我这是springmvc的

Causedby:org.springframework.beans.BeanInstantiationException:Couldnotinstantiatebean... Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.controller.UserController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import org.springframework.web.bind.annotation.PathVariable cannot be resolved
PathVariable cannot be resolved to a type
PathVariable cannot be resolved to a type

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030)
... 43 more
Caused by: java.lang.Error: Unresolved compilation problems:
The import org.springframework.web.bind.annotation.PathVariable cannot be resolved
PathVariable cannot be resolved to a type
PathVariable cannot be resolved to a type

at com.controller.UserController.<init>(UserController.java:7)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 45 more

可能是jar包有问题,但是不知道是哪个包有问题.请大侠帮我看看 十分感谢!!!!!!
展开
 我来答
wuqing0826
推荐于2016-08-16 · TA获得超过692个赞
知道小有建树答主
回答量:753
采纳率:0%
帮助的人:730万
展开全部
不是你jar问题,看提示

Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:

[com.controller.UserController这个类的注释有问题,解析出错
更多追问追答
追问
java.lang.NoSuchMethodError: org.springframework.web.context.support.WebApplicationContextUtils.initServletPropertySources(Lorg/springframework/core/env/MutablePropertySources;
追答
  1. 缺少对应的jar包

  2. jar包冲突

  3. jar包版本不对

本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式