springboot 配置文件加密


    com.github.ulisesbocchio
    jasypt-spring-boot-starter
    2.0.0
 

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

你可能感兴趣的:(Java,spring,boot,java,eureka)