From 1cba60ee6142268b7d80fab6559699d7894371bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=B4=E8=8A=82?= Date: Fri, 24 Nov 2023 11:45:33 +0800 Subject: [PATCH] suit sprignboot 3.2.0 --- sofa-ark-bom/pom.xml | 2 +- .../ark-springboot-starter/pom.xml | 2 +- .../listener/ArkApplicationStartListener.java | 4 ++-- .../loader/CachedLaunchedURLClassLoader.java | 6 +++--- .../alipay/sofa/ark/springboot/loader/JarLauncher.java | 10 +++++++--- sofa-ark-plugin/web-ark-plugin/pom.xml | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/sofa-ark-bom/pom.xml b/sofa-ark-bom/pom.xml index 969dad058..656e9b054 100644 --- a/sofa-ark-bom/pom.xml +++ b/sofa-ark-bom/pom.xml @@ -47,7 +47,7 @@ 3.6.1 2.22.2 4.1.90.Final - 3.0.9 + 3.2.0 diff --git a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/pom.xml b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/pom.xml index bf4d325d0..e94122c98 100644 --- a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/pom.xml +++ b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/pom.xml @@ -11,7 +11,7 @@ 4.0.0 - 3.0.9 + 3.2.0 sofa-ark-springboot-starter diff --git a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkApplicationStartListener.java b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkApplicationStartListener.java index db4f1aaee..0abeeabe8 100644 --- a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkApplicationStartListener.java +++ b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkApplicationStartListener.java @@ -27,7 +27,7 @@ import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.boot.context.event.SpringApplicationEvent; -import org.springframework.boot.loader.LaunchedURLClassLoader; +import org.springframework.boot.loader.launch.LaunchedClassLoader; import org.springframework.context.ApplicationListener; /** @@ -47,7 +47,7 @@ public class ArkApplicationStartListener implements ApplicationListener classCache = new ConcurrentHashMap<>( 3000); private final Map> resourceUrlCache = new ConcurrentHashMap<>( diff --git a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/loader/JarLauncher.java b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/loader/JarLauncher.java index 0fba578d6..41274359f 100644 --- a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/loader/JarLauncher.java +++ b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/loader/JarLauncher.java @@ -17,20 +17,24 @@ package com.alipay.sofa.ark.springboot.loader; import java.net.URL; +import java.util.Collection; /** * A JarLauncher to load classes with CachedLaunchedURLClassLoader * * @author bingjie.lbj */ -public class JarLauncher extends org.springframework.boot.loader.JarLauncher { +public class JarLauncher extends org.springframework.boot.loader.launch.JarLauncher { + public JarLauncher() throws Exception { + } + public static void main(String[] args) throws Exception { new JarLauncher().launch(args); } @Override - protected ClassLoader createClassLoader(URL[] urls) throws Exception { - return new CachedLaunchedURLClassLoader(isExploded(), getArchive(), urls, getClass() + protected ClassLoader createClassLoader(Collection urls) throws Exception { + return new CachedLaunchedURLClassLoader(isExploded(), getArchive(), urls.toArray(new URL[0]), getClass() .getClassLoader()); } } diff --git a/sofa-ark-plugin/web-ark-plugin/pom.xml b/sofa-ark-plugin/web-ark-plugin/pom.xml index a13570fbc..e940552d4 100644 --- a/sofa-ark-plugin/web-ark-plugin/pom.xml +++ b/sofa-ark-plugin/web-ark-plugin/pom.xml @@ -13,7 +13,7 @@ web-ark-plugin - 3.0.9 + 3.2.0