現象:maven項目出現紅叉,同時項目中沒出現代碼錯誤
解決方案:
可嘗試在本地maven項目pom.xml中添加如下:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build>