Polishing
See gh-22171
This commit is contained in:
@@ -9,13 +9,11 @@ class BasicDataSourceConfiguration {
|
|||||||
|
|
||||||
// tag::dataSourceBean[]
|
// tag::dataSourceBean[]
|
||||||
@Bean(destroyMethod = "close")
|
@Bean(destroyMethod = "close")
|
||||||
fun dataSource(): BasicDataSource {
|
fun dataSource() = BasicDataSource().apply {
|
||||||
val dataSource = BasicDataSource()
|
driverClassName = "org.hsqldb.jdbcDriver"
|
||||||
dataSource.driverClassName = "org.hsqldb.jdbcDriver"
|
url = "jdbc:hsqldb:hsql://localhost:"
|
||||||
dataSource.url = "jdbc:hsqldb:hsql://localhost:"
|
username = "sa"
|
||||||
dataSource.username = "sa"
|
password = ""
|
||||||
dataSource.password = ""
|
|
||||||
return dataSource
|
|
||||||
}
|
}
|
||||||
// end::dataSourceBean[]
|
// end::dataSourceBean[]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,11 @@ internal class ComboPooledDataSourceConfiguration {
|
|||||||
|
|
||||||
// tag::dataSourceBean[]
|
// tag::dataSourceBean[]
|
||||||
@Bean(destroyMethod = "close")
|
@Bean(destroyMethod = "close")
|
||||||
fun dataSource(): ComboPooledDataSource {
|
fun dataSource() = ComboPooledDataSource().apply {
|
||||||
val dataSource = ComboPooledDataSource()
|
driverClass = "org.hsqldb.jdbcDriver"
|
||||||
dataSource.driverClass = "org.hsqldb.jdbcDriver"
|
jdbcUrl = "jdbc:hsqldb:hsql://localhost:"
|
||||||
dataSource.jdbcUrl = "jdbc:hsqldb:hsql://localhost:"
|
user = "sa"
|
||||||
dataSource.user = "sa"
|
password = ""
|
||||||
dataSource.password = ""
|
|
||||||
return dataSource
|
|
||||||
}
|
}
|
||||||
// end::dataSourceBean[]
|
// end::dataSourceBean[]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user