Class ImagePackager
java.lang.Object
org.springframework.boot.loader.tools.Packager
org.springframework.boot.loader.tools.ImagePackager
Utility class that can be used to export a fully packaged archive to an OCI image.
- Since:
- 2.3.0
- Author:
- Phillip Webb, Scott Frederick
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.loader.tools.Packager
Packager.MainClassTimeoutWarningListener
-
Constructor Summary
ConstructorDescriptionImagePackager
(File source, File backupFile) Create a newImagePackager
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
packageImage
(Libraries libraries, BiConsumer<ZipEntry, EntryWriter> exporter) Create a packaged image.Methods inherited from class org.springframework.boot.loader.tools.Packager
addMainClassTimeoutWarningListener, findMainMethod, getBackupFile, getLayout, getSource, isAlreadyPackaged, isAlreadyPackaged, setBackupFile, setIncludeRelevantJarModeJars, setLayers, setLayout, setLayoutFactory, setMainClass, write, write
-
Constructor Details
-
ImagePackager
Create a newImagePackager
instance.- Parameters:
source
- the source file to packagebackupFile
- the backup of the source file to package
-
-
Method Details
-
packageImage
public void packageImage(Libraries libraries, BiConsumer<ZipEntry, EntryWriter> exporter) throws IOExceptionCreate a packaged image.- Parameters:
libraries
- the contained librariesexporter
- the exporter used to write the image- Throws:
IOException
- on IO error
-