Search in sources :

Example 1 with FtpDao

use of com.rainsoft.dao.FtpDao in project beijingThirdPeriod by weidongcao.

the class TestSpringOracle method testSpringConnectionOracle.

private static void testSpringConnectionOracle() {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring-module.xml");
    FtpDao ftpDao = (FtpDao) context.getBean("ftpDao");
    // 获取数据库一天的数据
    RegContentFtp ftp = ftpDao.getFtpById(1905067);
    JSONObject jsonObject = JSONObject.fromObject(ftp);
    System.out.println(jsonObject.toString());
    context.close();
}
Also used : AbstractApplicationContext(org.springframework.context.support.AbstractApplicationContext) JSONObject(net.sf.json.JSONObject) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) RegContentFtp(com.rainsoft.domain.RegContentFtp) FtpDao(com.rainsoft.dao.FtpDao)

Aggregations

FtpDao (com.rainsoft.dao.FtpDao)1 RegContentFtp (com.rainsoft.domain.RegContentFtp)1 JSONObject (net.sf.json.JSONObject)1 AbstractApplicationContext (org.springframework.context.support.AbstractApplicationContext)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1