java.lang.IllegalArgumentException: Failed to decrypt的解决方案
springboot项目启动时报错
java.lang.IllegalArgumentException: Failed to decrypt
指的是解密失败,原因是在数据库连接配置的地方,设置了加密
datasource:
druid:
#drudriver-class-name: com.p6spy.engine.spy.P6SpyDriver
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.2.63:6666/dy-hhd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
filters: config
connectionProperties: config.decrypt=true
解决方法
把 connectionProperties: config.decrypt=true 改为
connectionProperties: config.decrypt=false