Java thymeleaf bug排查记录

刚学Java 做项目时报了一个错误 一时间看的莫名其妙

EL1008E: Property or field 'createTime' cannot be found on object of type 'java.util.HashMap' - maybe not public or not valid?

随即向上排查至第一个报错,发现是thymeleaf渲染时报错。

复制代码
Exception processing template "/site/notice": An error happened during template parsing (template: "class path resource [templates//site/notice.html]")

找到controller中相应方法处排查。

java 复制代码
@RequestMapping(path = "/notice/list", method = RequestMethod.GET)

发现因为一时手滑加上自己对Java不熟悉导致找bug找了一个多小时。

相关推荐
ShineWinsu14 小时前
对于Qt:QDial常见属性以及信号的解析
开发语言·c++·qt·gui·客户端·旋钮·qdial
Java后端的Ai之路16 小时前
RAG 还是 Agent 自主检索?Claude Code 删掉向量库之后,我把选型讲透了
开发语言·人工智能·prompt·agent·rag
starzy199016 小时前
深入理解Scala高阶函数:函数式编程核心
开发语言·scala
2601_9621066421 小时前
【Java Set综合实战】商品管理系统 + 图书收藏系统|Product、Book自定义类全套代码
java
RuoyiOffice1 天前
SpringBoot+Vue3 凭证生命周期设计:审核、过账、冲销与反过账怎样保持账目一致
java·spring boot·事务·springboot3·财务系统·会计凭证·ruoyi office
2601_962106641 天前
HashMap入门|工号-姓名键值存储、两种遍历方式、根据key/value查
java
czq_26867194871 天前
Python打卡第46天
开发语言·python
杨凯凡1 天前
Spring Framework 7 API 版本管理实战:请求头路由、兼容迁移与废弃策略
java·rest api·springframework·spring boot 4·api版本管理
T_Wizard1 天前
同一个问题写了 4 遍:官方 SDK / HTTP / Spring AI / LangChain4j,到底该选哪个
java·ai编程
hai_android1 天前
AudioTrack 深度解析:从原理到实战
android·java·kotlin