java.lang.ClassNotFoundException : org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer

pickylemon·2024년 5월 2일

Exception 모음

목록 보기
7/31

java.lang.ClassNotFoundException : org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer

상황

Jasypt를 활용해 설정 정보를 암호화하려는데, 클래스 org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer를 찾을 수 없어서 Bean등록할 수 없다는 에러가 뜬다.

원인 및 해결

잘못된 Dependency를 추가해서 Class를 찾을 수 없었던 것.
org.jasypt » jasypt가 아니라
org.jasypt » jasypt-spring31 를 추가해야 클래스를 찾아 bean으로 등록할 수 있다.

<!-- https://mvnrepository.com/artifact/org.jasypt/jasypt -->
<dependency>
    <groupId>org.jasypt</groupId>
    <artifactId>jasypt</artifactId>
    <version>1.9.2</version>
</dependency>


<!-- https://mvnrepository.com/artifact/org.jasypt/jasypt-spring31 -->
<dependency>
    <groupId>org.jasypt</groupId>
    <artifactId>jasypt-spring31</artifactId>
    <version>1.9.2</version>
</dependency>
profile
안녕하세요

0개의 댓글