File tree Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 9
9
max-request-size : 103MB
10
10
11
11
datasource :
12
- url : ${dbApi}:${dbVendor}://${hostPort}/${dbName}${query }
12
+ url : ${dbUrl }
13
13
username : ${login}
14
14
password : ${password}
15
15
@@ -54,6 +54,14 @@ network-store-server:
54
54
preloading-strategy : COLLECTION
55
55
base-uri : http://localhost:8080/
56
56
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 "&"
60
+ # 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
63
+ queryBegin : ' ?'
64
+ customQuery :
57
65
dbName : dynamicmappings
58
66
dbApi : jdbc
59
67
Original file line number Diff line number Diff line change
1
+ # This file is meant to be overriden in deployments by a single file in all microservices
2
+ # if you change its structure, change it in all microservices.
3
+ # values here can be overriden for all microservices in this common file,
4
+ # or in specific microservices in its specific application.yml file
5
+
6
+ # default values
1
7
dbVendor =postgresql
2
8
host =localhost
3
9
port =5432
4
10
query =
5
11
login =postgres
6
12
password =postgres
7
- hostPort =${host}:${port}
13
+ # use this if you want to use the preferred db name of the microservice,
14
+ # but with multiple variants, like for different environments
15
+ dbPrefix =
16
+
17
+ # these allow to customize the url construction a bit for weird jdbc connection strings
18
+ hostPort =://${host}:${port}/
19
+ dbProtocolHost =${dbApi}:${dbVendor}${hostPort}
20
+
21
+ dbFullName =${dbPrefix}${dbName}
22
+ finalQuery =${customQuery}${query}
23
+ dbManyBasesPath =${dbFullName}${finalQuery}
24
+ dbManySchemasPath =${commonDbName}?currentSchema=${dbFullName}${finalQuery}
25
+
26
+ dbUrlManyBases =${dbProtocolHost}${dbManyBasesPath}
27
+ dbUrlManySchemas =${dbProtocolHost}${dbManySchemasPath}
28
+
29
+ # leave this if you want 1 database per microservice
30
+ dbUrl =${dbUrlManyBases}
31
+ # use this if you want 1 database for all microservice, each in a schema
32
+ # and set commonDbName
33
+ # dbUrl=${dbUrlManySchemas}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ logging:
16
16
17
17
dbVendor : h2:mem
18
18
query : ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
19
- hostPort :
19
+ hostPort : " : "
20
20
21
21
backing-services :
22
22
case :
You can’t perform that action at this time.
0 commit comments