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

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

There is a newer version: 1.0.34
Show newest version
package com.jslsolucoes.spring.converter;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

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

public class LocalDateTimeConverter implements Converter {

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy