@RunWith(BlockJUnit4ClassRunner.class) 正確的應(yīng)該是使用Spring-test里面的測試單元 1 @RunWith(SpringJUnit4ClassRunner.class) 大家寫代碼一定要仔細(xì)啊!不然多的時間浪費(fèi)了。 Test包中使用autowired注入提示Could not autowire. No beans of 'xxx' type found. 嘗試了網(wǎng)上各種方法,最后發(fā)現(xiàn) 將autowired注解換成R...