dataSourceBank : {
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
},
fields : {
url : {java:"$conf.get('bank.db.url')"},
username : {java:"$conf.get('db.username')"},
password : {java:"$conf.get('db.password')"},
testWhileIdle : true,
validationQuery : {java:"$conf.get('db.validationQuery')"},
maxActive : {java:"$conf.get('db.maxActive')"},
filters : "mergeStat",
connectionProperties : "druid.stat.slowSqlMillis=2000"
}
},
daoBank : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:"dataSourceBank"}],
fields : {
interceptors : [
"log",
"time"
]
}
}
@IocBean(args={"refer:daoBank"})
public class BankAmountService extends EntityService<BankAmount> {
}