I am trying to Upgrade my code from Spring 4.x version to Spring 5.x version but getting error due to parseStringValue method as it is removed in Spring5. the ${propertyPath} location is present in server I am running the file.
@Configuration
@PropertySource(name="load", value={"file:${propertyPath}/property.config"})
public class PropertiesUtil extends PropertyPlaceholderConfigurer {
private static Map propertiesMap;
@Override
protected void processProperties(ConfigurableListableBeanFactory beanFactory,
Properties props) throws BeansException {
super.processProperties(beanFactory, props);
propertiesMap = new HashMap<String, String>();
for (Object key : props.keySet()) {
String keyStr = key.toString();
propertiesMap.put(keyStr, parseStringValue(props.getProperty(keyStr),
props, new HashSet()));
}
}
public static String getProperty(String name) {
return propertiesMap.get(name);
}
}