Examples of NutConfig


Examples of org.nutz.mvc.NutConfig

        makeIoc(ib.type(), ib.args());
    }
   
    public static void makeIoc(Class<? extends IocProvider> clazz, String[] args) {
        final ServletContext context = Mvcs.getServletContext();
        NutConfig config = new AbstractNutConfig(context) {
           
            public ServletContext getServletContext() {
                return context;
            }
           
            public List<String> getInitParameterNames() {
                return new ArrayList<String>(0);
            }
           
            public String getInitParameter(String name) {
                return null;
            }
           
            public String getAppName() {
                return "struts-nutz";
            }
        };
        ioc = Mirror.me(clazz).born().create(config, args);
        // 如果是 Ioc2 的实现,增加新的 ValueMaker
        if (ioc instanceof Ioc2) {
            ((Ioc2) ioc).addValueProxyMaker(new ServletValueProxyMaker(config.getServletContext()));
        }
    }
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.