修改servlet 的 init 方法,添加以下代码:SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); 就可在servlet中使用注入了:@Autowired private MapApiconfigServiceI mapApiconfigService;