diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 56f6adbe..b6db015a 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -54,13 +54,19 @@ network-store-server: preloading-strategy: COLLECTION base-uri: http://localhost:8080/ -# this structure is shared among all microservices, if you change it, change it everywhere -# customQuery allows a microservice to set query parameters specific to itself -# if customQuery is empty, set queryBegin to "?", otherwise set it to "&" +# this structure is shared among all microservices, if you change it, change it everywhere. +# customQuery allows a microservice to set query parameters specific to itself. +# if customQuery is empty, set queryBegin to "?", otherwise set it to "&". # this allow the user to add additional query elements common to all microservices -# and using the appropriate leading character depending on whether the microsevice -# uses custom query parameters +# and to use the appropriate leading character depending on whether the microsevice +# uses custom query parameters or not. customQueryBegin in this file must always be '?', +# it is present only to be able to be overriden by deployments in the +# manyschemas mode. It is used only for microservices that have predefined +# query parameters, and it must be used if customQuery is not empty, otherwise +# the manyschema mode doesn't work, so define it everywhere because it doesn't +# hurt. queryBegin: '?' +customQueryBegin: '?' customQuery: dbName: dynamicmappings dbApi: jdbc diff --git a/src/main/resources/database.properties b/src/main/resources/database.properties index f8880c13..a7da048d 100644 --- a/src/main/resources/database.properties +++ b/src/main/resources/database.properties @@ -7,6 +7,10 @@ dbVendor=postgresql host=localhost port=5432 +# use this to set common query parameters, and use the predefined +# '${queryBegin}' marker to put the correct leading char '?' or '&' depending +# on whether the microservice has predefined query parameters. +# for example, use this (with the ${} and all): query=${queryBegin}timeout=5&reconnect=true query= login=postgres password=postgres @@ -29,5 +33,5 @@ dbUrlManySchemas=${dbProtocolHost}${dbManySchemasPath} # leave this if you want 1 database per microservice dbUrl=${dbUrlManyBases} # use this if you want 1 database for all microservice, each in a schema -# and set commonDbName +# and set commonDbName in database.properties, and set queryBegin: '&' and customQueryBegin: '&' in application.yaml #dbUrl=${dbUrlManySchemas}