Executable Jar Restrictions
| This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 4.1.1! |
You need to consider the following restrictions when working with a Spring Boot Loader packaged application:
-
Zip entry compression: The
ZipEntryfor a nested jar must be saved by using theZipEntry.STOREDmethod. 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 entry in the outer jar. -
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 withClassLoader.getSystemClassLoader()fails.java.util.Loggingalways uses the system classloader. For this reason, you should consider a different logging implementation. -
Related Spring Documentation
- Spring Boot
- Spring Framework
- Spring Cloud
- Spring Cloud Build
- Spring Cloud Bus
- Spring Cloud Circuit Breaker
- Spring Cloud Commons
- Spring Cloud Config
- Spring Cloud Consul
- Spring Cloud Contract
- Spring Cloud Function
- Spring Cloud Gateway
- Spring Cloud Kubernetes
- Spring Cloud Netflix
- Spring Cloud OpenFeign
- Spring Cloud Stream
- Spring Cloud Task
- Spring Cloud Vault
- Spring Cloud Zookeeper
- Spring Data
- Spring Integration
- Spring Batch
- Spring Security
- Spring AI
- Spring AMQP
- Spring CLI
- Spring GraphQL
- Spring for Apache Kafka
- Spring Modulith
- Spring for Apache Pulsar
- Spring Shell All Docs...
