81,111
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
public static ComoPooledDataSource cpds ;
static{
cpds = new ComoPooledDataSource();
}
或者用工厂方法也OK :
public static ComoPooledDataSource cpds ;
pubblic static ComoPooledDataSource getCpds(){
if(null==cpds){
cpds = new ComoPooledDataSource();
}
return cpds;
}