首页 > 代码库 > eclipse import的项目报autowired cannot be resolved to a type的错误

eclipse import的项目报autowired cannot be resolved to a type的错误

eclipse报autowired cannot be resolved to a type的错误,一般情况是依赖的JDK或者jar包有问题,检查build path可以排查文件,我今天遇到这个情况,是因为我新导入的项目,没有在eclipse里maven关联,在eclipse里右键点击项目,然后选择第一项关联maven就好了。或者也许可以直接在import的时候选择maven目录下的引入maven项目选项。