src/org/nutz/mvc/NutMvcListener.java
public void contextDestroyed(ServletContextEvent event) {
        if (ioc() != null) {
            Ioc ioc = ioc();
            if (ioc instanceof NutIoc) {
                boolean deposed = (Boolean) Mirror.me(ioc).getValue(ioc, "deposed");
                if (!deposed)
                    ioc.depose();
            }
        }
    }
public void contextDestroyed(ServletContextEvent event) {
        if (ioc() != null) {
            Ioc ioc = ioc();
            if (ioc instanceof NutIoc) {
                boolean deposed = (Boolean) Mirror.me(ioc).getValue(ioc, "deposed");
                if (!deposed)
                    ioc.depose();
            }
        }
    }
容器销毁时,检查Ioc是否已经关闭,没有的话就关闭之.