我正在尝试使用micronaut-hirari配置postgres数据源。我正在尝试添加一些postgres特定的(reWriteBatchInserts)数据源属性:
datasources:
default:
url: jdbc:postgresql://localhost/mydb
username: <username>
password: <pwd>
driver-class-name: org.postgresql.Driver
auto-commit: true
maximum-pool-size: 50
minimum-idle: 2
idle-timeout: 600000
data-source-properties: { reWriteBatchInserts: true, disableColumnSanitiser: true }不幸的是,属性被重写为kebab-case:
{re-write-batch-inserts=true, disable-column-sanitiser=true}我知道我可以在jdbc url中传递属性,但是有没有办法使用data-source-properties属性呢?
谢谢,
克里斯托弗
发布于 2019-01-31 04:25:21
也许它应该行得通:
datasources:
default:
url: jdbc:postgresql://localhost/mydb
username: <username>
password: <pwd>
driver-class-name: org.postgresql.Driver
auto-commit: true
maximum-pool-size: 50
minimum-idle: 2
idle-timeout: 600000
data-source-properties:
reWriteBatchInserts: true
disableColumnSanitiser: true https://stackoverflow.com/questions/54407626
复制相似问题