package org.nl.config;


import cn.hutool.core.util.StrUtil;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

@Component
public class StringConverter implements Converter<String, String> {

    @Override
    public String convert(String source) {
        if (StrUtil.isNotEmpty(source)) {
            if (source.contains("\\")) {
                source = source.replace("\\", "\\\\\\");
            }
        }
        return source;
    }
}
