DipSy_Java
DipSy_Java
2017-05-07 14:09

eclipse sts插件创建spring start project springboot项目报错

  • spring
  • 插件

初学springboot框架,用sts插件搭建了一个 springboot 项目测试一下是否成功。
直接执行main方法说找不到或无法加载主类,当然我的Application类都是自动生成的,注解都有,这个都没问题,但是就是说找不到或无法加载主类。
然后我用maven build启动,报了如下错:
[INFO] Scanning for projects...
[INFO]

[INFO] ------------------------------------------------------------------------
[INFO] Building spring-boot-sample 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.3.RELEASE:run (default-cli) > test-compile @ spring-boot-sample >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spring-boot-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ spring-boot-sample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to E:\Java learn\All workspacce\dev_springboot\spring-boot-sample\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] 读取E:\Java learn\Maven\apache-maven\org\springframework\boot\spring-boot-autoconfigure\1.5.3.RELEASE\spring-boot-autoconfigure-1.5.3.RELEASE.jar时出错; error in opening zip file
[ERROR] 读取E:\Java learn\Maven\apache-maven\org\springframework\boot\spring-boot-autoconfigure\1.5.3.RELEASE\spring-boot-autoconfigure-1.5.3.RELEASE.jar时出错; cannot read zip file
[ERROR] /E:/Java learn/All workspacce/dev_springboot/spring-boot-sample/src/main/java/com/example/simple/SpringBootSampleApplication.java:[4,46] 程序包org.springframework.boot.autoconfigure不存在
[ERROR] /E:/Java learn/All workspacce/dev_springboot/spring-boot-sample/src/main/java/com/example/simple/SpringBootSampleApplication.java:[6,2] 找不到符号
符号: 类 SpringBootApplication
[INFO] 4 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.632 s
[INFO] Finished at: 2017-05-07T22:06:15+08:00
[INFO] Final Memory: 22M/191M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project spring-boot-sample: Compilation failure: Compilation failure:
[ERROR] 读取E:\Java learn\Maven\apache-maven\org\springframework\boot\spring-boot-autoconfigure\1.5.3.RELEASE\spring-boot-autoconfigure-1.5.3.RELEASE.jar时出错; error in opening zip file
[ERROR] 读取E:\Java learn\Maven\apache-maven\org\springframework\boot\spring-boot-autoconfigure\1.5.3.RELEASE\spring-boot-autoconfigure-1.5.3.RELEASE.jar时出错; cannot read zip file
[ERROR] /E:/Java learn/All workspacce/dev_springboot/spring-boot-sample/src/main/java/com/example/simple/SpringBootSampleApplication.java:[4,46] 程序包org.springframework.boot.autoconfigure不存在
[ERROR] /E:/Java learn/All workspacce/dev_springboot/spring-boot-sample/src/main/java/com/example/simple/SpringBootSampleApplication.java:[6,2] 找不到符号
[ERROR] 符号: 类 SpringBootApplication
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

不知道怎么解决,有大神能说下 这个springboot 环境到底怎么搭建吗?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换