环境idea+nutz1.58.
dao.json如下,期望连本地lewen库,实际连的却是nutzbook库。还有第二个问题在末尾
var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : ["custom/"]
}
},
dataSource: {
type: "com.alibaba.druid.pool.DruidDataSource",
events: {
depose: 'close'
},
fields: {
driverClassName : 'com.mysql.jdbc.Driver',
url: 'jdbc:mysql://127.0.0.1:3306/lewen?useUnicode=true&characterEncoding=UTF8&useSSL=false',
//jdbcUrl : 'jdbc:mysql://192.168.1.87:3306/elovo_sales_sys?useUnicode=true&characterEncoding=UTF8',
username: 'root',
password: '123456',
maxWait: 15000, // 若不配置此项,如果数据库未启动,druid会一直等可用连接,卡住启动过程,
defaultAutoCommit : false // 提高fastInsert的性能
}
},
fileSqlManager: {
type: "org.nutz.dao.impl.FileSqlManager",
args: ['sqls/all.sqls']
},
dao: {
type: 'org.nutz.dao.impl.NutDao',
args : [
{
refer: 'dataSource'
}, {
refer: 'fileSqlManager'
}
]
}
};
2017-2-22 2:45:16.676 DEBUG [RMI TCP Connection(3)-127.0.0.1] JDBC Name --> MySQL Connector Java
2017-2-22 2:45:16.676 DEBUG [RMI TCP Connection(3)-127.0.0.1] JDBC URL --> jdbc:mysql://127.0.0.1:3306/nutzbook
idea已配置项目的编码为utf-8,但是日志打印还是GBK,分别见下图
IDEA的图发不了,如下是日志打印
2017-2-22 2:45:16.47 DEBUG [RMI TCP Connection(3)-127.0.0.1] Web Container Information:
2017-2-22 2:45:16.48 DEBUG [RMI TCP Connection(3)-127.0.0.1] - Default Charset : GBK