When I open a jar package, there shows the BOOT-INF
and META-INF
folders, what's the function of them?
This is a single jar Spring Boot application. In addition to the META-INF files for the loader (as in any other jar file) the application itself is placed under BOOT-INF. Note that such a jar cannot be used as a traditional jar any more. Follow this answer to receive notifications.
META-INF is intended to contain the MANIFEST. MF file and the services subdirectory related to the ServiceLoader class, but other frameworks, including Spring, use it as well.
The META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.
Spring Boot is known for its “fat” JAR deployments, where a single executable artifact contains both the application code and all of its dependencies. Boot is also widely used to develop microservices.
The META-INF
folder is the home for the MANIFEST.MF
file. This file contains meta data about the contents of the JAR. For example, there is an entry called Main-Class
that specifies the name of the Java class with the static main()
for executable JAR files.
for more details
BOOT-INF :
Spring Boot applications load from the BOOT-INF
folder. Therefore the application classes must be placed in a nested BOOT-INF/classes
directory. Dependencies should be placed in a nested BOOT-INF/lib
directory.
more about Spring Boot packaging
This is a single jar Spring Boot application.
In addition to the META-INF files for the loader (as in any other jar file) the application itself is placed under BOOT-INF.
Note that such a jar cannot be used as a traditional jar any more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With