SpringJunit测试类 BaseTest(转)
- /**
- *
- *
- * @author Jerval
- * @date 2011-2-17
- */
- @RunWith(SpringJUnit4ClassRunner.class)
- @ContextConfiguration(locations = { "classpath:applicationContext.xml"})
- //@ContextConfiguration(locations = { "classpath:applicationContext.xml","classpath:spring-context/StorageApplicationContext.xml"})
- //@TransactionConfiguration(transactionManager = "txManager", defaultRollback = true)
- //@Transactional
- public class BaseTest {
- //如果需要留下数据在数据库中,请单独注释掉//@Transactional
- //需要记录日志时候直接从子类中使用
- protected Logger logger = Logger.getLogger(BaseTest.class);
- }