com.haoxuer.discover.web.converter.DateConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discover-website Show documentation
Show all versions of discover-website Show documentation
discover网站配置模块,主要管理网站主题,网站配置等功能
package com.haoxuer.discover.web.converter;
import com.haoxuer.discover.web.conver.DateConver;
import java.util.Date;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;
public class DateConverter implements Converter {
@Nullable
@Override
public Date convert(String text) {
if (StringUtils.hasText(text)) {
return DateConver.getDefault().conver(text);
} else {
return null;
}
}
}