Files
spring-boot/spring-boot-project/spring-boot-docs/src/docs/asciidoc/executable-jar/restrictions.adoc
Moritz Halbritter 52d9ba58d8 Move appendix subsections under appendix section
This involved a small code change to the generated configuration
properties snippets. The section id has to start with
'appendix.', otherwise the section-id asciidoctor extension
complains. To ensure that the anchors that are derived from the
section IDs remain backwards compatible, the anchor-rewrite
properties have been updated.

See gh-29667
2022-02-09 12:04:05 +00:00

21 lines
966 B
Plaintext

[[appendix.executable-jar.restrictions]]
== Executable Jar Restrictions
You need to consider the following restrictions when working with a Spring Boot Loader packaged application:
[[appendix.executable-jar-zip-entry-compression]]
* Zip entry compression:
The `ZipEntry` for a nested jar must be saved by using the `ZipEntry.STORED` method.
This is required so that we can seek directly to individual content within the nested jar.
The content of the nested jar file itself can still be compressed, as can any other entries in the outer jar.
[[appendix.executable-jar-system-classloader]]
* System classLoader:
Launched applications should use `Thread.getContextClassLoader()` when loading classes (most libraries and frameworks do so by default).
Trying to load nested jar classes with `ClassLoader.getSystemClassLoader()` fails.
`java.util.Logging` always uses the system classloader.
For this reason, you should consider a different logging implementation.