See gh-43498
This commit is contained in:
Johnny Lim
2024-12-13 23:40:38 +09:00
committed by Phillip Webb
parent e62bda9c04
commit 4d15ee5bf0
12 changed files with 52 additions and 50 deletions

View File

@@ -116,8 +116,9 @@ class EmbeddedServerContainerInvocationContextProvider
private AbstractApplicationLauncher getAbstractApplicationLauncher(Application application,
Class<? extends AbstractApplicationLauncher> launcherClass) {
String cacheKey = application.getContainer() + ":" + application.getPackaging() + ":" + launcherClass.getName();
if (this.launcherCache.containsKey(cacheKey)) {
return this.launcherCache.get(cacheKey);
AbstractApplicationLauncher cachedLauncher = this.launcherCache.get(cacheKey);
if (cachedLauncher != null) {
return cachedLauncher;
}
AbstractApplicationLauncher launcher = ReflectionUtils.newInstance(launcherClass, application,
new File(buildOutput.getRootLocation(), "app-launcher-" + UUID.randomUUID()));