我和SpringBoot+Thymeleaf+jQuery有个项目。我想在我的JavaScript中检查经过身份验证的用户的角色。基于角色,将使用jQuery呈现一段新的胸腺叶。变量应该在我的JS中是可见的,所以我可以这样做: function renderButton(){
if('${hasRoleAdmin}
当我使用"${#fields.hasErrors('whatever')}"时,我得到了这个错误
The identifier [#fields] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_