AuxiliaryDBPlugin是一个PlayFramework的插件,用于实现通过JDBC链接到各个数据源。
配置方法:(application.conf) module.AuxiliaryDBPlugin=${play.path}/modules/AuxiliaryDBPlugin连接语法: auxiliaryDB.url=jdbc:oracle:thin:@db.host.com:1564:SID auxiliaryDB.driver=oracle.jdbc.driver.OracleDriver auxiliaryDB.user=P auxiliaryDB.pass=P代码示例: ResultSetres=AuxiliaryDB.executeQuery(sqlStringRequest); while(res.next()){ //TO-DOhandleresults }
评论