Package org.nutz.mvc.config

Examples of org.nutz.mvc.config.AbstractNutConfig


        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

Related Classes of org.nutz.mvc.config.AbstractNutConfig

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.