public class MainSetup implements Setup {
static final Logger logger = LoggerFactory.getLogger(MainSetup.class);
public void init(NutConfig nc) {
new DealThread().run();
}
public void destroy(NutConfig nc) {
}
}
public class DealThread implements Runnable {
static final Logger logger = LoggerFactory.getLogger(DealThread.class);
@Inject
private Dao dao;
public void run() {
List lists = dao.query(SmTask.class));
//dao 空指针异常
}
}
大神看看