配置文件加密
This commit is contained in:
parent
485cca00c5
commit
9fb868b93b
|
|
@ -55,7 +55,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>${jasypt-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>${jasypt-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,10 @@ public class BonusGatewayApplication implements CommandLineRunner {
|
|||
private StringEncryptor encryptor;
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
String nacos = encrypt("Jjsp@nacos2023" );
|
||||
String mogodb = encrypt("Bonus@admin123!" );
|
||||
System.err.println( "nacos原始明文密码加密后的结果为:" + nacos );
|
||||
System.err.println( "mogodb原始明文密码加密后的结果为:" + mogodb );
|
||||
// String string = decrypt("ENC(b8K5x5rjN7qdGdmhgzFayK/P6ZVbC/UNBHjx2SBJkoqU149aXRtJsFhDZcgpckFf)");
|
||||
// System.err.println( "明文结果为:" + string );
|
||||
// String encryptStr = encrypt("f648524d-0a7b-449e-8f92-64e05236fd51" );
|
||||
// System.err.println( "原始明文密码加密后的结果为:" + encryptStr );
|
||||
// String decrtyptStr = decrypt("ENC(b8K5x5rjN7qdGdmhgzFayK/P6ZVbC/UNBHjx2SBJkoqU149aXRtJsFhDZcgpckFf)");
|
||||
// System.err.println( "明文结果为:" + decrtyptStr );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>${jasypt-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@
|
|||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<!--加密依赖包-->
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>${jasypt-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue