<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>3.0.5</version>
</dependency>
cd /Users/xxxx/.m2/repository/org/jasypt/jasypt/1.9.2
java -cp jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="原始密码" password=你的加密密钥,自己随便生成 algorithm=PBEWithMD5AndDES
jasypt:
encryptor:
password: xxxx
algorithm: PBEWithMD5AndDES
iv-generator-classname: org.jasypt.iv.NoIvGenerator
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
dynamic:
primary: master
xa: true
datasource:
master:
url: jdbc:mysql://10.0.1.1:3306/xxxxx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: xxx
password: ENC(这里写上面生成的密码)