Skip to content

Commit

Permalink
suit sprignboot 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
致节 committed Nov 24, 2023
1 parent ad0126e commit 1cba60e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sofa-ark-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<maven.plugin.plugin>3.6.1</maven.plugin.plugin>
<surefire.version>2.22.2</surefire.version>
<netty.version>4.1.90.Final</netty.version>
<spring.boot.version>3.0.9</spring.boot.version>
<spring.boot.version>3.2.0</spring.boot.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<spring.boot.version>3.0.9</spring.boot.version>
<spring.boot.version>3.2.0</spring.boot.version>
</properties>

<artifactId>sofa-ark-springboot-starter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -47,7 +47,7 @@ public class ArkApplicationStartListener implements ApplicationListener<SpringAp
public void onApplicationEvent(SpringApplicationEvent event) {
try {
if (ArkConfigs.isEmbedEnable()
|| LaunchedURLClassLoader.class.isAssignableFrom(this.getClass().getClassLoader()
|| LaunchedClassLoader.class.isAssignableFrom(this.getClass().getClassLoader()
.getClass())) {
ArkConfigs.setEmbedEnable(true);
startUpArkEmbed(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package com.alipay.sofa.ark.springboot.loader;

import org.springframework.boot.loader.LaunchedURLClassLoader;
import org.springframework.boot.loader.archive.Archive;
import org.springframework.boot.loader.launch.Archive;
import org.springframework.boot.loader.launch.LaunchedClassLoader;

import java.io.IOException;
import java.net.URL;
Expand All @@ -36,7 +36,7 @@
*
* @author bingjie.lbj
*/
public class CachedLaunchedURLClassLoader extends LaunchedURLClassLoader {
public class CachedLaunchedURLClassLoader extends LaunchedClassLoader {
private final Map<String, LoadClassResult> classCache = new ConcurrentHashMap<>(
3000);
private final Map<String, Optional<URL>> resourceUrlCache = new ConcurrentHashMap<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<URL> urls) throws Exception {
return new CachedLaunchedURLClassLoader(isExploded(), getArchive(), urls.toArray(new URL[0]), getClass()
.getClassLoader());
}
}
2 changes: 1 addition & 1 deletion sofa-ark-plugin/web-ark-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<artifactId>web-ark-plugin</artifactId>

<properties>
<spring.boot.version>3.0.9</spring.boot.version>
<spring.boot.version>3.2.0</spring.boot.version>
</properties>

<dependencies>
Expand Down

0 comments on commit 1cba60e

Please sign in to comment.