纠结了一下这个问题,害得我装了两遍myeclipse都没用,最后发现是工程下的.classpath 文件闹的,工程转为maven项目后,
<classpathentry kind="src" path="src"/>
被改为:
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
改回去就好了。