public class HelloBean {          //这是一个hellobean类
private String name; public String getName() {
return name;
} public void setName(String name) {
this.name = name;
}

public void sayHello(String name){
System.out.println("Hello"+name);
}

public void sayBye(String name){
System.out.println("Bye"+name);
}}
@Aspect                       //在AspectHello这个类  声明了切面  切入点  通知
public class AspectHello {

@Pointcut("execution(public * *(..))")
public void fooExecution(){}

@Before("AspectHeelo.fooExecution()")
public void DoBefore(){
System.out.println("before");
} @AfterReturning("AspectHeelo.fooExecution()")
public void DoAfter(){
System.out.println("after");
}

public static void main(String args[]){
ClassPathResource resourse=new ClassPathResource("applicationContext.xml");

BeanFactory factory=new XmlBeanFactory(resourse);
HelloBean hello=(HelloBean)factory.getBean("hellobean");
hello.sayHello("gg");
hello.sayBye("tt"); 
}

}<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"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/aop/spring-tx-2.5.xsd
">


<bean id="hellobean" class="HelloBean">
</bean>

<bean id="myAspect" class="AspectHello">
</bean></beans>
程序执行之后,运行如下
hello gg
bye tt请问为什么前置通知和后置通知没有出现   我刚学,对spring原理还不是很懂   搞了挺久也没弄明白   求帮忙解答!!