Proxool houseKeepingSleepTime bug修正



    博客分类: 
  • java
Bean 

 

 

修正后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方法的返回值类型吗

 

官方源码:

 

Java代码   收藏代码
  1. /** 
  2.     * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime 
  3.     */  
  4.    public long getHouseKeepingSleepTime() {  
  5.        return houseKeepingSleepTime;  
  6.    }  
  7.   
  8.    /** 
  9.     * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime 
  10.     */  
  11.    public void setHouseKeepingSleepTime(int houseKeepingSleepTime) {  
  12.        this.houseKeepingSleepTime = houseKeepingSleepTime;  
  13.    }  

 修正代码:

 

Java代码   收藏代码
  1. /** 
  2.     * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime 
  3.     */  
  4.    public long getHouseKeepingSleepTime() {  
  5.        return houseKeepingSleepTime;  
  6.    }  
  7.   
  8.    /** 
  9.     * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime 
  10.     *此处将int类型改为long类型 
  11.     */  
  12.    public void setHouseKeepingSleepTime(long houseKeepingSleepTime) {  
  13.        this.houseKeepingSleepTime = houseKeepingSleepTime;  
  14.    }  

修正后jar包在附件内

你可能感兴趣的:(proxool)