Jasypt 在 Spring Boot 中的应用

Jasypt 在 Spring Boot 中的应用

| By Sword.Liue

Jasypt(Java Simplified Encryption)

按照官方的说法:Jasypt(Java Simplified Encryption)是一个Java库,它使开发人员能够以最少的编码向其项目添加基本加密功能,而无需对加密的工作原理有太过深入的了解。

Jasypt (Java Simplified Encryption) is a java library which allows the developer to add basic encryption capabilities to his/her projects with minimum effort and without the need of having deep knowledge on how cryptography works.

1. 自动配置

如果你使用的是 Sping Boot, 并且开启了自动配置,那么请继续往下看,如果没有,可以直接跳过本节

# 开启了自动配置的 Spring Boot 启动类
# 长这样
@SpringBootApplication
...
public class CicishopApp {
    }

# 或者 长这样
@EnableAutoConfiguration
...
public class CicishopApp {
    }
1.1 添加 mvn 依赖
<dependency>
    <groupId>com.github.ulisesbocchio</groupId>
    <artifactId>jasypt-spring-boot-starter</artifactId>
    <version>2.1.2</version>
</dependency>

如果你的 Spring Boot 版本是 Version 2.1.X,那么请使用 <version>3.0.X</version>

截至 2020-05-30,Jasypt 的最新 starter 版本是 v3.0.2

Maven Central 也可以找到它([jasypt-spring-boot-starter]([https://search.maven.org/classic/#search%7Cgav%7C1%7Cg%3A%22com.github.ulisesbocchio%22%20AND%20a%3A%22jasypt-spring-boot-starter%22](https://search.maven.org/classic/#search|gav|1|g%3A"com.github.ulisesbocchio" AND a%3A"jasypt-spring-boot-starter")))的最新版本

1.2 数据库配
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值