1
resposta

Exception evaluating SpringEL expression:

estou tentando listar o banco de dados na index

so mudei pouca coisa relacionado ao curso @RequestMapping("/") public ModelAndView ListaProduto() {

ModelAndView mw = new ModelAndView("index"); List p = (List) mystore.findAll(); mw.addObject("produto",p); return mw; }

<tbody>
            <tr th:each="produto : ${produto}">

                <td><span th:text="${produto.P_VENUE}"></span></td>
                <td><span th:text="${produto.P_DATE}"></span></td>
                <td><span th:text="${produto.P_BASEPRODUCT}"></span></td>

            </tr>
        </tbody>

2018-01-22 11:41:59.477  INFO 4636 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6ec9725c: startup date [Mon Jan 22 11:41:58 BRST 2018]; root of context hierarchy
2018-01-22 11:41:59.483  INFO 4636 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public org.springframework.web.servlet.ModelAndView com.mystore.controllers.MystoreController.ListaProduto()
2018-01-22 11:41:59.485  INFO 4636 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-01-22 11:41:59.485  INFO 4636 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-01-22 11:41:59.495  INFO 4636 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-22 11:41:59.495  INFO 4636 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-22 11:41:59.506  INFO 4636 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-22 11:41:59.559  INFO 4636 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2018-01-22 11:41:59.607  INFO 4636 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-01-22 11:41:59.617  INFO 4636 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2018-01-22 11:41:59.619  INFO 4636 --- [  restartedMain] com.mystore.MystoreApplication           : Started MystoreApplication in 1.482 seconds (JVM running for 324.491)

```

1 resposta

Oi Beatriz,

Olhando o código que você postou do Controller e View, está tudo certo.

Pode postar aqui a exception que ocorreu?E tambem o codigo da sua classe Produto

Assim a gente consegue entender melhor o que pode estar acontencendo.