springBootUtility thin command
The springBootUtility thin
command creates a thin application and library cache from a fat Spring Boot application.
This command stores the dependent library JAR files of the application to the target library cache and packages the remaining application artifacts into a thin application JAR file. When a read-only parent library cache is specified, the command creates a target library cache that contains only the libraries that are not available in the parent cache. This action creates efficient container layers for Spring Boot applications.
Usage examples
Create the thin Spring Boot application with the springBootUtility thin
command and the necessary options:
path_to_liberty/wlp/bin/springBootUtility thin --sourceAppPath=hellospringboot.jar --targetLibCachePath=path_to_liberty/wlp/usr/shared/resources/lib.index.cache --targetThinAppPath=path_to_liberty/wlp/usr/servers/helloserver/dropins/spring/hellospringboot.jar
Options
The following options are available for the springBootUtility thin
command:
Option | Description |
---|---|
--sourceAppPath=path | The path of the source application file to thin. This option is required. |
--parentLibCachePath=directory | The directory path of the parent read-only library cache. The parent library cache is searched first to locate existing libraries. If the library is not found, the library is stored in the writable library cache that is specified by the |
--targetLibCachePath=directory | The directory path that is used to save the library cache. If this option is not specified, a |
--targetThinAppPath=file | The path that is used to save the thin application file. If this option is not specified, a new file is created with the |
Exit codes
The following exit codes are available for the springBootUtility thin
command:
Code | Explanation |
---|---|
0 | This code indicates successful completion of the requested operation. |
>0 | Exit codes that are greater than 0 indicate that the request encountered an error. Messages are printed with more information on the error. |