原文:EL1004E: Method call: Method fmtdate(java.util.Date,java.lang.String) cannot be found on org.thymele

使用springboot與thymeleaf整合時,發現java 中關於時間的字段LocalDateTime在前台使用dates.format會報錯。 報錯信息: 解決方案: 查找相關資料,發現thymeleaf對於此類報錯,增加了一個增強包,maven工程中需要在pom中引入如下包: 然后將thymeleaf中的代碼改為如下即可: ...

2021-11-29 19:53 0 1276 推薦指數:

查看詳情

org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method service() cannot be found

前言 本文中提到的解決方案,源碼地址在:springboot-thymeleaf,希望可以幫你解決問題。 至於為什么已經寫了一篇文章thymeleaf模板引擎調用java類中的方法,又多此一舉的單獨整理了這篇文章,是因為在解決此問題時首先搜索了一下關於此問題的文章,但是網上並沒有搜到關於此問題 ...

Thu Sep 21 19:44:00 CST 2017 0 2816
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM