jfinal druid使用oracle的设置

用oracle还是有些坑,直接附上配置代码,以免再踩。

参考这篇博客

   
   
   
   
1 DruidPlugin druidPlugin = new DruidPlugin(url, user, pwd); 2 druidPlugin.setInitialSize( 3 ); 3 druidPlugin.setDriverClass( " oracle.jdbc.driver.OracleDriver " ); 4 druidPlugin.setValidationQuery( " select 1 from dual " ); 5 druidPlugin.setTestWhileIdle( true ); 6 druidPlugin.setTestOnBorrow( false ); 7 druidPlugin.setTestOnReturn( false ); 8 9 ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin); 10 11 arp.setContainerFactory( new CaseInsensitiveContainerFactory()); 12 arp.setDialect( new OracleDialect()); 13 14 15 // add mapping here 16 17 // start 18 druidPlugin.start(); 19 arp.start();

你可能感兴趣的:(jfinal druid使用oracle的设置)