第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

@RequiresRoles無效

為什么@RequiresRoles無效,我是跟著視頻敲的,springmvc.xml注解我也寫了的

正在回答

3 回答

可以去掉<aop:config> 添加<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor">
?? ?<property name="proxyTargetClass" value="true" />
</bean> 試試

0 回復(fù) 有任何疑惑可以回復(fù)我~
<?xml?version="1.0"?encoding="UTF-8"?>
<beans?xmlns="http://www.springframework.org/schema/beans"
???????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
???????xmlns:context="http://www.springframework.org/schema/context"
???????xmlns:mvc="http://www.springframework.org/schema/mvc"
???????xmlns:aop="http://www.springframework.org/schema/aop"
???????xsi:schemaLocation="http://www.springframework.org/schema/mvc?http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
??????http://www.springframework.org/schema/beans?http://www.springframework.org/schema/beans/spring-beans.xsd
??????http://www.springframework.org/schema/context?http://www.springframework.org/schema/context/spring-context-4.3.xsd
??????http://www.springframework.org/schema/aop?http://www.springframework.org/schema/aop/spring-aop-4.2.xsd">

????<context:component-scan?base-package="com.wb.controller">
????</context:component-scan>


????<!--?1、這里對?/?與?/*?作扼要說明:
?????????/?是??根目錄
?????????/*?是攔截所有請求,包括.html等靜態(tài)文件
?????????(以區(qū)別于url-pattern中的?/)
?????????2、這里既然攔截所有請求,但是卻不會影響Controller
?????????主要是因為,所有請求先經(jīng)過dispatcherServlet
?????????才會進入到??spring-mvc.xml?文件中-->
????<mvc:resources?location="/"?mapping="/*"/>
????<aop:config?proxy-target-class="true"></aop:config>
????<bean?class="org.apache.shiro.spring.LifecycleBeanPostProcessor"></bean>

????<bean?class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
????????<property?name="securityManager"?ref="securityManager"/>
????</bean>

????<mvc:annotation-driven/>
</beans>


0 回復(fù) 有任何疑惑可以回復(fù)我~

第一,你可以看看和數(shù)據(jù)庫里的權(quán)限設(shè)置是否一致,是不是值寫錯了。

第二,你用@RequiresRoles注解的話理論上來說不需要在配置攔截的url,如果配置了也應(yīng)該保持和注解一致,你最好把xml文件里的貼出來

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

影子愛月 提問者

下面就是springmvc的xml,這個權(quán)限我是默認的,沒有連接數(shù)據(jù)庫
2018-06-20 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

@RequiresRoles無效

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號