<dependency>
    <groupId>com.github.ulisesbocchio</groupId>
    <artifactId>jasypt-spring-boot-starter</artifactId>
    <version>2.0.0</version>
 </dependency>

org\jasypt\jasypt\1.9.2

java -cp jasypt-1.9.2.jar  org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="test" password=salt algorithm=PBEWithMD5AndDES

-- input参数:密码
-- password参数:盐
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.3.52:3306/test?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=true&
      nullCatalogMeansCurrent=true
    #    username: root
    username: ENC(qh8kixDUkvm1DIJrpLFtzw==)
    #    password: 123456
    password: ENC(qh8kixDUkvm1DIJrpLFtzw==)


jasypt:
  encryptor:
    password: salt

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐