freemaker 关于 <@spring.message code=“code”/>
在springboot+freemaker 开发的系统中配置了 国际化配置(spring:message标签方式)
可以使用 <@spring.message code=“code”/> (code在后台已经定义)请求后台的相应内容,但当用于if比较时会报错,无法使用或者无法取值
<#if type?? && type = '<@spring.message "code" />'
报错
可以使用以下代码来代替
${springMacroRequestContext.getMessage("code")}
以上仅展示了部分代码