shop++採用了Apache shiro安全框架,爲系統新添加的模塊配置管理權限的方法以下:html
1、在/src/applicationContext-shiro.xml中配置權限路徑數據庫
<property name="filterChainDefinitions">安全
<value>app
/admin/ = anon框架
/admin/index.jsp = anonjsp
/admin/login.jsp = authcspa
/admin/logout.jsp = logoutxml
/admin/common/captcha.jhtml = anonhtm
/admin/product/** = perms["admin:product"]it
/admin/** = authc
</value>
</property>
/admin/product/** 表示須要進行權限管理的路徑,**表明全部下級目錄
perms["admin:product"] admin:product權限標識
2、在數據庫xx_role_authority表中添加相應權限,也可在/WEB-INF/template/admin/role/edit.ftl中添加相應權限選擇項