mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Use the term "uber jar" in reference documentation and javadoc
Update reference documentation and javadoc to use the term "uber jar" rather than "fat jar". Closes gh-37653
This commit is contained in:
parent
780f75d5a2
commit
3d6859e80f
@ -68,9 +68,9 @@ import org.springframework.util.ReflectionUtils;
|
||||
* {@link #initialize(String[])} directly if your SpringApplication arguments are not
|
||||
* identical to your main method arguments.
|
||||
* <p>
|
||||
* By default, applications running in an IDE (i.e. those not packaged as "fat jars") will
|
||||
* automatically detect URLs that can change. It's also possible to manually configure
|
||||
* URLs or class file updates for remote restart scenarios.
|
||||
* By default, applications running in an IDE (i.e. those not packaged as "uber jars")
|
||||
* will automatically detect URLs that can change. It's also possible to manually
|
||||
* configure URLs or class file updates for remote restart scenarios.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
|
@ -1,6 +1,6 @@
|
||||
[[container-images.dockerfiles]]
|
||||
== Dockerfiles
|
||||
While it is possible to convert a Spring Boot fat jar into a docker image with just a few lines in the Dockerfile, we will use the <<container-images#container-images.efficient-images.layering,layering feature>> to create an optimized docker image.
|
||||
While it is possible to convert a Spring Boot uber jar into a docker image with just a few lines in the Dockerfile, we will use the <<container-images#container-images.efficient-images.layering,layering feature>> to create an optimized docker image.
|
||||
When you create a jar containing the layers index file, the `spring-boot-jarmode-layertools` jar will be added as a dependency to your jar.
|
||||
With this jar on the classpath, you can launch your application in a special mode which allows the bootstrap code to run something entirely different from your application, for example, something that extracts the layers.
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[[container-images.efficient-images]]
|
||||
== Efficient Container Images
|
||||
It is easily possible to package a Spring Boot fat jar as a docker image.
|
||||
However, there are various downsides to copying and running the fat jar as is in the docker image.
|
||||
There’s always a certain amount of overhead when running a fat jar without unpacking it, and in a containerized environment this can be noticeable.
|
||||
It is easily possible to package a Spring Boot uber jar as a docker image.
|
||||
However, there are various downsides to copying and running the uber jar as is in the docker image.
|
||||
There’s always a certain amount of overhead when running a uber jar without unpacking it, and in a containerized environment this can be noticeable.
|
||||
The other issue is that putting your application's code and all its dependencies in one layer in the Docker image is sub-optimal.
|
||||
Since you probably recompile your code more often than you upgrade the version of Spring Boot you use, it’s often better to separate things a bit more.
|
||||
If you put jar files in the layer before your application classes, Docker often only needs to change the very bottom layer and can pick others up from its cache.
|
||||
|
@ -64,7 +64,7 @@ When specified as environment variables or manifest entries, the following names
|
||||
| `LOADER_SYSTEM`
|
||||
|===
|
||||
|
||||
TIP: Build plugins automatically move the `Main-Class` attribute to `Start-Class` when the fat jar is built.
|
||||
TIP: Build plugins automatically move the `Main-Class` attribute to `Start-Class` when the uber jar is built.
|
||||
If you use that, specify the name of the class to launch by using the `Main-Class` attribute and leaving out `Start-Class`.
|
||||
|
||||
The following rules apply to working with `PropertiesLauncher`:
|
||||
|
@ -272,7 +272,7 @@ When building with Maven, it is recommended to add the following dependency in a
|
||||
</dependency>
|
||||
----
|
||||
|
||||
If you have defined auto-configurations directly in your application, make sure to configure the `spring-boot-maven-plugin` to prevent the `repackage` goal from adding the dependency into the fat jar:
|
||||
If you have defined auto-configurations directly in your application, make sure to configure the `spring-boot-maven-plugin` to prevent the `repackage` goal from adding the dependency into the uber jar:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
|
@ -380,7 +380,7 @@ To gracefully exit the application, press `ctrl-c`.
|
||||
[[getting-started.first-application.executable-jar]]
|
||||
=== Creating an Executable Jar
|
||||
We finish our example by creating a completely self-contained executable jar file that we could run in production.
|
||||
Executable jars (sometimes called "`fat jars`") are archives containing your compiled classes along with all of the jar dependencies that your code needs to run.
|
||||
Executable jars (sometimes called "`uber jars`" or "`fat jars`") are archives containing your compiled classes along with all of the jar dependencies that your code needs to run.
|
||||
|
||||
.Executable jars and Java
|
||||
****
|
||||
|
@ -9,7 +9,7 @@ This section describes those changes.
|
||||
== Reacting to the Java Plugin
|
||||
When Gradle's {java-plugin}[`java` plugin] is applied to a project, the Spring Boot plugin:
|
||||
|
||||
1. Creates a {boot-jar-javadoc}[`BootJar`] task named `bootJar` that will create an executable, fat jar for the project.
|
||||
1. Creates a {boot-jar-javadoc}[`BootJar`] task named `bootJar` that will create an executable, uber jar for the project.
|
||||
The jar will contain everything on the runtime classpath of the main source set; classes are packaged in `BOOT-INF/classes` and jars are packaged in `BOOT-INF/lib`
|
||||
2. Configures the `assemble` task to depend on the `bootJar` task.
|
||||
3. Configures the `jar` task to use `plain` as the convention for its archive classifier.
|
||||
|
@ -64,7 +64,7 @@ public class Library {
|
||||
* @param unpackRequired if the library needs to be unpacked before it can be used
|
||||
* @param local if the library is local (part of the same build) to the application
|
||||
* that is being packaged
|
||||
* @param included if the library is included in the fat jar
|
||||
* @param included if the library is included in the uber jar
|
||||
* @since 2.4.8
|
||||
*/
|
||||
public Library(String name, File file, LibraryScope scope, LibraryCoordinates coordinates, boolean unpackRequired,
|
||||
@ -142,7 +142,7 @@ public class Library {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if the library is included in the fat jar.
|
||||
* Return if the library is included in the uber jar.
|
||||
* @return if the library is included
|
||||
*/
|
||||
public boolean isIncluded() {
|
||||
|
@ -27,7 +27,7 @@ import java.util.stream.Stream;
|
||||
* <ol>
|
||||
* <li>"dependencies" - For non snapshot dependencies</li>
|
||||
* <li>"spring-boot-loader" - For classes from {@code spring-boot-loader} used to launch a
|
||||
* fat jar</li>
|
||||
* uber jar</li>
|
||||
* <li>"snapshot-dependencies" - For snapshot dependencies</li>
|
||||
* <li>"application" - For application classes and resources</li>
|
||||
* </ol>
|
||||
|
@ -22,7 +22,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Delegate class used to launch the fat jar in a specific mode.
|
||||
* Delegate class used to launch the uber jar in a specific mode.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.3.0
|
||||
|
@ -85,7 +85,7 @@ public class ArtifactsLibraries implements Libraries {
|
||||
/**
|
||||
* Creates a new {@code ArtifactsLibraries} from the given {@code artifacts}.
|
||||
* @param artifacts all artifacts that can be represented as libraries
|
||||
* @param includedArtifacts the actual artifacts to include in the fat jar
|
||||
* @param includedArtifacts the actual artifacts to include in the uber jar
|
||||
* @param localProjects projects for which {@link Library#isLocal() local} libraries
|
||||
* should be created
|
||||
* @param unpacks artifacts that should be unpacked on launch
|
||||
|
@ -106,7 +106,7 @@ public class RepackageMojo extends AbstractPackagerMojo {
|
||||
private boolean attach = true;
|
||||
|
||||
/**
|
||||
* A list of the libraries that must be unpacked from fat jars in order to run.
|
||||
* A list of the libraries that must be unpacked from uber jars in order to run.
|
||||
* Specify each library as a {@code <dependency>} with a {@code <groupId>} and a
|
||||
* {@code <artifactId>} and they will be unpacked at runtime.
|
||||
* @since 1.1.0
|
||||
|
@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests loader that supports fat jars.
|
||||
* Integration tests loader that supports uber jars.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Moritz Halbritter
|
||||
|
Loading…
Reference in New Issue
Block a user