其他分享
首页 > 其他分享> > Springboot部署jar包报错问题

Springboot部署jar包报错问题

作者:互联网

Springboot官方定义是轻量级框架,严格来说不算框架,是对Spring框架以及第三方jar包的统一整合。springboot搭建框架效率提高80%以上!

下面是学习过程中总结的问题:

1. springboot打jar包的报错问题[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project demo8: Failed to clean project: Failed to delete
F:\demo\demo8\target\demo8-0.0.1-SNAPSHOT.jar -> [Help 1]

问题原因: 从异常代码分析是因为乱码格式导致的,又因springboot的核心思想是“约定大于配置”, 需要我们配置的地方只能是配置文件application.properties或application.yml 

解决方案: 经查看,确实是在配置文件种使用了中文,有2种方法,删除中文或者设置IDEA的编码格式统一为UTF-8。具体位置如下:

设置好IDEA的编码之后,再运行打包:

此时报错的问题已经不存在。问题解决。

问题二: 打jar包出现  发行版本号问题异常,则需要检查版本号是否最少为1.8版本以上。

 

pom.xml文件务必指定springboot启动器类:

标签:Springboot,jar,Failed,报错,clean,demo8,springboot
来源: https://blog.csdn.net/qq_21630623/article/details/114440241