接口 ConnectionProperties
public interface ConnectionProperties
ConnectionProperties
serves as a simple data container that allows essential JDBC connection properties to be configured consistently, independent of the actualDataSource
implementation.- 从以下版本开始:
- 3.0
- 作者:
- Keith Donald, Sam Brannen
- 另请参阅:
DataSourceFactory
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
setDriverClass(Class<? extends Driver> driverClass)
Set the JDBC driver class to use to connect to the database.void
setPassword(String password)
Set the password to use to connect to the database.void
setUrl(String url)
Set the JDBC connection URL for the database.void
setUsername(String username)
Set the username to use to connect to the database.
方法详细资料
setDriverClass
void setDriverClass(Class<? extends Driver> driverClass)
Set the JDBC driver class to use to connect to the database.- 参数:
driverClass
- the jdbc driver class
setUrl
void setUrl(String url)
Set the JDBC connection URL for the database.- 参数:
url
- the connection url
setUsername
void setUsername(String username)
Set the username to use to connect to the database.- 参数:
username
- the username
setPassword
void setPassword(String password)
Set the password to use to connect to the database.- 参数:
password
- the password