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

com.haoxuer.discover.web.conver.StringToDateConverterFactory Maven / Gradle / Ivy

There is a newer version: 3.3.18-20230117
Show newest version
package com.haoxuer.discover.web.conver;

import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.convert.converter.Converter;

public class StringToDateConverterFactory implements Converter {

  private final Logger logger = LoggerFactory.getLogger(this.getClass());

  @Override
  public Date convert(String source) {
    if (source == null || "".equals(source)) {
      return null;
    }
    source = source.trim();
    if (source.equals("")) {
      return null;
    }
    return DateConver.getDefault().conver(source);

  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy