背景:
1 maven 构建
2 项目 A
3 web项目 web-B 依赖项目a
过程
1 web-B 在Eclipse 编译并在servers中可以启动并正常运行。
2 使用m2.插件对项目web-B clean 再 install ,无报错。A项目已经install成功。
3 生成web-b.war,ok。
问题
部署到tomcat下,运行,报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [XXX.XX.Dao]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import XXX.common cannot be resolved
The import XXX.common cannot be resolved
The import XXX.common cannot be resolved
ConnectionA cannot be resolved to a type
ConnectionA cannot be resolved to a type
...
有人遇到过吗?请问怎么解决,谢谢!