📄 someserviceimpltest.java
字号:
/**
* SomeServiceImplTest.java 1.0 2007-8-6 下午11:50:24,创建 by yangfan
*/
package aop;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
*
* @author yangfan
* @version 1.0 2007-8-6 下午11:50:24,创建
*/
public class SomeServiceImplTest
{
@SuppressWarnings("unused")
private static final Log log = LogFactory.getLog(SomeServiceImplTest.class);
private ApplicationContext ctx;
@Before
public void setUp() throws Exception
{
String[] paths = { "classpath:applicationContext-aop.xml" };
ctx = new ClassPathXmlApplicationContext(paths);
}
@After
public void tearDown() throws Exception
{
}
@Test
public void testAop()
{
SomeService someService = (SomeService) ctx.getBean("someService");
log.debug("someService.class==>" + someService.getClass());
someService.someMethod();
log.debug("---------invoke someInnerMetho----------------");
someService.someInnerMethod();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -