freemarker报错:Tip: If the failing expression is known to be legally null/missing, either specify a de
来源:互联网 发布:网络彩票开售最新进展 编辑:程序博客网 时间:2024/05/16 04:00
freemarker报错:Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??
大致意思是所写的表达式应判定不为空或者指定一个默认值,貌似ftl的<#if>判断一般都一定要判断一下不能为空
错误写法(后台会报错,实际上可以允许):
</pre><p><pre name="code" class="html"><span style="font-size:18px;"><#if lists?? && lists?size gt 0><#list lists as list><option value="${list.id}" <#if outbean.id == '${list.id}'> selected="selected" </#if> >${list.name!''}</option></#list></#if></span>
纠正写法:
<#if lists?? && lists?size gt 0><#list lists as list><option value="${list.id}" <#if (outbean.id!'') == '${list.id}'> selected="selected" </#if> >${list.name!''}</option></#list></#if>
0 0
- freemarker报错:Tip: If the failing expression is known to be legally null/missing, either specify a de
- React Native报Super expression error must either be null or a function错误分析
- ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form
- Uncaught TypeError: Super expression must either be null or a function, not undefine
- Uncaught (in promise) TypeError: Super expression must either be null or a function
- mybatis报错Type interface xxx.Dao is not known to the MapperRegistry
- Mybatis报错——Type interface com.mapper.EmployeeMapper is already known to the MapperRegistry.
- SSISThe Address in the "To" line is malformed. It is either missing the "@" symbol or is not valid.
- linq insert The null value cannot be assigned to a member with type System.Int64 which is a non-null
- 【原】React Native踩坑系列之-Super expression must either be null or a function, not undefined
- C#SSH.NET连接报错"value cannot be null All lists either null or empty"
- if the reference of the thread is set to null.
- The specified named connection is either not found in the configuration, not intended to be used
- MyBatis:The expression 'list' evaluated to a null value
- 发布应用到App Store问题:The CodeResources file is missing and it must be a symbolic link to _CodeSignature
- XAMPP报错This may be due to a blocked port, missing dependencies
- 404报错:The server cannot or will not process the request due to something that is perceived to be a c
- The callback function, ewew, specified in the UIR file, is not a known function. If you are using a
- 手把手教你使用Git
- 修改PHP服务器文件上传大小限制-apache,lighttpd,nginx
- 查询mysql当前连接数
- 实现线程的几种方式
- B/S菜单页后台布局
- freemarker报错:Tip: If the failing expression is known to be legally null/missing, either specify a de
- light black color code in android
- Java反射机制
- Draw Picture With Python Matplotlib
- 代码分析/统计工具汇总
- nodejs addon如何生成xcode工程
- redis之哈希类型(hash)
- Launcher 之 改framework层
- 美利金融保障金计划并非先例