解决方法:(增加两行注解) @RunWith(SpringRunner.class)@SpringBootTestpublic class AreaMapperTest { 转载于:https://www.cnblogs.com/wuxingang/p/10809947.html