testserver.java

来自「springGather 在JAVA环境开发的电信运营支持系统」· Java 代码 · 共 35 行

JAVA
35
字号
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 + =
减小字号Ctrl + -
显示快捷键?