项目在添加了测试类后 install 出现了问题,提示错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test 这个时候只需要跳过测试类就可以了,一段小小的代码就可以完美解决了,在 pom 文件中添加 <build> <plugins> <plugin> <groupId>org.springframework