【Java开源代码栏目提醒】:网学会员为需要Java开源代码的朋友们搜集整理了BeforeAdviceTest.java相关资料,希望对各位网友有所帮助!
package spring.adviceExample;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class BeforeAdviceTest {
public static void main(String[] args)
{
// ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
// Hello hello = (Hello)context.getBean("proxy");
// try{
// ((GoodBye)hello).sayGoodBye();
// hello.sayHello();
// }
// catch(MyException e)
// {
// }
ApplicationContext context1 = new ClassPathXmlApplicationContext("beans.xml");
Hello hello1 = (Hello)context1.getBean("proxy");
hello1.sayHello();
}
}
上一篇:
BeeShirtsServlet.java
下一篇:
法律专业开题报告范文