|
|
@ -52,7 +52,7 @@ public class PlaceholderHelper {
|
|
|
|
* @param beanFactory beanFactory
|
|
|
|
* @param beanFactory beanFactory
|
|
|
|
* @param beanName beanName
|
|
|
|
* @param beanName beanName
|
|
|
|
* @param placeholder placeholder
|
|
|
|
* @param placeholder placeholder
|
|
|
|
* @return "${somePropertyValue}" -> "the actual property value"
|
|
|
|
* @return "${somePropertyValue}" -> "the actual property value"
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Object resolvePropertyValue(ConfigurableBeanFactory beanFactory, String beanName, String placeholder) {
|
|
|
|
public Object resolvePropertyValue(ConfigurableBeanFactory beanFactory, String beanName, String placeholder) {
|
|
|
|
// resolve string value
|
|
|
|
// resolve string value
|
|
|
@ -77,16 +77,16 @@ public class PlaceholderHelper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param propertyString propertyString
|
|
|
|
* @param propertyString propertyString
|
|
|
|
* @return
|
|
|
|
* @return Extract keys from placeholder, e.g.
|
|
|
|
* Extract keys from placeholder, e.g.
|
|
|
|
* <ul>
|
|
|
|
* <li>${some.key} => "some.key"</li>
|
|
|
|
* <li>${some.key} => "some.key"</li>
|
|
|
|
* <li>${some.key:${some.other.key:100}} => "some.key", "some.other.key"</li>
|
|
|
|
* <li>${some.key:${some.other.key:100}} => "some.key", "some.other.key"</li>
|
|
|
|
* <li>${${some.key}} => "some.key"</li>
|
|
|
|
* <li>${${some.key}} => "some.key"</li>
|
|
|
|
* <li>${${some.key:other.key}} => "some.key"</li>
|
|
|
|
* <li>${${some.key:other.key}} => "some.key"</li>
|
|
|
|
* <li>${${some.key}:${another.key}} => "some.key", "another.key"</li>
|
|
|
|
* <li>${${some.key}:${another.key}} => "some.key", "another.key"</li>
|
|
|
|
* <li>#{new java.text.SimpleDateFormat('${some.key}').parse('${another.key}')} => "some.key", "another.key"</li>
|
|
|
|
* <li>#{new java.text.SimpleDateFormat('${some.key}').parse('${another.key}')} => "some.key", "another.key"</li>
|
|
|
|
|
|
|
|
* </ul>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Set<String> extractPlaceholderKeys(String propertyString) {
|
|
|
|
public Set<String> extractPlaceholderKeys(String propertyString) {
|
|
|
|
Set<String> placeholderKeys = Sets.newHashSet();
|
|
|
|
Set<String> placeholderKeys = Sets.newHashSet();
|
|
|
|