📄 defaultconfigtest.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -