1. 程式人生 > >Spring Mybatis jUnit 單元測試

Spring Mybatis jUnit 單元測試

@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations={"classpath:springConfig/spring-db.xml"})

單個檔案 

@ContextConfiguration(Locations="classpath:applicationContext.xml")   @ContextConfiguration(classes = SimpleConfiguration.class)

多個檔案時,可用{}

@ContextConfiguration(locations = { "classpath:spring1.xml", "classpath:spring2.xml" })  ---------------------  作者:weixin_41315469  來源:CSDN  原文:https://blog.csdn.net/weixin_41315469/article/details/79675044?utm_source=copy  版權宣告:本文為博主原創文章,轉載請附上博文連結!