Browse Source

REPORT-69942 更新Druid到1.2.9

bugfix/KERNEL-11409-jackson
rinoux 3 years ago
parent
commit
57be5fa982
  1. 34
      fine-druid/src/main/java/com/fr/third/alibaba/druid/util/ClassLoaderFactory.java
  2. 12
      fine-druid/src/main/java/com/fr/third/alibaba/druid/util/ClassLoaderHelper.java

34
fine-druid/src/main/java/com/fr/third/alibaba/druid/util/ClassLoaderFactory.java

@ -0,0 +1,34 @@
package com.fr.third.alibaba.druid.util;
import java.util.ArrayList;
import java.util.List;
/**
* @deprecated 1.2.9版本已删除FR的com.fr.data.pool.DataSourceFactory依赖了实际上没地方用到为了兼容性暂时不删
*/
@Deprecated
public class ClassLoaderFactory {
private static List<ClassLoaderHelper> helpers = new ArrayList<ClassLoaderHelper>();
public static void registerCLassLoaderHelper(ClassLoaderHelper helper) {
if(helper != null){
helpers.add(helper);
}
}
public static Class<?> loadClass(String className) throws ClassNotFoundException {
for(ClassLoaderHelper helper : helpers) {
try {
Class<?> clazz = helper.loadClass(className);
if(clazz != null){
return clazz;
}
} catch (ClassNotFoundException e) {
// skip
}
}
throw new ClassNotFoundException(className);
}
}

12
fine-druid/src/main/java/com/fr/third/alibaba/druid/util/ClassLoaderHelper.java

@ -0,0 +1,12 @@
package com.fr.third.alibaba.druid.util;
/**
* @deprecated 1.2.9版本已删除FR的com.fr.data.pool.DataSourceFactory依赖了实际上没地方用到为了兼容性暂时不删
*/
@Deprecated
public interface ClassLoaderHelper {
Class<?> loadClass(String className) throws ClassNotFoundException;
}
Loading…
Cancel
Save