1 对类进行 @Component 定义
2 定义service及 static service
@Component public class OperationalJudgment { private static MemberService memberService; @Resource private MemberService service; @PostConstruct public void init() { memberService=this.service; }
3 static方法中使用