在JUnit4 版本,在測試類加 @SpringBootTest 註解時,同樣要加上 @RunWith(SpringRunner.class) 才生效,即: @SpringBootTest @RunWith(SpringRunner.
確定! 回上一頁