当前位置:网站首页>Error occurs when thymeleaf th: value is null
Error occurs when thymeleaf th: value is null
2022-04-23 04:32:00 【The hunter is eating meat】
Usually ,thymeleaf How values are displayed :
<input type="text" class="form-control" th:value="${userDO.name}">
however , Be the object userDO It's empty , perhaps Object properties name It's empty time , Will report a mistake .
It can be optimized as follows :
<input type="text" class="form-control" th:value="${userDO?.name}">
In case of multi-layer object nesting , It can be written as follows :
<input type="text" class="form-control" th:value="${userDO?.name?.lastName}">
版权声明
本文为[The hunter is eating meat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230417435994.html
边栏推荐
猜你喜欢
MYSQL查询至少连续n天登录的用户
Phishing for NFT
为什么推荐你学嵌入式
Opencv -- yoact case segmentation model reasoning
Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
Supplément: annotation
针对NFT的网络钓鱼
[AI vision · quick review of today's sound acoustic papers, issue 3] wed, 20 APR 2022
用D435i录制自己的数据集运行ORBslam2并构建稠密点云
zynq平台交叉编译器的安装
随机推荐
Express middleware ① (use of Middleware)
IDE Idea 自动编译 与 On Upate Action 、 On Frame Deactivation 的配置
Set经典小题目
RC低通滤波器的逆系统
shell wc (统计字符数量)的基本使用
/etc/bash_completion.d目录作用(用户登录立刻执行该目录下脚本)
MYSQL查询至少连续n天登录的用户
How to regulate intestinal flora? Introduction to common natural substances, probiotics and prebiotics
TreeSet课后练习
Matlab reads multiple fig graphs and then combines them into one graph (in the form of sub graph)
Go 语言中的 logger 和 zap 日志库
从MySQL数据库迁移到AWS DynamoDB
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
华为机试--高精度整数加法
mysql table 中增加列的SQL语句
指纹Key全国产化电子元件推荐方案
Single chip microcomputer serial port data processing (1) -- serial port interrupt sending data
The difference between lists, tuples, dictionaries and collections
[echart] démarrer avec echart