1
When I submit the form it gives this error on screen
If it is a Spring Boot project, I thought it did not need a class convert to category combo, but as gave the error message I decided to create the convert class as you can see below;
import org.springframework.core.convert.converter.Converter;
import org.springframework.util.StringUtils;
import br.com.armazem.model.Categoria;
public class CategoriaConverter implements Converter<String, Categoria> {
@Override
public Categoria convert(String codigo) {
if (!StringUtils.isEmpty(codigo)) {
Categoria categoria = new Categoria();
categoria.setCodigo(Long.valueOf(codigo));
return categoria;
}
return null;
}
}
Even though he keeps making mistakes, I wonder what I can do?
I am new Spring Boot programmer.
sorry @Aderbal but your suggestion doesn’t help much, I think my problem is more a matter of setting up Spring Boot than the conversion itself.
– wladyband
I’m trying to submit a combo in a form in a Spring Boot project
– wladyband