testapplicationcontextfactory.java
来自「struts+spring+hibernate自创框架」· Java 代码 · 共 25 行
JAVA
25 行
package com.pegasus.framework.test;
import junit.framework.TestCase;
import org.springframework.context.ApplicationContext;
import com.pegasus.framework.web.ApplicationContextFactory;
public class TestApplicationContextFactory extends TestCase {
private org.apache.log4j.Logger logger = org.apache.log4j.LogManager.getLogger(TestApplicationContextFactory.class);
public void testInit() {
System.out.println(TestApplicationContextFactory.class.getClassLoader().getResource(""));
ApplicationContext context = ApplicationContextFactory.getApplicationContext();
assertNotNull(context);
}
public static void main(String[] args) {
TestApplicationContextFactory test = new TestApplicationContextFactory();
test.testInit();
System.out.println("finish");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?