⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basetestcase.java

📁 使用WEBWORK,SPRING,HIBERNATE编写的简单的添加
💻 JAVA
字号:
/**
 *文件功能: 
 */
package com.common.spring.test;

import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

/**
 * spring单元测试基类
 * @作者 徐建协
 * @日期 2008-2-4
 */
public abstract class BaseTestCase extends
		AbstractTransactionalDataSourceSpringContextTests {

	protected final void onSetUpBeforeTransaction() throws Exception {
        super.onSetUpBeforeTransaction();
        this.init();
    }

    protected final void onTearDownAfterTransaction() throws Exception {
        super.onTearDownAfterTransaction();
        this.destroy();
    }

    protected abstract void init();

    protected abstract void destroy();
    @Override
    public String[] getConfigLocations() {
        // TODO get the spring context
    	return new String[] {"classpath*:/applicationContext.xml"};     

     }
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -