java.lang.IllegalArgumentException:Failed to decrypt

从错误可以看出,解密失败。

原因是你在数据库连接配置的地方,设置了加密。即:

config.decrypt=true
将其改成:

config.decrypt=false
问题就可以解决。

public-key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAITOx1pKAT9xh7cfoZqUw6SLjgl/Y44M2XUAw37aRndmku+FSdGp9PXGwJYoeXt/TbxR1DSdd7S2+/s1cUsvvDMCAwEAAQ==
spring:
http:
encoding:
charset: UTF-8
force: true
enabled: true
datasource:
druid:
url: jdbc:mysql://localhost:3306/fairchild?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://192.168.31.196:3306/fairchild?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
# connection-properties: config.decrypt=true;config.decrypt.key=${public-key}
initial-size: 5
min-idle: 10
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 2000
min-evictable-idle-time-millis: 60000
max-evictable-idle-time-millis: 9000000
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
pool-prepared-statements: true
max-open-prepared-statements: 20
async-init: true
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: druid
login-password: druid
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
session-stat-enable: false
profile-enable: true
filter:
wall:
enabled: true
db-type: mysql
config:
enabled: true
aop-patterns: cn.com.coding4fun.*
jpa:
show-sql: true
generate-ddl: false
hibernate:
ddl-auto: none
open-in-view: true
properties:
hibernate:
format_sql: true
order_updates: true
order_inserts: true
jdbc:
batch_size: 50
fetch_size: 50
javax:
cache:
provider: org.ehcache.jsr107.EhcacheCachingProvider
uri: classpath:hibernate-ehcache.xml
missing_cache_strategy: create
enable_lazy_load_no_trans: true
cache:
use_query_cache: true
use_second_level_cache: true
region_prefix: jcache-hibernate
use_minimal_puts: false
use_reference_entries: true
use_structured_entries: false
auto_evict_collection_cache: false
hibernate.cache.default_cache_concurrency_strategy: read-only
region:
factory_class: jcache
cache:
jcache:
provider: org.ehcache.jsr107.EhcacheCachingProvider
config: classpath:ehcache.xml
messages:
basename: i18n/messages
encoding: UTF-8
server:
port: 8081
tomcat:
uri-encoding: UTF-8

Error querying database. Cause: java.lang.IllegalArgumentException:Failed to decrypt.(错误笔记)的更多相关文章

  1. Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …

    编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.Nested ...

  2. 搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

    Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection doe ...

  3. spring boot :error querying database. Cause: java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required

    配置多个数据源启动报错,error querying database. Cause: java.lang.IllegalArgumentException: dataSource or dataSo ...

  4. ### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: cn.xiaojian.blog.po.BlogType and java.lang.String ### Cause: java.lang.IllegalArgumentException: ...

    ### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: cn.xiaoj ...

  5. mybatis查询异常-Error querying database. Cause: java.lang.ClassCastException: org.apache.ibatis.executor.ExecutionPlaceholder cannot be cast to java.util.List

    背景,mybatis查询的时候直接取的sqlsession,没有包装成SqlSessionTemplate,没有走spring提供的代理. 然后我写的获取sqlsession的代码没有考虑到并发的情况 ...

  6. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NumberFormatException: For input string: "W%" ### Cause: java.lang.NumberFormatException: For input s

    一个常见的myBatis xml文件中的引号错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying data ...

  7. java.lang.IllegalArgumentException: Failed to decrypt.

    加密失败. 附加信息: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Co ...

  8. mybatis 参数格式异常-- Error querying database. Cause: java.lang.NumberFormatException: For input string

    mybatis中 <if></if>标签中进行判断时,如果传入的时字符格式和数字进行判断需要将数字进行转译,否则默认是数字和数字进行比较,这是就会出现参数格式异常如<if ...

  9. Error updating database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String异常处理

    问题原因:Mybatis中对于时间参数进行比较时的一个BUG. 如果拿传入的时间类型参数与空字符串‘‘进行对比判断则会引发异常.,所以应该去掉该判断, 只保留非空判断就正常了 <if test= ...

随机推荐

  1. 擅用ABAP错误捕捉,避免系统Dump

    有时候我们在写程序时,会因为计算公式不符合算术表达式,计算公式的字段值不是纯数值等等问题造成程序dump,这个时候我们在无法避免字段赋值错误的情况下,又不想程序dump可以采取catch异常的方法进行 ...

  2. python并发利器tomorrow

    tomorrow是我最近在用的一个爬虫利器,该模块属于第三方的模块,使用起来非常的方便,只需要用其中的threads方法作为装饰器去修饰一个普通的函数,既可以达到并发的效果,本篇将用实例来展示tomo ...

  3. Sentry-JS-SDK-Browser 官方示例最佳实践

    系列 SDK 开发 顶级开源项目 Sentry 20.x JS-SDK 设计艺术(理念与设计原则篇) 顶级开源项目 Sentry 20.x JS-SDK 设计艺术(开发基础篇) 顶级开源项目 Sent ...

  4. 在linux系统中登录mysql时出现Enter password: ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)的解决办法

    在一次使用mysql数据库是出现了这种错误,于是乎去百度看了很多博文踩了很多坑,最终解决了问题,分享给大家. 转载与:https://blog.csdn.net/css33/article/detai ...

  5. 利用matplotlib和cmaps根据已有的colormap,重新定义colormap

    算法网上这哥们总结的还可以[1] ,但是使用matplotlib自定义colormap自己掌握的还不够,写在这里 希望达到的目标 使用什么样的颜色,可以自己定义 方便的调用其他人的色标, 使用一部分c ...

  6. sqli-labs系列——第五关

    less5 更改id后无果,不能用union联合查询 此处用报错注入 报错注入的概念:(1). 通过floor报错 and (select 1 from (select count(*),concat ...

  7. C语言之预处理详解

    C语言之预处理详解 纲要: 预定义符号 #define #define定义标识符 #define定义宏 #define的替换规则 #与## 几点注意#undef 带副作用的宏参数 宏和函数的对比 命名 ...

  8. 每天自学两小时Python,整理了最详细的学习路线和规

    上次这篇文章每天自学两小时Python,三个月学通月入20K主要是给大家整理了学习资料视频和PDF书籍,很多需要的都关注私信领取了. 很多朋友领取之后都问我教程有了那么应该从哪去开始学习呢,私信太多我 ...

  9. js--如何实现继承?

    前言 学习过 java 的同学应该都知道,常见的继承有接口继承和实现继承,接口继承只需要继承父类的方法签名,实现继承则继承父类的实际的方法,js 中主要依靠原型链来实现继承,无法做接口继承. 学习 j ...

  10. ASP.NET网页开发基础(7)

    整理了一点的小知识点: 1.ASP.NET网页扩展名:    .asax 全局应用程序类的扩展名     .xml 访问网页时的扩展名     .htm     .ascx Web用户控件的扩展名   ...