单元测试的基类


@ContextConfiguration(locations = {"classpath:conf/spring/spring-context-test.xml"})
// 设置事务默认回滚, 子类如果需要回滚,则需自定义添加
@TransactionConfiguration(defaultRollback = false)
public class BaseTest extends AbstractTransactionalTestNGSpringContextTests {
    protected final Logger LOGGER = LoggerFactory.getLogger(getClass());
}

你可能感兴趣的:(单元测试的基类)