This commit is contained in:
Redkale
2017-11-08 15:02:56 +08:00
parent 5c339f6f66
commit 0569e87d4e

View File

@@ -35,6 +35,9 @@ public class CacheMemorySource<V extends Object> extends AbstractService impleme
private File home; private File home;
@Resource @Resource
private JsonConvert defaultConvert;
@Resource(name = "$_convert")
private JsonConvert convert; private JsonConvert convert;
private boolean needStore; private boolean needStore;
@@ -73,6 +76,7 @@ public class CacheMemorySource<V extends Object> extends AbstractService impleme
@Override @Override
public void init(AnyValue conf) { public void init(AnyValue conf) {
if (this.convert == null) this.convert = this.defaultConvert;
final CacheMemorySource self = this; final CacheMemorySource self = this;
AnyValue prop = conf == null ? null : conf.getAnyValue("property"); AnyValue prop = conf == null ? null : conf.getAnyValue("property");
if (prop != null) { if (prop != null) {