@RunWith(SpringJUnit4ClassRunner.class)//基于Junit4
的测试框架
@ContextConfiguration(locations =
{
"classpath*:config/spring/callcenter/appcontext-*.xml","classpath*:config/test/integrate/spring/appcontext-db*.xml",
"classpath*:config/sqlmap/bookingCallEvent/*.xml"})//启动Spring容器
@TransactionConfiguration(defaultRollback = true)
//事务设置
@Transactional
public abstract class AbstractTestObject
{
static
{
DOMConfigurator.configure("target/classes/log/log4j.xml");
}
}
原文:http://www.cnblogs.com/forstudy556/p/3568348.html