testspring.java
来自「springGather 在JAVA环境开发的电信运营支持系统」· Java 代码 · 共 31 行
JAVA
31 行
package lianxi;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.InputStreamResource;
import java.io.*;
import org.com.gather.*;
import java.util.*;
public class TestSpring{
private static Config config = null;
public static void main(String[] args)throws Exception{
TestSpring test = new TestSpring();
config = test.init();
Log log = (Log)config.getLog();
Gather gather = config.getGather();
Collection col = gather.getData();
log.writeDebug("Hello Log4J");
DB db = config.getDB();
db.storeToDB(col);
}
public Config init(){
Properties pro = new Properties();
pro.setProperty("beanFactory.xml","D:/EXAMPLE/NetCTOSS/Gather/beanFactory.xml");
config = new SpringConfig(pro);
return config;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?