我定义了以下 oracle 连接池工厂。问题是我是否必须将整个工厂实例注入 bean 或以某种方式注入OracleConnectionPoolDataSource
bean?
<bean id="oraclePooledDataSourceFactory" class="oracle.ucp.jdbc.PoolDataSourceFactory" factory-method="getPoolDataSource">
<!-- DataSource Class to be used -->
<property name="connectionFactoryClassName" value="oracle.jdbc.pool.OracleConnectionPoolDataSource"/>
<!-- Connection -->
<property name="URL">
<value>${jdbc.connection.url}</value>
</property>
<property name="user">
<value>${jdbc.connection.username}</value>
</property>
<property name="password">
<value>${jdbc.connection.password}</value>
</property>
豆注:??
@Autowired
@Required
@Qualifier("oraclePooledDataSource") <------ ????
public void setDatabaseSource(OracleConnectionPoolDataSource databaseSource) {
this.databaseSource = databaseSource;
}