Adicionei o campo, entretanto está dando erro rejected value [10/10/2010]; codes [typeMismatch.produto.dataLancamento. Para gravar e a mostrar a lista fis diferente da aula, mas estava funcionando corretamente, depois da data está dando erro.
Segue o erro
Type Exception Report
Message Request processing failed; nested exception is org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'produto' on field 'dataLancamento': rejected value [10/10/2010]; codes [typeMismatch.produto.dataLancamento,typeMismatch.dataLancamento,typeMismatch.java.sql.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [produto.dataLancamento,dataLancamento]; arguments []; default message [dataLancamento]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.sql.Date' for property 'dataLancamento'; nested exception is java.lang.IllegalArgumentException: Could not parse date: Unparseable date: "10/10/2010"]
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'produto' on field 'dataLancamento': rejected value [10/10/2010]; codes [typeMismatch.produto.dataLancamento,typeMismatch.dataLancamento,typeMismatch.java.sql.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [produto.dataLancamento,dataLancamento]; arguments []; default message [dataLancamento]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.sql.Date' for property 'dataLancamento'; nested exception is java.lang.IllegalArgumentException: Could not parse date: Unparseable date: "10/10/2010"]
org.springframework.web.method.annotation.ModelAttributeMethodProcessor.resolveArgument(ModelAttributeMethodProcessor.java:111)
org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:75)
org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:156)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:117)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note A pilha de erros completa da causa principal está disponível nos logs do servidor.
Apache Tomcat/9.0.29
Algumas classes estão neste link https://gist.github.com/alinelsilva/fd6c828672084f859373b1e6fe39c118.js