Property or field 'LevelName' cannot be found on null
来源:互联网 发布:c语言有趣小程序 编辑:程序博客网 时间:2024/05/21 08:59
Property or field ‘LevelName’ cannot be found on null
1、报错信息:
Springboot+mybatis+thymeleaf多表查询时,thymeleaf页面报错:Property or field ‘LevelName’ cannot be found on null,
图片如下:
2、页面代码:
td th:text="${ulevel.LevelName}">></td>
3、原因
User实体类定义了Ulevel实体的属性,而levelName是Ulevel的属性,usercontroller返回的是user实体,无法获得Ulevel实体的levelName属性。
4、解决方法:
htem页面改为:<td th:text="${user.ulevel.LevelName}"></td>
或者:<td th:text="${user.ulevel.getLevelName()}"></td>
注:这方法不能有空值
阅读全文
0 0
- Property or field 'LevelName' cannot be found on null
- Property or field 'demoService1' cannot be found
- Field or property 'ROLE_USER' cannot be found on object of type 'org.springframework.security.web.ac
- 【spring-security】 Property or field 'ROLE_USER' cannot be found on object of type 'org.springframewo
- Property or field 'siteUrl' cannot be found on object of type 'xx'
- Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService'
- 错误:Property or field 'default' cannot be found on object of type 'com.netflix.appinfo.InstanceInfo'
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- Data is Null. This method or property cannot be called on Null values.错误分析
- MOSS爬网问题Error from SharePoint site: Data is Null. This method or property cannot be called on Null values
- 错误:A field or property with the name 'XXX' was not found on the selected data source 解决
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- layout cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- Vue学习之源码分析--Vue.js依赖收集(二)
- node 学习笔记
- 一脸懵逼学习Hive的安装
- Tomcat server.xml配置详解
- 我的Java设计模式-观察者模式
- Property or field 'LevelName' cannot be found on null
- Java-JDK-泛型
- Linux基础实践(二)
- 【指导】使用its-jira插件关联gerrit和JIRA
- ipa安装手机失败的几类原因
- ping命令的实现
- orcle sql 语句 varchar 比较大小
- GoldenGate(2)_进程设置与常用操作
- mysql 5.7 group by 1055