afterintegrationtests.java
来自「一些很有用的spring的书籍」· Java 代码 · 共 27 行
JAVA
27 行
package com.apress.springbook.chapter03;
import junit.framework.TestCase;
import org.springframework.core.io.ClassPathResource;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
public class AfterIntegrationTests extends TestCase {
private static BeanFactory beanFactory = new XmlBeanFactory(
new ClassPathResource(
"com/apress/springbook/chapter03/after-tests.xml"
)
);
private static InitializingBeanNameClass testBean;
public static void main(String[] args) {
testBean = (InitializingBeanNameClass)beanFactory.getBean("afterBean");
testBean.showValues();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?