mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-11-30 10:48:36 +08:00
fix: wkcache在特定场景下不生效的bug
This commit is contained in:
parent
c78ad24876
commit
9bb4002d16
@ -91,6 +91,8 @@ public class NbApp extends Thread {
|
||||
|
||||
protected NbAppEventListener listener = new NbAppEventListener() {};
|
||||
|
||||
protected boolean started;
|
||||
|
||||
/**
|
||||
* 创建一个NbApp,把调用本构造方法的类作为mainClass
|
||||
*/
|
||||
@ -209,6 +211,7 @@ public class NbApp extends Thread {
|
||||
|
||||
sw.stop();
|
||||
log.infof("%s started : %sms", ctx.getConf().get("nutz.application.name", "NB"), sw.du());
|
||||
started = true;
|
||||
return true;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
@ -430,6 +433,20 @@ public class NbApp extends Thread {
|
||||
Object obj;
|
||||
if (klass.getAnnotation(IocBean.class) == null) {
|
||||
obj = Mirror.me(klass).born();
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
aware(obj);
|
||||
if (obj instanceof IocLoaderProvider) {
|
||||
IocLoader loader = ((IocLoaderProvider) obj).getIocLoader();
|
||||
ctx.getComboIocLoader().addLoader(loader);
|
||||
}
|
||||
ctx.addStarter(obj);
|
||||
}
|
||||
for (Class<?> klass : starterClasses) {
|
||||
Object obj;
|
||||
if (klass.getAnnotation(IocBean.class) == null) {
|
||||
continue;
|
||||
} else {
|
||||
obj = ctx.getIoc().get(klass);
|
||||
}
|
||||
@ -470,4 +487,8 @@ public class NbApp extends Thread {
|
||||
throw new NullPointerException("NULL NbAppEventListener!!!");
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return started;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user