RT...
Scans.me().scanPackage(BaseJob.class)扫描不到类
问题出在 org.nutz.lang.Lang.loadClass 方法上
异常:
java.lang.NoClassDefFoundError: app.job.BaseJob
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.nutz.lang.Lang.loadClass(Lang.java:2018)
at org.nutz.resource.Scans.rs2class(Scans.java:402)
at org.nutz.resource.Scans.scanPackage(Scans.java:308)
at org.nutz.resource.Scans.scanPackage(Scans.java:279)
at app.module.MobileViewAction.home(MobileViewAction.java:65)
用以前的版本
public static Class<?> loadClass(String className) throws ClassNotFoundException {
try {
return Thread.currentThread().getContextClassLoader().loadClass(className);
}
catch (ClassNotFoundException e) {
return Class.forName(className);
}
}
可以扫描到结果