Proxool houseKeepingSleepTime bug修正 - - ITeye技术网站

来源: Proxool houseKeepingSleepTime bug修正 – – ITeye技术网站

修正后jar包在附件内

 

异常代码:

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ‘houseKeepingSleepTime’ of bean class [org.logicalcobwebs.proxool.ProxoolDataSource]: Bean property ‘houseKeepingSleepTime’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

译:在类org.logicalcobwebs.proxool.ProxoolDataSource],中 houseKeepingSleepTime属性无效,houseKeepingSleepTime属性不可写或 houseKeepingSleepTime有一个无效的settter方法,houseKeepingSleepTime的setter方法的参数类型 匹配getter方法的返回值类型吗

 

官方源码:

/**
* @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
*/
public long getHouseKeepingSleepTime() {
return houseKeepingSleepTime;
}

/**
* @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
*/
public void setHouseKeepingSleepTime(int houseKeepingSleepTime) {
this.houseKeepingSleepTime = houseKeepingSleepTime;
}

修正代码:

/**
* @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
*/
public long getHouseKeepingSleepTime() {
return houseKeepingSleepTime;
}

/**
* @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
*此处将int类型改为long类型
*/
public void setHouseKeepingSleepTime(long houseKeepingSleepTime) {
this.houseKeepingSleepTime = houseKeepingSleepTime;
}

修正后jar包在附件内

 

赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏