解决方法: 删除启动类中的“import org.springframework.boot.autoconfigure.SpringBootApplication;” 再重新导入。 过一会就会看到红叉消失了。