From b325eb7938de9bb218332f97fd790e570b7b09b9 Mon Sep 17 00:00:00 2001 From: hongwei Date: Thu, 2 May 2024 12:50:56 +0200 Subject: [PATCH 1/3] docfix/added the comments for Markdown format for webui_terms_and_conditions field --- obp-api/src/main/resources/props/sample.props.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obp-api/src/main/resources/props/sample.props.template b/obp-api/src/main/resources/props/sample.props.template index e71ce467b3..5ceea83158 100644 --- a/obp-api/src/main/resources/props/sample.props.template +++ b/obp-api/src/main/resources/props/sample.props.template @@ -1139,6 +1139,8 @@ default_auth_context_update_request_key=CUSTOMER_NUMBER # User (Developer) Invitation webui_post_user_invitation_submit_button_value=Register as a Developer webui_privacy_policy= + +#Note: if you provide the Markdown format, please use '\n\' at the end. This will preserve the line breaks. webui_terms_and_conditions= webui_post_user_invitation_terms_and_conditions_checkbox_value=I agree to the above Developer Terms and Conditions From 7cf64132c4056dc140d1bb50a9a53d4e8cb9ee17 Mon Sep 17 00:00:00 2001 From: hongwei Date: Thu, 2 May 2024 15:10:52 +0200 Subject: [PATCH 2/3] refactor/tweaked debug to trace for the cache.size log --- obp-api/src/main/scala/code/api/util/APIUtil.scala | 2 +- obp-api/src/main/scala/code/api/util/ApiRole.scala | 4 ++-- obp-api/src/main/scala/code/api/util/DynamicUtil.scala | 2 +- obp-api/src/test/scala/code/api/v3_1_0/V310ServerSetup.scala | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/obp-api/src/main/scala/code/api/util/APIUtil.scala b/obp-api/src/main/scala/code/api/util/APIUtil.scala index c9c6675bd9..0c1e644459 100644 --- a/obp-api/src/main/scala/code/api/util/APIUtil.scala +++ b/obp-api/src/main/scala/code/api/util/APIUtil.scala @@ -1534,7 +1534,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ private val operationIdToResourceDoc: ConcurrentHashMap[String, ResourceDoc] = new ConcurrentHashMap[String, ResourceDoc] def getResourceDocs(operationIds: List[String]): List[ResourceDoc] = { - logger.debug(s"ResourceDoc operationIdToResourceDoc.size is ${operationIdToResourceDoc.size()}") + logger.trace(s"ResourceDoc operationIdToResourceDoc.size is ${operationIdToResourceDoc.size()}") val dynamicDocs = DynamicEntityHelper.doc ++ DynamicEndpointHelper.doc ++ DynamicEndpoints.dynamicResourceDocs operationIds.collect { case operationId if operationIdToResourceDoc.containsKey(operationId) => diff --git a/obp-api/src/main/scala/code/api/util/ApiRole.scala b/obp-api/src/main/scala/code/api/util/ApiRole.scala index 0140a991d0..fdbeb1387e 100644 --- a/obp-api/src/main/scala/code/api/util/ApiRole.scala +++ b/obp-api/src/main/scala/code/api/util/ApiRole.scala @@ -987,11 +987,11 @@ object ApiRole extends MdcLoggable{ } def getOrCreateDynamicApiRole(roleName: String, requiresBankId: Boolean = false): ApiRole = { - logger.debug(s"code.api.util.ApiRole.getOrCreateDynamicApiRole.size is ${dynamicApiRoles.size()}") + logger.trace(s"code.api.util.ApiRole.getOrCreateDynamicApiRole.size is ${dynamicApiRoles.size()}") dynamicApiRoles.computeIfAbsent(roleName, _ => DynamicApiRole(roleName, requiresBankId)) } def removeDynamicApiRole(roleName: String): ApiRole = { - logger.debug(s"code.api.util.ApiRole.removeDynamicApiRole.size is ${dynamicApiRoles.size()}") + logger.trace(s"code.api.util.ApiRole.removeDynamicApiRole.size is ${dynamicApiRoles.size()}") dynamicApiRoles.remove(roleName) } diff --git a/obp-api/src/main/scala/code/api/util/DynamicUtil.scala b/obp-api/src/main/scala/code/api/util/DynamicUtil.scala index 11f8a2874a..108a776a8c 100644 --- a/obp-api/src/main/scala/code/api/util/DynamicUtil.scala +++ b/obp-api/src/main/scala/code/api/util/DynamicUtil.scala @@ -52,7 +52,7 @@ object DynamicUtil extends MdcLoggable{ * @return compiled Full[function|object|class] or Failure */ def compileScalaCode[T](code: String): Box[T] = { - logger.debug(s"code.api.util.DynamicUtil.compileScalaCode.size is ${dynamicCompileResult.size()}") + logger.trace(s"code.api.util.DynamicUtil.compileScalaCode.size is ${dynamicCompileResult.size()}") val compiledResult: Box[Any] = dynamicCompileResult.computeIfAbsent(code, _ => { val tree = try { toolBox.parse(code) diff --git a/obp-api/src/test/scala/code/api/v3_1_0/V310ServerSetup.scala b/obp-api/src/test/scala/code/api/v3_1_0/V310ServerSetup.scala index c387845219..5387f0bf31 100644 --- a/obp-api/src/test/scala/code/api/v3_1_0/V310ServerSetup.scala +++ b/obp-api/src/test/scala/code/api/v3_1_0/V310ServerSetup.scala @@ -30,7 +30,7 @@ trait V310ServerSetup extends ServerSetupWithTestData with DefaultUsers { } val banksJson = getBanksInfo.body.extract[BanksJSON] - logger.debug(s"banksJson.banks.size is ${banksJson.banks.size}") + logger.trace(s"banksJson.banks.size is ${banksJson.banks.size}") val randomPosition = nextInt(banksJson.banks.size) val bank = banksJson.banks(randomPosition) bank.id From 959979f9dccf4e7f8a13e8e735fba1bfadc6b860 Mon Sep 17 00:00:00 2001 From: hongwei Date: Thu, 2 May 2024 15:21:45 +0200 Subject: [PATCH 3/3] refactor/added log for running Schemifier.schemify twice --- obp-api/src/main/scala/bootstrap/liftweb/Boot.scala | 1 + obp-api/src/main/scala/code/views/MapperViews.scala | 1 + 2 files changed, 2 insertions(+) diff --git a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala index c370280e6c..06e882cd20 100644 --- a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala @@ -875,6 +875,7 @@ class Boot extends MdcLoggable { def schemifyAll() = { Schemifier.schemify(true, Schemifier.infoF _, ToSchemify.models: _*) if (APIUtil.getPropsAsBoolValue("remotedata.enable", false) == false) { + logger.debug("Run Schemifier.schemify during Boot:") Schemifier.schemify(true, Schemifier.infoF _, ToSchemify.modelsRemotedata: _*) } } diff --git a/obp-api/src/main/scala/code/views/MapperViews.scala b/obp-api/src/main/scala/code/views/MapperViews.scala index d9fda0e539..783a124d82 100644 --- a/obp-api/src/main/scala/code/views/MapperViews.scala +++ b/obp-api/src/main/scala/code/views/MapperViews.scala @@ -27,6 +27,7 @@ import scala.concurrent.Future object MapperViews extends Views with MdcLoggable { + logger.debug("Run Schemifier.schemify in MapperViews object") Schemifier.schemify(true, Schemifier.infoF _, ToSchemify.modelsRemotedata: _*) private def getViewsForUser(user: User): List[View] = {