0
我試過使用c3p0.properties文件,我發現的問題是我必須在代碼中設置所有屬性如下,如果我在屬性文件中添加新屬性,我需要設置屬性代碼。C3p0獨立使用c3p0-config.xml
ComboPooledDataSource cpds = new ComboPooledDataSource();
cpds.setJdbcUrl(props.getProperty("jdbcUrl"));
cpds.setUser(props.getProperty("username"));
cpds.setPassword(props.getProperty("password"));
那麼,有任何解決方案中使用C3P0-config.xml文件,以便新的屬性可以被添加/現有類/罐automatilcally除去。在hibernate中類似的工作。
有什麼想法?