版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/deng624796905/article/details/80158723
记录一下。
写了一个页面,新增,编辑,查看用的都是同一个页面。
编辑和查看没问题,th:text=${users?.uuserName}是有值的。
<input type="text" name="uuserName" disabled th:text="th:text=${users.uuserName}" class="layui-input">
- 1
新增就报错了 Property or field ‘menuName’ cannot be found on null
用下面的方式可以解决:
<!--th:value="${users?.uuserName}"-->
<input type="text" name="uuserName" disabled th:text="${users?.uuserName}" class="layui-input">