1.将项目添加为maven项目 右键pom.xml文件、add as maven project 2.maven项目莫名其妙变成非maven项目 file -> setteing -> ignored files,看看这里是不是你项目的pom.xml被勾选了,如果勾选了去掉就好了。