del[storage]: unnecessary convert

This commit is contained in:
godotg
2024-07-19 22:09:29 +08:00
parent 921e8bd6a6
commit 285e996c82
2 changed files with 0 additions and 30 deletions
@@ -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);
}
}