亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

請問為什么一直初始化不了id為pointcutBean的類

<?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:aop="http://www.springframework.org/schema/aop"
????xsi:schemaLocation="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.xsd
????????http://www.springframework.org/schema/aop
????????http://www.springframework.org/schema/aop/spring-aop-4.0.xsd"?>
?
?<context:component-scan?base-package="com.ioket.aop.api"></context:component-scan>
?
?<bean?id="bizLogicImplTarget"?class="com.ioket.aop.api.BizLogicImpl"/>
?<bean?id="pointcutBean"?class="org.springframework.aop.support.NameMatchMethodPointcut">?
??<property?name="mappedNames">
???<list>?
????<value>sa*</value>?
???</list>
??</property>?
??</bean>??????????
</beans>


正在回答

3 回答

spring-aop-api.xml 這個是我在根目錄下創建的xml文件,,內容和你的一樣

0 回復 有任何疑惑可以回復我~
ApplicationContext?alc;
alc=new?ClassPathXmlApplicationContext("spring-aop-api.xml");
NameMatchMethodPointcut?bean=(NameMatchMethodPointcut)?alc.getBean("pointcutBean");

這樣就行了

0 回復 有任何疑惑可以回復我~

報了什么錯?

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

請問為什么一直初始化不了id為pointcutBean的類

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號