首页 > 编程语言 > 详细

SpringJunit测试类 BaseTest(转)

时间:2017-12-27 11:04:28      阅读:315      评论:0      收藏:0      [点我收藏+]

Java代码  技术分享图片
  1. /** 
  2.  *  
  3.  *  
  4.  * @author Jerval 
  5.  * @date 2011-2-17 
  6.  */  
  7. @RunWith(SpringJUnit4ClassRunner.class)  
  8. @ContextConfiguration(locations = { "classpath:applicationContext.xml"})  
  9. //@ContextConfiguration(locations = { "classpath:applicationContext.xml","classpath:spring-context/StorageApplicationContext.xml"})  
  10. //@TransactionConfiguration(transactionManager = "txManager", defaultRollback = true)  
  11. //@Transactional  
  12. public class BaseTest {  
  13.     //如果需要留下数据在数据库中,请单独注释掉//@Transactional  
  14.     //需要记录日志时候直接从子类中使用  
  15.     protected Logger logger = Logger.getLogger(BaseTest.class);  
  16. }  
 

SpringJunit测试类 BaseTest(转)

原文:https://www.cnblogs.com/jpfss/p/8124339.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!