文章目录 依赖 springboot配置 通过明文获取加密的值 通过密文和盐值解密得到明文 依赖 <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>1.14</version> </dependency> springboot配置 yml配置 jasypt: encryptor: password: saltValue #salt值,密文加盐 spring: datasource: # 数据库链接 db1: jdbc-url: jdbc:mysql