📄 testserver.java
字号:
package lianxi;
import org.com.gather.*;
import java.util.*;
import java.lang.reflect.*;
public class TestServer{
public static void main(String[] args)throws Exception{
Properties pro = new Properties();
String value = System.getProperty("beanFactory.xml");
// System.out.println(value.length());
if(value == null){
value = "D:/EXAMPLE/NetCTOSS/springGather/beanFactory.xml";
}
pro.setProperty("beanFactory.xml",value);
String config_Class = System.getProperty("config");
if(config_Class == null){
config_Class = "org.com.gather.SpringConfig";
}
ClassLoader cl = ClassLoader.getSystemClassLoader();
Class c = cl.loadClass(config_Class);
Constructor[] ctr = c.getConstructors();
Config config = (Config)ctr[0].newInstance(new Object[]{pro});
// Config config = new SpringConfig(pro);
Server server = config.getServer();
server.start();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -