Skip to content

Commit 991008b

Browse files
authored
Update and rename E.5. Executable jar restrictions.md to E.5. Executable Jar Restrictions.md
1 parent 1168dc5 commit 991008b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: X. Appendices/E.5. Executable Jar Restrictions.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### 附录 E.5. 可执行jar的限制
2+
3+
在使用Spring Boot Loader打包的应用程序时,您需要考虑以下限制:
4+
5+
- Zip条目压缩:嵌套jar的`ZipEntry`必须通过使用`ZipEntry.STORED`方法保存。这是必要的,这样我们就可以直接搜索到嵌套jar中的单个内容。嵌套jar文件本身的内容仍然可以被压缩,外部jar中的任何其他条目也可以被压缩。
6+
- 系统类加载器:已启动的应用程序在加载类时应该使用`Thread.getContextClassLoader()`(大多数库和框架默认都是这样做的)。试图用`ClassLoader.getSystemClassLoader()`加载嵌套的jar类会失败,`java.util.Logging`总是使用系统类加载器。为此,你应该考虑使用不同的日志实现。

Diff for: X. Appendices/E.5. Executable jar restrictions.md

-4
This file was deleted.

0 commit comments

Comments
 (0)