Skip to content

Commit 4221e59

Browse files
authored
Sync dburl system (manyschema, manybase) with other microservices (#15)
1 parent a664321 commit 4221e59

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

src/main/resources/application.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,19 @@ network-store-server:
5454
preloading-strategy: COLLECTION
5555
base-uri: http://localhost:8080/
5656

57-
# this structure is shared among all microservices, if you change it, change it everywhere
58-
# customQuery allows a microservice to set query parameters specific to itself
59-
# if customQuery is empty, set queryBegin to "?", otherwise set it to "&"
57+
# this structure is shared among all microservices, if you change it, change it everywhere.
58+
# customQuery allows a microservice to set query parameters specific to itself.
59+
# if customQuery is empty, set queryBegin to "?", otherwise set it to "&".
6060
# this allow the user to add additional query elements common to all microservices
61-
# and using the appropriate leading character depending on whether the microsevice
62-
# uses custom query parameters
61+
# and to use the appropriate leading character depending on whether the microsevice
62+
# uses custom query parameters or not. customQueryBegin in this file must always be '?',
63+
# it is present only to be able to be overriden by deployments in the
64+
# manyschemas mode. It is used only for microservices that have predefined
65+
# query parameters, and it must be used if customQuery is not empty, otherwise
66+
# the manyschema mode doesn't work, so define it everywhere because it doesn't
67+
# hurt.
6368
queryBegin: '?'
69+
customQueryBegin: '?'
6470
customQuery:
6571
dbName: dynamicmappings
6672
dbApi: jdbc

src/main/resources/database.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
dbVendor=postgresql
88
host=localhost
99
port=5432
10+
# use this to set common query parameters, and use the predefined
11+
# '${queryBegin}' marker to put the correct leading char '?' or '&' depending
12+
# on whether the microservice has predefined query parameters.
13+
# for example, use this (with the ${} and all): query=${queryBegin}timeout=5&reconnect=true
1014
query=
1115
login=postgres
1216
password=postgres
@@ -29,5 +33,5 @@ dbUrlManySchemas=${dbProtocolHost}${dbManySchemasPath}
2933
# leave this if you want 1 database per microservice
3034
dbUrl=${dbUrlManyBases}
3135
# use this if you want 1 database for all microservice, each in a schema
32-
# and set commonDbName
36+
# and set commonDbName in database.properties, and set queryBegin: '&' and customQueryBegin: '&' in application.yaml
3337
#dbUrl=${dbUrlManySchemas}

0 commit comments

Comments
 (0)