gpt4 book ai didi

java - 使用 yguard 时出现 IllegalStateException : Unable to open nested entry 'BOOT-INF/lib/xxx.jar' .

转载 作者:太空宇宙 更新时间:2023-11-04 09:02:08 37 4
gpt4 key购买 nike

我正在努力使用 yguard 和 gradle 脚本来解决 spring boot jar 混淆问题。但经过长时间的努力才成功。

有人可以向我指出任何好的文档或示例

混淆适用于普通 jar ,但添加 spring boot jar 后出现很多问题。我没有混淆 org(boot jar 内的 spring boot loader 类) 文件夹。 我收到错误...

Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/HikariCP-3.4.2.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file

最佳答案

Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/HikariCP-3.4.2.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file

根据您突出显示的错误消息,我建议配置不压缩 jar。

jarwar 插件具有 entryCompression 属性。如果设置为ZipEntryCompression.STORED,则存档的条目将保持未压缩状态。

示例:

jar {
entryCompression = ZipEntryCompression.STORED
}

来自Gradle API Documentation

The compression level of the entries of the archive. If set to ZipEntryCompression.DEFLATED (the default), each entry is compressed using the DEFLATE algorithm. If set to ZipEntryCompression.STORED the entries of the archive are left uncompressed.

关于java - 使用 yguard 时出现 IllegalStateException : Unable to open nested entry 'BOOT-INF/lib/xxx.jar' .,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60679060/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com