grails shiro2

shiro默认使用的密码加密方式:

String password = shiroUserInstance.passwordHash
// 对密码加密
shiroUserInstance.passwordHash = new Sha256Hash(password).toHex()


列出所有controller和action

<div style="float: right; width: 300px">
    <h1>所有controller和action</h1>
    <ul id="actionTree">
        <g:each in="${grailsApplication.controllerClasses}" var="c">
            <li>
                ${c.name.replace(c.name.charAt(0), c.name.charAt(0).toLowerCase())}
                <ul>
                    <%
                        List<String> actions = new ArrayList<String>()
                        actions = c.getURIs().collect({ uri ->
                            c.getMethodActionName(uri)
                        }).unique().sort() - "index"
                    %>
                    <g:each in="${actions}" var="action">
                        <li>${action}</li>
                    </g:each>
                </ul>
            </li>
        </g:each>
    </ul>
</div>


你可能感兴趣的:(grails,password)