springboot如何在ftl頁面上使用shiro標簽-創新互聯
這篇文章將為大家詳細講解有關springboot如何在ftl頁面上使用shiro標簽,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
1.首先第一步導入依賴
com.github.theborakompanioni thymeleaf-extras-shiro 1.2.1
2.在配置shiro權限的方法內加入
@Bean public ShiroDialect shiroDialect() { return new ShiroDialect(); }
3.ftl頁面中引入命名空間
4.ftl頁面中使用標簽
<@shiro.hasRole name="merchants">我有這個角色哦!
關于“springboot如何在ftl頁面上使用shiro標簽”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
文章題目:springboot如何在ftl頁面上使用shiro標簽-創新互聯
鏈接分享:http://www.xueling.net.cn/article/iodjj.html