Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改springboot2.3+以上版本以layout=ZIP打包的时候,加密后无法启动的BUG。 #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/main/java/io/xjar/boot/XExtLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

import io.xjar.XLauncher;
import org.springframework.boot.loader.PropertiesLauncher;
import org.springframework.boot.loader.archive.Archive;

import java.net.URL;
import java.net.URLClassLoader;
import java.util.List;

/**
* Spring-Boot Properties 启动器
Expand All @@ -30,9 +27,7 @@ public void launch() throws Exception {
}

@Override
protected ClassLoader createClassLoader(List<Archive> archives) throws Exception {
URLClassLoader classLoader = (URLClassLoader) super.createClassLoader(archives);
URL[] urls = classLoader.getURLs();
protected ClassLoader createClassLoader(URL[] urls) throws Exception {
return new XBootClassLoader(urls, this.getClass().getClassLoader(), xLauncher.xDecryptor, xLauncher.xEncryptor, xLauncher.xKey);
}
}