[ERROR] Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]

在使用 maven 对 Spring Boot 项目打包时,抛出:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project springboot_devtools_demo1: Input length = 1 -> [Help 1] 错误

在使用 maven 对 Spring Boot 项目打包时,抛出:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project springboot_devtools_demo1: Input length = 1 -> [Help 1] 错误。详细错误信息如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project springboot_devtools_demo1: Input length = 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

解决办法

这个问题是由于项目的 application.properties 配置文件编码导致。文件编码为 GB2312,将它改为 UTF 编码即可。

注意:在改变编码之前,先将配置文件备份,不然可能导致配置文件出现中文乱码。配置文件改变成 UTF-8 编码后,将备份配置文件中的内容拷贝过来即可,将改变编码后的乱码配置全部覆盖即可。

天下之事常成于困约,而败于奢靡。——陆游
2 不喜欢
说说我的看法 -
全部评论(
没有评论
关于
本网站专注于 Java、数据库(MySQL、Oracle)、Linux、软件架构及大数据等多领域技术知识分享。涵盖丰富的原创与精选技术文章,助力技术传播与交流。无论是技术新手渴望入门,还是资深开发者寻求进阶,这里都能为您提供深度见解与实用经验,让复杂编码变得轻松易懂,携手共赴技术提升新高度。如有侵权,请来信告知:hxstrive@outlook.com
其他应用
公众号