BootRun Class — spring-boot Architecture
Architecture documentation for the BootRun class in BootRun.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java lines 36–78
@DisableCachingByDefault(because = "Application should always run")
public abstract class BootRun extends JavaExec {
public BootRun() {
getOptimizedLaunch().convention(true);
}
/**
* Returns the property for whether the JVM's launch should be optimized. The property
* defaults to {@code true}.
* @return whether the JVM's launch should be optimized
* @since 3.0.0
*/
@Input
public abstract Property<Boolean> getOptimizedLaunch();
/**
* Adds the {@link SourceDirectorySet#getSrcDirs() source directories} of the given
* {@code sourceSet's} {@link SourceSet#getResources() resources} to the start of the
* classpath in place of the {@link SourceSet#getOutput output's}
* {@link SourceSetOutput#getResourcesDir() resources directory}.
* @param sourceSet the source set
*/
public void sourceResources(SourceSet sourceSet) {
File resourcesDir = sourceSet.getOutput().getResourcesDir();
Set<File> srcDirs = sourceSet.getResources().getSrcDirs();
setClasspath(getProject().files(srcDirs, getClasspath()).filter((file) -> !file.equals(resourcesDir)));
}
@Override
public void exec() {
if (getOptimizedLaunch().get()) {
setJvmArgs(getJvmArgs());
jvmArgs("-XX:TieredStopAtLevel=1");
}
if (System.console() != null) {
// Record that the console is available here for AnsiOutput to detect later
getEnvironment().put("spring.output.ansi.console-available", true);
}
super.exec();
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free