码迷,mamicode.com
首页 > 编程语言 > 详细

springboot component注入servecie

时间:2019-12-06 13:27:13      阅读:194      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!