티스토리 뷰

Skill/spring

JasyptConfig.java

진열사랑 2025. 1. 13. 09:49

**--------------------------------------------------------------------
* ■Property 암복호화 설정
--------------------------------------------------------------------**/
@Configuration
public class JasyptConfig {
private static final String ENCRYPT_KEY = "----";

@Bean("JasyptStringEncryptor")
public StandardPBEStringEncryptor stringEncryptor() {
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
EnvironmentPBEConfig config = new EnvironmentPBEConfig();

config.setPassword(ENCRYPT_KEY);
config.setAlgorithm("PBEWithMD5AndDes");
encryptor.setConfig(config);

return encryptor;
}
}

'Skill > spring' 카테고리의 다른 글

RedisConfig.java  (0) 2025.01.13
PropertiesCheck.java  (0) 2025.01.13
AsyncConfig.java  (0) 2025.01.13
ServiceApplication  (0) 2025.01.09
mybatis 문자열 비교  (0) 2024.12.02
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함