diff --git a/src/main/java/com/eactive/eai/common/hsm/HsmManager.java b/src/main/java/com/eactive/eai/common/hsm/HsmManager.java index 9749acf..8409876 100644 --- a/src/main/java/com/eactive/eai/common/hsm/HsmManager.java +++ b/src/main/java/com/eactive/eai/common/hsm/HsmManager.java @@ -52,7 +52,8 @@ public class HsmManager implements Lifecycle { private static final String GROUP_NAME = "HSM"; private static final String PROP_CONFIG = "PKCS11_CONFIG"; private static final String PROP_PIN = "PIN"; - + private static final String PROP_RELOAD_INTERVAL_MINUTES = "RELOAD_INTERVAL_MINUTES"; + private Provider pkcs11Provider; private volatile KeyStore keyStore; private boolean started; @@ -62,7 +63,7 @@ public class HsmManager implements Lifecycle { private volatile char[] pin; // 재로드 주기 (분 단위). 필요시 PropManager로 외부화 가능. - private static final long RELOAD_INTERVAL_MINUTES = 1; + private static long RELOAD_INTERVAL_MINUTES = 1; private ScheduledExecutorService scheduler; private ScheduledFuture reloadFuture; @@ -92,6 +93,9 @@ public class HsmManager implements Lifecycle { } private void init() throws Exception { + + String reloadIntervalStr = PropManager.getInstance().getProperty(GROUP_NAME, PROP_RELOAD_INTERVAL_MINUTES, "10"); + RELOAD_INTERVAL_MINUTES = Long.parseLong(reloadIntervalStr); EncryptionManager encManager = EncryptionManager.getInstance(); String configContent = encManager.decryptDBData(PropManager.getInstance().getProperty(GROUP_NAME, PROP_CONFIG));