EgovEnvCryptoService에서 decrypt 을 사용하여 복호화 시 에러가 발생합니다.
- 작성자 :
- 김*리
- 작성일 :
- 2024-03-06 14:15:23
- 조회수 :
- 482
- 구분 :
- 개발환경 / 3.10
- 진행상태 :
- 완료
Q
public class EgovEnvCryptoCreate {
private static final Logger LOGGER = LoggerFactory.getLogger(EgovEnvCryptoCreate.class);
public static void main(String[] args) {
LOGGER.info("------------------------------------------------------");
ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"classpath:/config/spring/context-egovcrypto.xml"});
LOGGER.info("------------------------------------------------------");
EgovEnvCryptoService cryptoService = context.getBean(EgovEnvCryptoServiceImpl.class);
LOGGER.info("------------------------------------------------------");
LOGGER.info("Custom decrypted :" + cryptoService.decrypt( "복호화 대상" ));
((ConfigurableApplicationContext)context).close();
}
}
을 실행시 다음과 같은 오류가 발생합니다.
14:08:50.276 [main] WARN org.springframework.context.support.ClassPathXmlApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovEnvCryptoConfigurerService' defined in InputStream resource [resource loaded through InputStream]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [egovframework.rte.fdl.property.impl.EgovPropertyServiceImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovEnvCryptoConfigurerService' defined in InputStream resource [resource loaded through InputStream]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [egovframework.rte.fdl.property.impl.EgovPropertyServiceImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
private static final Logger LOGGER = LoggerFactory.getLogger(EgovEnvCryptoCreate.class);
public static void main(String[] args) {
LOGGER.info("------------------------------------------------------");
ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"classpath:/config/spring/context-egovcrypto.xml"});
LOGGER.info("------------------------------------------------------");
EgovEnvCryptoService cryptoService = context.getBean(EgovEnvCryptoServiceImpl.class);
LOGGER.info("------------------------------------------------------");
LOGGER.info("Custom decrypted :" + cryptoService.decrypt( "복호화 대상" ));
((ConfigurableApplicationContext)context).close();
}
}
을 실행시 다음과 같은 오류가 발생합니다.
14:08:50.276 [main] WARN org.springframework.context.support.ClassPathXmlApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovEnvCryptoConfigurerService' defined in InputStream resource [resource loaded through InputStream]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [egovframework.rte.fdl.property.impl.EgovPropertyServiceImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egovEnvCryptoConfigurerService' defined in InputStream resource [resource loaded through InputStream]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [egovframework.rte.fdl.property.impl.EgovPropertyServiceImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
환경정보
-
- OS 정보 :
- 표준프레임워크 버전 :
- JDK(JRE) 정보 :
- WAS 정보 :
- DB 정보 :
- 기타 환경 정보 :
A
안녕하세요.
표준프레임워크 센터입니다.
기재하신 내용만으로는
정확한 답변이 어렵습니다.
에러 로그를 통해 알 수 있는 내용으로
'egovEnvCryptoConfigurerService'의 bean을 생성하지 못했다는 것으로
해당 문제에는 다양한 원인이 있을 수 있습니다.
실행환경 라이브러리 버전이나 JDK 버전 등을 확인하시어
의존성이나 호환성에 문제가 없는지를 우선적으로 확인해 보시기 바랍니다.
다음 소스가 참고가 될듯 합니다.
https://github.com/eGovFramework/egovframe-common-components/blob/main/src/test/java/egovframework/com/crypto/err/TestEncrypt.java
감사합니다.
표준프레임워크 센터입니다.
기재하신 내용만으로는
정확한 답변이 어렵습니다.
에러 로그를 통해 알 수 있는 내용으로
'egovEnvCryptoConfigurerService'의 bean을 생성하지 못했다는 것으로
해당 문제에는 다양한 원인이 있을 수 있습니다.
실행환경 라이브러리 버전이나 JDK 버전 등을 확인하시어
의존성이나 호환성에 문제가 없는지를 우선적으로 확인해 보시기 바랍니다.
다음 소스가 참고가 될듯 합니다.
https://github.com/eGovFramework/egovframe-common-components/blob/main/src/test/java/egovframework/com/crypto/err/TestEncrypt.java
감사합니다.