Package org.nutz.mvc

Examples of org.nutz.mvc.Setup


  private void evalSetup(NutConfig config, Class<?> mainModule) throws Exception {
    SetupBy sb = mainModule.getAnnotation(SetupBy.class);
    if (null != sb) {
      if (log.isInfoEnabled())
        log.info("Setup application...");
      Setup setup = Mirror.me(sb.value()).born();
      config.setAttributeIgnoreNull(Setup.class.getName(), setup);
      setup.init(config);
    }
  }
View Full Code Here


      log.infof("Nutz.Mvc[%s] is deposing ...", config.getAppName());
    Stopwatch sw = Stopwatch.begin();

    // Firstly, upload the user customized desctroy
    try {
      Setup setup = config.getAttributeAs(Setup.class, Setup.class.getName());
      if (null != setup)
        setup.destroy(config);
    }
    catch (Exception e) {
      throw new LoadingException(e);
    }
    // If the application has Ioc, depose it
View Full Code Here

    private void evalSetup(NutConfig config, Class<?> mainModule) throws Exception {
        SetupBy sb = mainModule.getAnnotation(SetupBy.class);
        if (null != sb) {
            if (log.isInfoEnabled())
                log.info("Setup application...");
            Setup setup = Loadings.evalObj(config, sb.value(), sb.args());
            config.setAttributeIgnoreNull(Setup.class.getName(), setup);
            setup.init(config);
        }
    }
View Full Code Here

            log.infof("Nutz.Mvc[%s] is deposing ...", config.getAppName());
        Stopwatch sw = Stopwatch.begin();

        // Firstly, upload the user customized desctroy
        try {
            Setup setup = config.getAttributeAs(Setup.class, Setup.class.getName());
            if (null != setup)
                setup.destroy(config);
        }
        catch (Exception e) {
            throw new LoadingException(e);
        }
        finally {
View Full Code Here

    protected void evalSetup(NutConfig config, Class<?> mainModule) throws Exception {
        SetupBy sb = mainModule.getAnnotation(SetupBy.class);
        if (null != sb) {
            if (log.isInfoEnabled())
                log.info("Setup application...");
            Setup setup = Loadings.evalObj(config, sb.value(), sb.args());
            config.setAttributeIgnoreNull(Setup.class.getName(), setup);
            setup.init(config);
        }
    }
View Full Code Here

            log.infof("Nutz.Mvc[%s] is deposing ...", config.getAppName());
        Stopwatch sw = Stopwatch.begin();

        // Firstly, upload the user customized desctroy
        try {
            Setup setup = config.getAttributeAs(Setup.class, Setup.class.getName());
            if (null != setup)
                setup.destroy(config);
        }
        catch (Exception e) {
            throw new LoadingException(e);
        }
        finally {
View Full Code Here

TOP

Related Classes of org.nutz.mvc.Setup

Copyright © 2018 www.massapicom. 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.