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

还有类加载器不应该通过当前线程获取 #63

Open
TanqiZhou opened this issue May 5, 2023 · 4 comments
Open

还有类加载器不应该通过当前线程获取 #63

TanqiZhou opened this issue May 5, 2023 · 4 comments

Comments

@TanqiZhou
Copy link

No description provided.

@subchen
Copy link
Owner

subchen commented May 5, 2023

这个是遇到什么具体的问题吗?

@TanqiZhou
Copy link
Author

image
获取不到类

@subchen
Copy link
Owner

subchen commented May 5, 2023

明白你的意思,但是不知道你的运行环境是啥?

  • 单纯的tomcat?
  • spring boot?存在多个 application contex吗?
  • 无法加载的 class 是 用户class 还是 jdk 或者 第三方 jar 里面的 class?

默认使用 thread context class loader 是用于加载用户class,否则会造成无法加载n。当然在某些特殊的情况下存在无法加载的情况。确实可以考虑用多层 classloader 来尝试加载会更可靠

@subchen
Copy link
Owner

subchen commented May 5, 2023

@TanqiZhou jetbrick-commons 2.2.0 released, 你可以试试这个版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants