dao.js
dynamitAutomaticDataSource : {
type : "com.alibaba.druid.pool.DruidDataSource",
fields : {
driverClassName : "com.microsoft.sqlserver.jdbc.SQLServerDriver",
url :"jdbc:sqlserver://10.10.103.151:1433;databaseName:zhongchuliang",
username :"sa",
password :"bms.123",
initialSize : 1,
maxActive: 20,
maxWait: 60000,
minIdle: 1,
poolPreparedStatements: false
},
events : {
depose : 'close'
}
},
dynamitAutomaticDao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer : "dynamitAutomaticDataSource"}]
}
报错信息
com.microsoft.sqlserver.jdbc.SQLServerException: 连接字符串包含的名称或值的格式错误。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
at com.microsoft.sqlserver.jdbc.Util.parseUrl(Util.java:445)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.parseAndMergeProperties(SQLServerDriver.java:1026)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1008)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1558)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623)
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)
2020-07-22 16:57:57 ERROR [DruidDataSource] - create connection SQLException, url: jdbc:sqlserver://10.10.103.151:1433;databaseName:zhongchuliang, errorCode 0, state null