为啥我这样取直接报错了呢?
<span th:text="${session.user.authority}"></span>
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'authority' cannot be found on null
为啥我这样取直接报错了呢?
<span th:text="${session.user.authority}"></span>
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'authority' cannot be found on null
user对象是null,你得先判断user是否为null再取user.authority