标签:bean info bye autowire ota framework str serve pack
package com.infosec.sso.component.externalauthandsyn;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.netauth.api.user.UserExtensionClient;
import com.netauth.utils.jsonresult.JsonResult;
@Component
public class AccountByExternalAuthAndSyn {
@Autowired
private UserExtensionClient userExtensionClient;
private static UserExtensionClient accSynMiddle;
public Map<String, Object> createAccountByExternalAuthAndSyn(String userId, String pwd) {
JsonResult res = accSynMiddle.createAccountByExternalAuthAndSyn(userId, pwd);
return (Map<String, Object>) res.getResult();
}
@PostConstruct
public void sessionUtilsInit() {
AccountByExternalAuthAndSyn.accSynMiddle = userExtensionClient;
}
}
springboot component注入servecie
标签:bean info bye autowire ota framework str serve pack
原文地址:https://www.cnblogs.com/cuijinlong/p/11994361.html