报错
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) on project demo: Could not exec java: Application finished with non-zero exit code: 1 -> [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/MojoExecutionException
看到这个觉得很慌,我用的IDE是sts4,和eclipse是差不多的。看到一篇博客:关于Springboot打包错误的问题 | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin,里面写和我不太一样。我代码都是正确的,那么为什么运行会报错呢?
问题不在于spring-boot-maven-plugin这个插件,而在于spring-boot:run的运行机制,只要打开任务管理器,结束掉进程Java(TM) Platform SE binary,就能正常maven build了~