All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.web.converter.DateConverter Maven / Gradle / Ivy

package com.quhaodian.web.converter;

import com.quhaodian.web.conver.DateConver;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;

import java.util.Date;

public class DateConverter implements Converter {
    @Nullable
    @Override
    public Date convert(String text) {
        if (StringUtils.hasText(text)) {
            return DateConver.getDefault().conver(text);
        } else {
            return null;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy