春季启动中OracleDataSource的连接池

时间:2019-01-25 10:06:13

标签: spring oracle

我编写了一个自定义类来创建数据源,如下所示,

@Primary
@Bean(name = "oracleDataSource")
public DataSource oracleDataSource() {
    DataSourceProperties properties = oracleDataSourceProperties();
    String password = PasswordDecryptor.decrypt(properties.getPassword());

    return DataSourceBuilder.create()
            .url(properties.getUrl())
            .password(password)
            .username(properties.getUsername())
            .driverClassName(properties.getDriverClassName())
            .build();
}

如何将连接池属性设置为上述oracle数据源?

0 个答案:

没有答案