11-02 10:34:34.406 DEBUG - (UrlMappingImpl.java:101)-get [http-nio-80-exec-21] Found mapping for [POST] path=/zsj/questionnaire/info : IndexModule.getQuizInfoPageData(IndexModule.java:38)
11-02 10:34:34.406 DEBUG - (NutIoc.java:166)-get [http-nio-80-exec-21] Get 'indexModule'<class com.pingshan.pvq.module.IndexModule>
11-02 10:34:53.543 DEBUG - (DruidDataSource.java:1057)-getConnectionDirect [http-nio-80-exec-21] skip not validate connection.
11-02 10:35:12.680 DEBUG - (DruidDataSource.java:1057)-getConnectionDirect [http-nio-80-exec-21] skip not validate connection.
11-02 10:35:12.681 DEBUG - (NutDaoExecutor.java:391)-printSQL [http-nio-80-exec-21] SELECT * FROM dt_quiz_info WHERE id=? AND delete_flag=? LIMIT 0, 1
9 回复
db.url=jdbc:mysql://127.0.0.1:3306/db_questionnaire?useUnicode=true&useSSL=false&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
db.username=root
db.password=123456
db.validationQuery=select 1
db.maxActive=1000
db.filters=mergeStat
db.connectionProperties=druid.stat.slowSqlMillis\=2000
dao.js
var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : [ "custom/" ]
}
},
dataSource : {
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
},
fields : {
url : {
java : "$conf.get('db.url')"
},
driverClass : "com.mysql.cj.jdbc.Driver",
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 : {
java : "$conf.get('db.filters')"
},
connectionProperties : {
java : "$conf.get('db.connectionProperties')"
}
}
},
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [ {
refer : "dataSource"
} ]
}
};
添加回复
请先登陆