removing placeholders as its not encoded properly - #84
Conversation
WalkthroughThe update modifies two property values in the application properties file, replacing dynamic property placeholder syntax with fixed string values. The affected properties now contain the literal text "COMMON_BASE_URL" concatenated with endpoint paths, instead of referencing another property for substitution. Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
| common-api-url-searchuserbyid=COMMON_BASE_URLbeneficiary/searchUserByID | ||
| common-api-url-searchBeneficiary=COMMON_BASE_URLbeneficiary/searchBeneficiary |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Critical: Placeholder removal breaks URL resolution
Removing ${COMMON_BASE_URL} and replacing it with the literal string COMMON_BASE_URL prevents runtime substitution and results in invalid endpoints (COMMON_BASE_URLbeneficiary/... without a slash). Restore proper placeholder syntax or specify the full base URL.
Suggested fix:
-common-api-url-searchuserbyid=COMMON_BASE_URLbeneficiary/searchUserByID
+common-api-url-searchuserbyid=${COMMON_BASE_URL}/beneficiary/searchUserByID
-common-api-url-searchBeneficiary=COMMON_BASE_URLbeneficiary/searchBeneficiary
+common-api-url-searchBeneficiary=${COMMON_BASE_URL}/beneficiary/searchBeneficiary🏁 Script executed:
#!/bin/bash
# Verify placeholder usage in application.properties
grep -R "COMMON_BASE_URL" -n src/main/resources/application.properties || trueLength of output: 226
Critical: Restore placeholder syntax and missing slash in URLs
The properties on lines 26–27 use the literal string COMMON_BASE_URL (without ${}) and omit the leading slash before beneficiary, causing the placeholders not to be substituted and yielding invalid endpoints. Please update as follows in src/main/resources/application.properties:
- common-api-url-searchuserbyid=COMMON_BASE_URLbeneficiary/searchUserByID
+ common-api-url-searchuserbyid=${COMMON_BASE_URL}/beneficiary/searchUserByID
- common-api-url-searchBeneficiary=COMMON_BASE_URLbeneficiary/searchBeneficiary
+ common-api-url-searchBeneficiary=${COMMON_BASE_URL}/beneficiary/searchBeneficiary🤖 Prompt for AI Agents
In src/main/resources/application.properties around lines 26 to 27, the URLs use
the literal string COMMON_BASE_URL instead of the placeholder syntax
${COMMON_BASE_URL}, and they are missing a slash before "beneficiary". Fix this
by restoring the placeholder syntax with ${COMMON_BASE_URL} and adding a leading
slash before "beneficiary" in both URLs to ensure proper runtime substitution
and valid endpoint formation.
There was a problem hiding this comment.
placeholders are not encoded properly so we are not applying this change
There was a problem hiding this comment.
@srishtigrp78 Understood—if the ${…} syntax is causing encoding issues in your deployment pipeline then keeping it out makes sense.
A couple of quick checks so the URLs still resolve correctly:
-
Ensure whatever process substitutes
COMMON_BASE_URLat runtime (e.g., a custom filter, init script, or external config server) also inserts the missing “/” beforebeneficiary, otherwise you’ll end up with something like
https://api.example.combeneficiary/searchUserByID. -
If the base URL already ends with a slash, the current concatenation is fine; otherwise consider including the slash in the token itself (e.g., defining
COMMON_BASE_URL=https://api.example.com/) so each property line stays readable. -
Document the replacement mechanism somewhere (README or deployment notes) so future maintainers know why placeholders aren’t using Spring’s
${…}syntax.
Let me know if you’d like to create a follow-up issue to track any future refactor (for example, migrating to Spring profiles or environment variables once the encoding problem is resolved); I can open one via GitHub CLI if that helps.



📋 Description
JIRA ID: 1602
Placed COMMON_BASE_URL in placeholders like ${COMMON_BASE_URL} but it didnt work. So removing it.
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit