datasource.json
var ioc = {
dataSource:{
type:"com.alibaba.druid.pool.DruidDataSource",
events:{
depose:"close"
},
fields:{
url:"jdbc:oracle:thin:@192.168.0.8:1521:ahnj",
username:"p2p1",
password:"zy_p2p",
maxActive:20,
testWhileIdle:true,
validationQuery:"select 1 from dual",
removeAbandoned:true ,
removeAbandonedTimeout:1800,
filters:"stat"
} 这个是数据库配置链接。
},
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:'dataSource'}]
}
}