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

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

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aspectJ' defined in class path resource [ApplicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is

錯(cuò)誤信息:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aspectJ' defined in class path resource [ApplicationContext.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': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ')' at character position 30

extucion(*com.demo.service.*.*(..))

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^


ApplicationContext.xml

<?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-3.0.xsd

? ? ? ? ? ?http://www.springframework.org/schema/context

? ? ? ? ? ?http://www.springframework.org/schema/context/spring-context-3.0.xsd

? ? ? ? ? ?http://www.springframework.org/schema/aop

? ? ? ? ? ?http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

? ? ? ? ? ?">


<bean id="aspectJ" class="com.demo.aspect.AspectJ"></bean>

<bean id="aspectService" class="com.demo.service.AspectService"></bean>

<!-- 切面的配置 -->

<aop:config>

<aop:aspect id="aspectJAOP" ref="aspectJ">

<!-- 切入點(diǎn)的配置 -->

<aop:pointcut expression="extucion(*com.demo.service.*.*(..))" id="aspectPointcut"/>

<!-- beforeAdvice的聲明 -->

<aop:before method="before" pointcut-ref="aspectPointcut"/>

</aop:aspect>

</aop:config>


</beans>


AspectJ.java

package com.demo.aspect;


import org.aspectj.lang.annotation.Aspect;



@Aspect

public class AspectJ {

public void before(){

System.out.println("Before");

}

}

AspectService.java

package com.demo.service;


public class AspectService {

public void service(){

System.out.println("AspectService service");

}


}

SpringText.java

package com.demo.test;


import org.springframework.context.ApplicationContext;

import org.springframework.context.support.ClassPathXmlApplicationContext;


import com.demo.aspect.AspectJ;

import com.demo.service.AspectService;


public class SpringTest {


public static void main(String[] args){

ApplicationContext ctx=new ClassPathXmlApplicationContext("ApplicationContext.xml");

AspectService service= (AspectService) ctx.getBean("aspectService");

service.service();

}

}


正在回答

1 回答

你的SpringTest是JUnit單元測(cè)試嗎 單元測(cè)試要寫@Test注解然后右鍵這個(gè)方法名 run as JUnit?而且不是在main方法那里運(yùn)行吧,具體你可以參考老師單元測(cè)試的寫法

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

qq_慕斯8337134 提問者

非常感謝!
2016-11-15 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aspectJ' defined in class path resource [ApplicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is

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

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

幫助反饋 APP下載

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

公眾號(hào)

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