1. 程式人生 > >guns shiro按鈕許可權控制

guns shiro按鈕許可權控制

資料庫修改
relation(roleid)
menu (url) “/case/overview”

原有mapper

    <select id="getResUrlsByRoleId" resultType="string">
        select url from
        relation rel
        inner join menu m on rel.menuid = m.id
        where rel.roleid = #{roleId}
    </select>

頁面

@if(shiro.hasPermission("/flfgcx/search"
)){ <#button name="搜尋" clickFun="Flfgcx.search()"/> @}