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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

spring aop 配置問(wèn)題

配置了aop就一直報(bào)錯(cuò) 大神求助

警告: Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aspectAspect' defined in URL [file:/E:/IdeaProjects/SpringBasic/out/production/SpringBasic/spring-aop-schema-advice.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)#21901ca8' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#21901ca8': Cannot resolve reference to bean 'pointcut' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)#21901ca8' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#21901ca8': Cannot resolve reference to bean 'pointcut' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#21901ca8': Cannot resolve reference to bean 'pointcut' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException


正在回答

8 回答

<!--添加aspectjweaver包 -->
?? ??? ?<dependency>
?? ??? ??? ?<groupId>org.aspectj</groupId>
?? ??? ??? ?<artifactId>aspectjweaver</artifactId>
?? ??? ??? ?<version>1.8.5</version>
?? ??? ?</dependency>

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

maven添加依賴

<dependency>

<groupId>org.aspectj</groupId>

<artifactId>aspectjrt</artifactId>

<version>1.6.12</version>

</dependency>

<dependency>

<groupId>org.aspectj</groupId>

<artifactId>aspectjweaver</artifactId>

<version>1.6.12</version>

</dependency>

<dependency>

<groupId>cglib</groupId>

<artifactId>cglib</artifactId>

<version>2.2</version>

</dependency>


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

Elske63

感謝!
2019-11-03 回復(fù) 有任何疑惑可以回復(fù)我~

缺少aspectjweaver-1.8.10.jar,這個(gè)包

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

這個(gè)問(wèn)題怎么解決誰(shuí)知道啊??


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

看最后一句 ?缺少包aspectjweaver

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

應(yīng)該切入點(diǎn)的expression切入點(diǎn)表達(dá)式寫(xiě)的不錯(cuò)execution(*?com.peak.aop.schema.advice.biz.*.*(..)),表示執(zhí)行biz包中的任意類(lèi)中的任意方法,均可執(zhí)行切面程序。

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

配置文件

<beans?xmlns="http://www.springframework.org/schema/beans"
???????????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
???????????????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/aop?http://www.springframework.org/schema/aop/spring-aop.xsd">

<bean?id="aspectAspect"?class="com.peak.aop.schema.advice.Aspect"></bean>
<bean?id="aspectBiz"?class="com.peak.aop.schema.advice.biz.AspectBiz"></bean>

<aop:config>
???????<aop:pointcut?id="pointcut"?expression="execution(*?com.peak.aop.schema.advice.biz.*(..))"/>
???????<aop:aspect?id="aspectAOP"?ref="aspectAspect">
??????????????<aop:before?method="work"?pointcut-ref="pointcut"/>
???????</aop:aspect>
</aop:config>
</beans>


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

舉報(bào)

0/150
提交
取消
Spring入門(mén)篇
  • 參與學(xué)習(xí)       268802    人
  • 解答問(wèn)題       1017    個(gè)

為您帶來(lái)IOC和AOP的基本概念及用法,為后續(xù)高級(jí)課程學(xué)習(xí)打下基礎(chǔ)

進(jìn)入課程

spring aop 配置問(wèn)題

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

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

幫助反饋 APP下載

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

公眾號(hào)

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