Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

O tipo de dado foi inválido

@Bean
    public FormattingConversionService mvcConvertionService() {
        DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
        DateFormatterRegistrar registra = new DateFormatterRegistrar();
        registra.setFormatter(new DateFormatter("dd/MM/yyyy"));
        registra.registerFormatters(conversionService);

        return conversionService;
    }
@DateTimeFormat
    private Calendar dataLancamento;

Estou tentando inserir o valor 12/12/2017, mas está trazendo a mensagem:

typeMismatch = O tipo de dado foi inválido

Alguém sabe qual o motivo?

2 respostas
solução!

Tenta trocar o nome do método para mvcConversionService

Nunca ia descobrir isso hehehehe , boa, valeu Alberto!!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software