-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Description
Spring boot version: 1.2.3.RELEASE
Language: Groovy, 2.4.3
Oracle driver: ojdbc 14
When an Oracle datasource is created it seems to be missing the username.
OracleConnectionPoolDataSource oracleDataSource = DataSourceBuilder
.create()
.type(OracleConnectionPoolDataSource)
.driverClassName('oracle.jdbc.OracleDriver')
.url('jdbc:oracle:thin:@localhost:1521:xe')
.username('repository')
.password('********')
.build()
Root cause of that is that calculateMatches method BeanPropertyMatches class is unable to link 'user' (which is expected by OracleDataSource) with 'username' which is provided by DataSourceBuilder.
Simplest workaround:
private DataSource createNewDataSource(DatasourceConnectionDetails details) {
OracleConnectionPoolDataSource oracleDataSource = DataSourceBuilder
.create()
.type(OracleConnectionPoolDataSource)
.driverClassName(details.driverClassName)
.url(details.url)
.password(details.password)
.build()
oracleDataSource.user = 'repository'
oracleDataSource
}
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement