X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FPropertySetter.java;h=f88c40541f45204cfede596f497742c136fca110;hb=d67dfdb9198fbe3bb9034cd1d9f4a9870618d2b6;hp=00b9f307b0c1db46d5508736a6b30cf52233cac7;hpb=6f8bb575523e672b9f8797e543f7c59d15db7253;p=utils diff --git a/system/spring/src/main/java/org/wamblee/system/spring/PropertySetter.java b/system/spring/src/main/java/org/wamblee/system/spring/PropertySetter.java index 00b9f307..f88c4054 100644 --- a/system/spring/src/main/java/org/wamblee/system/spring/PropertySetter.java +++ b/system/spring/src/main/java/org/wamblee/system/spring/PropertySetter.java @@ -34,13 +34,18 @@ class PropertySetter extends PropertyPlaceholderConfigurer { * @param aProps Properties. */ public PropertySetter(Properties aProps) { - StringBuffer buf = new StringBuffer(); + String propFile = createPropertyFile(aProps); + setLocation(new StringResource(propFile)); + } + + public static String createPropertyFile(Properties aProps) { + StringBuffer buf = new StringBuffer(); for (Object key: aProps.keySet()) { buf.append(key); buf.append("="); buf.append(aProps.get(key)); buf.append("\n"); - } - setLocation(new StringResource(buf.toString())); - } + } + return buf.toString(); + } }