我想在build-gradle任务deployNodes
中将默认h2-数据库的配置替换为postgres实现
我要替换条目h2Port 10013
与
dataSourceProperties: {
dataSourceClassName: "org.postgresql.ds.PGSimpleDataSource",
dataSource.url: "jdbc:postgresql://localhost:5432/postgres_xyz?currentSchema=public",
dataSource.user: "xyz",
dataSource.password: "xyz",
dataSource.currentSchema: "public"
}
database: {
transactionIsolationLevel: "READ_COMMITTED"
}
我该怎么做/我可以使用哪种格式?
答案 0 :(得分:0)
您可以使用
build.gradle
块,在extraConfig=[ ... ]
脚本中将Postgresql DB属性添加到节点配置中。
node {
...
extraConfig = [
dataSourceProperties: [
dataSourceClassName : "org.postgresql.ds.PGSimpleDataSource",
'dataSource.url' : "jdbc:postgresql://localhost:5432/nodedb",
'dataSource.user' : "postgres",
'dataSource.password' : "pa$$w0rd"
],
database: [
transactionIsolationLevel : "READ_COMMITTED"
]
]
}