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

com.jslsolucoes.spring.converter.LocalDateConverter Maven / Gradle / Ivy

package com.jslsolucoes.spring.converter;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

import org.apache.commons.lang3.StringUtils;
import org.springframework.core.convert.converter.Converter;

public class LocalDateConverter implements Converter {

    @Override
    public LocalDate convert(String value) {
	if (StringUtils.isEmpty(value)) return null;
	return LocalDate.parse(value, DateTimeFormatter.ofPattern("dd/MM/yyyy"));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy