Package org.nutz.ngqa.service

Examples of org.nutz.ngqa.service.CommonMongoService.dao()


public class NgqaSetup implements Setup {

  /**NutzMvc正常启动后就会执行这个方法,你可以认为所有东西都已经准备好了,你可以做一些额外的逻辑,例如启动某些后台线程*/
  public void init(NutConfig config) {
    CommonMongoService commons = config.getIoc().get(CommonMongoService.class, "commons");
    MongoDao dao = commons.dao();
   
    //初始化集合
    dao.create(User.class, false);
    dao.create(Question.class, false);
    dao.create(Answer.class, false);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.