mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-19 13:27:10 +00:00
del[storage]: unnecessary convert
This commit is contained in:
@@ -38,7 +38,6 @@ public abstract class ConvertUtils {
|
||||
converters.add(new JsonToObjectConverter());
|
||||
converters.add(new StringToClassConverter());
|
||||
converters.add(new StringToDateConverter());
|
||||
converters.add(new StringToMapConverter());
|
||||
conversionServiceFactoryBean.setConverters(converters);
|
||||
conversionServiceFactoryBean.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The zfoo Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zfoo.storage.convert;
|
||||
|
||||
import com.zfoo.protocol.util.JsonUtils;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
*/
|
||||
public class StringToMapConverter implements Converter<String, Map<String, Object>> {
|
||||
@Override
|
||||
public Map<String, Object> convert(String source) {
|
||||
return JsonUtils.string2Map(source, String.class, Object.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user