defaultconfigtest.java.svn-base

来自「EasyJWeb是基于java技术」· SVN-BASE 代码 · 共 33 行

SVN-BASE
33
字号
package com.easyjf.web.config;

import junit.framework.TestCase;

import com.easyjf.util.ResolverUtil;
import com.easyjf.web.IWebAction;

public class DefaultConfigTest extends TestCase {
public void testLoadConfig()
{	
	//System.out.println(new File(".").getAbsolutePath());
	String[] confs=new String[]{"classpath:/com/easyjf/web/config/mvc-app.xml"};
	//configures[0]=new FileInputStream(new File("webapps/WEB-INF/easyjf-web1.xml"));
	//configures[1]=new FileInputStream(new File("webapps/WEB-INF/easyjf-web2.xml"));
	DefaultWebConfig config=new DefaultWebConfig();
	config.setConfigures(confs);
	config.setResourceLoader(new FileResourceLoader());
	config.init();	
	//assertTrue(config.getModules().size()==2);
}
public void testScanPackage()
{
	ResolverUtil<IWebAction> r=new ResolverUtil();
	r.findImplementations(IWebAction.class, "com");
	java.util.Iterator it=r.getClasses().iterator();
	while(it.hasNext())
	{
		System.out.println(it.next());
	}
	//Thread.currentThread().getContextClassLoader().loadClass("");
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?