package com.ssyf.common.security.holder;

import com.ssyf.common.security.handler.CertificateSecretHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 证书处理对象持有类
 * @author huwei
 * @date 2024/3/20 15:54
 */
public class CertificateSecretHandlerHolder {

    private static CertificateSecretHandler handler;

    public static CertificateSecretHandler holder(){
        return handler;
    }

    @Component
    public static class Init{
        public Init(@Autowired CertificateSecretHandler certificateSecretHandler){
            CertificateSecretHandlerHolder.handler = certificateSecretHandler;
        }
    }
}
