All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nutz.mvc.ioc.provider.AnnotationIocProvider Maven / Gradle / Ivy

package org.nutz.mvc.ioc.provider;

import org.nutz.ioc.Ioc;
import org.nutz.ioc.impl.NutIoc;
import org.nutz.ioc.impl.ScopeContext;
import org.nutz.ioc.loader.annotation.AnnotationIocLoader;
import org.nutz.mvc.IocProvider;
import org.nutz.mvc.NutConfig;


/**
 * 请使用ComboIocProvider
 */
@Deprecated
public class AnnotationIocProvider implements IocProvider {

    public Ioc create(NutConfig config, String[] args) {
    	if (args == null || args.length == 0)
    		args = new String[]{config.getMainModule().getPackage().getName()};
        return new NutIoc(new AnnotationIocLoader(args), new ScopeContext("app"), "app");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy