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

org.apache.ibatis.io.ClassLoaderWrapper代码注释纠正 #12

Open
SexCastException opened this issue Oct 4, 2019 · 0 comments
Open

Comments

@SexCastException
Copy link

原文:
//defaultClassLoader没地方初始化啊?
ClassLoader defaultClassLoader;

我的:
/**

  • 类加载器的包装类,通过类加载器读取资源
  • 类加载器使用优先顺序:自定义类加载器,默认加载器,上下文类加载器,加载本类的类加载器,系统加载器{@link ClassLoaderWrapper#getClassLoaders(java.lang.ClassLoader)}
    */
    public class ClassLoaderWrapper {

/**

  • 默认类加载器通过{@link Resources#setDefaultClassLoader(java.lang.ClassLoader)}初始化
    */
    ClassLoader defaultClassLoader;
    }

// 通过Resource类的方法初始化
public static ClassLoader getDefaultClassLoader() {
return classLoaderWrapper.defaultClassLoader;
}

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

1 participant