AuxiliaryDBPlugin 是一个 Play Framework 的插件,用于实现通过 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
代码示例: ResultSet res = AuxiliaryDB.executeQuery(sqlStringRequest); while(res.next()){ //TO-DO handle results }