让MarsBean实现InitBean接口

@MarsBean("testService")
public class TestService implements InitBean {

}

重写init方法

@MarsBean("testService")
public class TestService implements InitBean {

    public void init(){
        重写这个方法,然后在里面写你要的初始化操作
    }
}

results matching ""

    No results matching ""