spring-test跟junit结合单元测试获取ApplicationContext实例的方法
摘要:
步骤 1、继承AbstractJUnit4SpringContextTests 2、引入ApplicationContext 示例代码:(可以根据name或者类型获取bean) 1 import org.junit.runner.RunWith; 2 import org.springframewo 阅读全文
posted @ 2018-12-29 15:43 那只马儿 阅读(3520) 评论(0) 推荐(0) 编辑