springboot集成jasypt

Jasypt这个Java类包为开发人员提供一种简单的方式来为项目增加加密功能,包括:密码Digest认证,文本和对象加密,集成hibernate,Spring Security(Acegi)来增强密码管理。Jasypt开发团队推出了Java加密工具Jasypt 1.4,它可与Spring Framework、Hibernate和Acegi Security集成;

详情见URL

springboot 集成jasypt

首先是版本选择 建议:

springboot版本jasypt版本
2.1.02.1.0
1.4.21.5
1.5.31.5

本文主要介绍 springboot1.4.2版本的集成数据库密码加密 

首先 pom 文件引入

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

cmd窗口 执行命名行

 

  java -cp C:\.m2\repository\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar  org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="数据库密码" password=盐值 algorithm=PBEWithMD5AndDES

以及对应的

 

注意:  尽量选用版本高的mybaits  以及 tk.mybatis 插件引用,

这样才能避免更多坑 

  <dependency>
            <groupId>tk.mybatis</groupId>
            <artifactId>mapper-spring-boot-starter</artifactId>
            <version>2.1.5</version>
        </dependency>

本文引用的2.1.5 

之前引用低版本的会报错 如下 

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ‘mapperHelper’ of bean class [org.mybatis.spring.mapper.MapperFactoryBean]: Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


 升级了版本就解决了

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值