I am reading the jdbc.properties file using the placeholder properties as shown below.
<context:property-placeholder location="classpath*:jdbc.properties" />
In the properties file, I save the jdbc configuration along with the password. When I run Springframework in debug mode. It prints the property value, which is the password. Is there any solution to fix this? Here is my log statement.
2014-05-20 18:37:32,076 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Could not find key 'database.password' in any property source. Returning [null]
2014-05-20 18:37:32,076 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'database.password' in [localProperties]
2014-05-20 18:37:32,076 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Found key 'database.password' in [localProperties] with type [String] and value 'pass'
2014-05-20 18:37:32,076 [main] TRACE o.s.util.PropertyPlaceholderHelper - Resolved placeholder 'database.password'
source
share