com.jslsolucoes.spring.converter.LongConverter Maven / Gradle / Ivy
package com.jslsolucoes.spring.converter;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.convert.converter.Converter;
public class LongConverter implements Converter {
@Override
public Long convert(String value) {
if (StringUtils.isEmpty(value))
return null;
return Long.valueOf(value.replaceAll("(?=^-)|(\\D)", ""));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy