dbcp获取dataSource

1)获取dataSource:

ApplicationContext ctx=
            new FileSystemXmlApplicationContext("/WebRoot/WEB-INF/classes/applicationContext.xml");
    DataSource dataSource = (BasicDataSource)ctx.getBean("datasource");

 

posted @ 2012-12-27 12:36  lpshou  阅读(722)  评论(0编辑  收藏  举报