We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72f0c28 commit 79b050dCopy full SHA for 79b050d
1 file changed
src/main/java/com/iemr/common/utils/config/ConfigProperties.java
@@ -144,11 +144,21 @@ public static String getPropertyByName(String propertyName)
144
String result = null;
145
try
146
{
147
- if (properties == null)
+ if (environment != null)
148
149
- initalizeProperties();
+ result = environment.getProperty(propertyName);
150
+ }
151
+ if (result == null)
152
+ {
153
+ if (properties == null)
154
155
+ initalizeProperties();
156
157
+ result = properties.getProperty(propertyName).trim();
158
+ } else
159
160
+ result = result.trim();
161
}
- result = properties.getProperty(propertyName).trim();
162
} catch (Exception e)
163
164
logger.error(propertyName + " retrival failed.", e);
0 commit comments