Skip to content

Commit f3cd4c5

Browse files
committed
#321 fix json serialization
1 parent 69c5aba commit f3cd4c5

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/main/kotlin/com/github/mgramin/sqlboot/model/connection/SimpleEndpoint.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ open class SimpleEndpoint(
4747
override fun properties(): Map<String, Any> =
4848
Gson().fromJson(properties, object : TypeToken<Map<String, Any>>() {}.type)
4949

50+
fun getProperties(): Map<String, Any> =
51+
Gson().fromJson(properties, object : TypeToken<Map<String, Any>>() {}.type)
52+
5053
private var dataSource: DataSource? = null
5154

5255
@JsonIgnore

src/main/resources/application.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ conf:
4848
driverClassName: org.h2.Driver
4949
properties: >
5050
{
51-
"url": "jdbc:h2:mem:;INIT=RUNSCRIPT FROM 'classpath:schema.sql';"
52-
"color": "red",
53-
"description": "Production demo db",
54-
"css_class": "fas fa-fw fa-2x fa-bicycle"
51+
"sql.dialect": "postgres",
52+
"fs.base.folder": "conf/sql-config/database",
53+
"jdbc.url": "jdbc:postgresql://81.23.10.106:5432/postgres",
54+
"jdbc.driver.class.name": "org.postgresql.Driver",
55+
"jdbc.user": "postgres",
56+
"jdbc.password": "postgres",
57+
"os.query.rest.port": "8082",
58+
"visible": false,
59+
"description": "Embedded db for unit tests only"
5560
}
5661
5762
server:

0 commit comments

Comments
 (0)