【fix sonar】MyClassLoader文件
This commit is contained in:
+4
-2
@@ -1,5 +1,7 @@
|
|||||||
package com.jero.common.util;
|
package com.jero.common.util;
|
||||||
|
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 张代浩
|
* @Author 张代浩
|
||||||
*/
|
*/
|
||||||
@@ -10,7 +12,7 @@ public class MyClassLoader extends ClassLoader {
|
|||||||
myclass = Class.forName(className);
|
myclass = Class.forName(className);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException(className+" not found!");
|
throw new JeroBootException(className+" not found!");
|
||||||
}
|
}
|
||||||
return myclass;
|
return myclass;
|
||||||
}
|
}
|
||||||
@@ -85,7 +87,7 @@ public class MyClassLoader extends ClassLoader {
|
|||||||
try {
|
try {
|
||||||
realPath = java.net.URLDecoder.decode(realPath, "utf-8");
|
realPath = java.net.URLDecoder.decode(realPath, "utf-8");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new JeroBootException(e);
|
||||||
}
|
}
|
||||||
return realPath;
|
return realPath;
|
||||||
}// getAppPath定义结束
|
}// getAppPath定义结束
|
||||||
|
|||||||
Reference in New Issue
Block a user