报错:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'fabricService' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-servic
e.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [textile.ssm.service.impl.FabricServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import com.ruanjian cannot be resolved
name cannot be resolved to a variable。
我import 全部都删除了为什么还会跳出这个错误?
/WEB-INF/classes/spring/applicationContext-service.xml 这里面定义了一个bean fabricService有问题,问题后面不是提示了吗,Could not instantiate bean class [textile.ssm.service.impl.FabricServiceImpl]: Constructor threw exception 不能够初始化,构造函数抛出异常,后边是说Unresolved compilation problems:The import com.ruanjian cannot be resolved name cannot be resolved to a variable。这个名字不能当一个变量处理之类的,你还是仔细查查代码吧
the import cannot be resolved
在家用的是jdk1.7 到单位后把项目导入后,出现
the import xxxxx cannot be resolved
原来是myeclipse使用默认的jdk 1.6 所以出错
更改如下
然后 把jdk改一下就可以了......
答案就在这里:the import cannot be resolved
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?
idea 的话,就是部署有问题。删掉部署包。再部署就好了