目前有这个:
<sec:ifLoggedIn>
<sec:username/><br/>
<sec:roles/><br/>
<g:link controller="logout" action="index">Logout</g:link>
</sec:ifLoggedIn>
<sec:ifNotLoggedIn>
<h1>Who are you?</h1><br/>
<g:link controller="login" action="auth">LOGIN</g:link>
</sec:ifNotLoggedIn>
这给出了错误:
Tag [roles] does not exist. No tag library found for namespace: sec
但是,当我删除它时,<sec:roles/><br/>
它工作正常。为什么是这样?这只是生产中的一个问题,在 intellij 上一切都很好。