@Resource annotation is not supported on static fields
问题解决
写set方法,在set方法上做注解
@Component
public final class OAuthUtil {
private static OAuthService oauthService;
@Resource(name = "woldoauthService")
public void setOauthService(OAuthService oauthService) {
OAuthUtil.oauthService = oauthService;
}
}