欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Proxool houseKeepingSleepTime bug修正

程序员文章站 2022-03-03 12:32:18
...

 

 

修正后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包在附件内

相关标签: Bean