当前位置:网站首页>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
边栏推荐
- 【BIM+GIS】ArcGIS Pro2.8如何打开Revit模型,BIM和GIS融合?
- 兼容NSR20F30NXT5G的小体积肖特基二极管
- Leetcode->1 两数之和
- Go反射法则
- 记录一下盲注脚本
- Thought of reducing Governance -- detailed summary of binary search
- 补:注解(Annotation)
- Cortex-M3寄存器组、汇编语言与C语言的接口介绍
- Single chip microcomputer serial port data processing (2) -- ucosiii + cyclic queue receiving data
- 递归调用--排列的穷举
猜你喜欢
那些年我面试过的Android开发岗总结(附面试题+答案解析)
Iron and intestinal flora
Phishing for NFT
阿里云IoT流转到postgresql数据库方案
AWS EKS 部署要点以及控制台与eksctl创建的差异
LabVIEW 小端序和大端序区别
[AI vision · quick review of today's sound acoustic papers, issue 2] Fri, 15 APR 2022
Express中间件①(中间件的使用)
Supplément: annotation
Difference between LabVIEW small end sequence and large end sequence
随机推荐
[AI vision · quick review of today's sound acoustic papers, issue 2] Fri, 15 APR 2022
【论文阅读】【3d目标检测】Voxel Transformer for 3D Object Detection
[mapping program design] coordinate inverse artifact v1 0 (with C / C / VB source program)
STM32F4单片机ADC采样及ARM-DSP库的FFT
【论文阅读】【3d目标检测】point transformer
[BIM introduction practice] wall hierarchy and FAQ in Revit
zynq平臺交叉編譯器的安裝
阿里云IoT流转到postgresql数据库方案
Nature medicine reveals individual risk factors of coronary artery disease
Summary of Android development posts I interviewed in those years (attached test questions + answer analysis)
[AI vision · quick review of NLP natural language processing papers today, No. 32] wed, 20 APR 2022
Xiaohongshu was exposed to layoffs of 20% as a whole, and the internal volume among large factories was also very serious
MySQL 2013 lost connection to MySQL server during query
RC低通滤波器的逆系统
Who will answer the question?
Basic introduction to spot gold
QT program integration easyplayer RTSP streaming media player screen flicker what is the reason?
Go反射—Go语言圣经学习笔记
STM32上μC/Shell移植与应用
Ali's ten-year technical experts jointly created the "latest" jetpack compose project combat drill (with demo)