乐趣区

Static-工具类-注入-service

import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.svc.XXSvc;

@Component
public class XXUtil {

@Autowired
XXSvc xXSvc;
private static XXUtil  xXUtil ;

@PostConstruct
public void init() {
    xXUtil = this;
    xXUtil.xXSvc = this.xXSvc;
}

public static Boolean xMethod(String name) {return xXUtil.xXSvc.XMethod(name);
}

}

退出移动版