Junit 測試那些事

Junit使用的非註解形式 Junit使用的註解形式 遇到一個問題1 要求Junit依賴的版本要和spring-test 兼容,否則會報junit版本太低的錯誤 遇到一個問題2 使用userMapper 調用方法出現異常,原因:userMapper注入失敗。根源:@RunWith(「JUnit4.class」)應該改爲@RunWith(SpringJUnit4ClassRunner.class)
相關文章
相關標籤/搜索