1 问题描述
在Spring Boot中使用jasypt-spring-boot进行加密,但是提示:
Description:
Failed to bind properties under 'spring.datasource.password' to java.lang.String:
Reason: Failed to bind properties under 'spring.datasource.password' to java.lang.String
Action:
Update your application's configuration
或提示
Description:
Failed to bind properties under 'spring.datasource.url' to java.lang.String:
Reason: Failed to bind properties under 'spring.datasource.password' to java.lang.String
Action:
Update your application's configuration
2 解决办法
查阅了相关issue,发现是3.0.2更改了默认的加密算法,最后的办法是把版本降到2.1.2:
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>2.1.2</version>
</dependency>


文章讲述了在SpringBoot中使用jasypt-spring-boot进行加密时遇到的问题,原因在于3.0.2版本后默认加密算法改变,解决方法是将依赖降级到2.1.2版本。

2162

被折叠的 条评论
为什么被折叠?



