使用Spring安全标签的可能方法是什么 <sec:authentication property="principal.id" /> <c:setâ¦> 标签?
<sec:authentication property="principal.id" />
<c:setâ¦>
这些声明:
<c:set var="userId" value="<sec:authentication property='principal.id' />"/> <c:set var="userId" value="<sec:authentication property=\"principal.id\" />"/>
在您的案例中没有理由使用value属性。使用 <c:set>
<c:set>
<c:set var="userId"> <sec:authentication property="principal.id"/> </c:set>