DipSy_Java
2017-05-07 14:09eclipse sts插件创建spring start project springboot项目报错
初学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条回答
为你推荐
- 请问我的spring-aop开发的代码是哪里错了?
- java
- java-ee
- spring
- jar
- eclipse
- 5个回答
- eclipse中的项目还有包等 是否支持按照创建时间排序?
- struts
- 0个回答
- eclipse-spring-boot与SSM框架对比有什么优势或者不同。
- spring
- eclipse
- 框架
- 3个回答
- IDEA创建的SpringBoot项目,pom.xml在Eclipse上报错
- 开发工具
- spring
- maven
- intellij-idea
- eclipse
- 8个回答
- eclipse添加web插件的问题
- webservice
- java
- eclipse
- 1个回答