• springboot component注入servecie


    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;
    }

    }

  • 相关阅读:
    Java 高级文件处理
    drf10
    drf9
    drf8
    drf7
    drf6
    drf5
    drf4
    drf3
    drf2
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/11994361.html
Copyright © 2020-2023  润新知