java - Spring 启动 tomcat-embed-core-9.0.21.jar : zip file is empty

标签 java spring maven spring-boot tomcat

我有简单的 Springboot 应用程序,但是每当我尝试运行该应用程序时 我收到以下错误,我尝试了 mvn clean install,还尝试了重新导入和 生成源和更新文件夹选项

/Users/a0r00rf/Downloads/SpringStartedCRUD/demoCRUD/src/main/java/com/abhimanyu/demoCRUD/com/abhimanyu/demoCRUD/com/abhimanyu/demoCRUD/services/EmployeeServiceImpl.java
Error:(1, 1) java: cannot access com.abhimanyu.demoCRUD.com.abhimanyu.demoCRUD.com.abhimanyu.demoCRUD.services
Error reading file /Users/a0r00rf/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.21/tomcat-embed-core-9.0.21.jar: zip file is empty
/Users/a0r00rf/Downloads/SpringStartedCRUD/demoCRUD/src/main/java/com/abhimanyu/demoCRUD/com/abhimanyu/demoCRUD/com/abhimanyu/demoCRUD/services/EmployeeService.java
Error:(1, 1) java: cannot access com.abhimanyu.demoCRUD.com.abhimanyu.demoCRUD.com.abhimanyu.demoCRUD
Error reading file /Users/a0r00rf/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.21/tomcat-embed-core-9.0.21.jar: zip file is empty
Error:(7, 8) java: cannot access java.lang
Error reading file /Users/a0r00rf/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.21/tomcat-embed-core-9.0.21.jar: zip file is empty ```

最佳答案

.m2/repository下找到Tomcat,将其删除并再次mvn install

关于java - Spring 启动 tomcat-embed-core-9.0.21.jar : zip file is empty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57150042/

相关文章:

Spring MVC : Redirect in @ResponseBody

maven - Jenkins/Maven 构建因 "Could not find the selected project in the reactor"错误而死亡

java - com.sun.xml.ws :jaxws-rt:pom:2. 2.10 的 POM 无效

java - "Variable may not have been initialized"

Java Web 应用程序似乎在 Tomcat 中快速闲置

Java程序使用列表查找 'Lucky'从0到n的数字

java - Spring Cloud任务taskLifecycleListener在数据流服务器中运行时出错

java - 从 Maven 项目资源文件夹 (src/main/resources) 加载 excel(.xlsx/.xls) 文件

java - Xstream 错误地将一个列表项解释为另一个列表项的一部分

java - 了解执行 Google Datastore 查询时的 "CancellationException: Task was cancelled"错误