静态方法使用@Autowired 注入 重写set方法 private static McService mcService; @Autowired public void setMcService(McService mcService){ this.mcService = mcService; }