Skip to content

Commit

Permalink
增加配置文件加密说明
Browse files Browse the repository at this point in the history
  • Loading branch information
vector4wang committed Feb 19, 2020
1 parent f4d1b54 commit a8dd08c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions quick-config-encrypt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 配置文件加解密
使用见测试用例

其他内容,参见https://github.com/ulisesbocchio/jasypt-spring-boot
3 changes: 2 additions & 1 deletion quick-config-encrypt/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ jasypt:


app:
key: ENC(EeLEEUGhQ+bXIoVs9bItmA==)
key: ENC(EeLEEUGhQ+bXIoVs9bItmA==)
name:
4 changes: 3 additions & 1 deletion quick-config-encrypt/src/test/java/com/encrypt/TestMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class TestMain {

@Test
public void test() {
System.out.println(key);
String encrypt = stringEncryptor.decrypt("Er1K3WxM3M8o2Ynazkwkbg==");
System.out.println(encrypt);//Er1K3WxM3M8o2Ynazkwkbg==
System.out.println(key);
}
}

0 comments on commit a8dd08c

Please sign in to comment.